0.0.7 • Published 3 years ago

smap1-build-helpers v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

smap-build-helpers

Helpers of build flow for smap.js and plugins.

Install

npm install smap-build-helpers

Usage

Common usage with gulp:

const gulp = require('gulp'),
    pkg = require('./package.json'),
    BundleHelper = require('smap-build-helpers').BundleHelper,
    TestHelper = require('smap-build-helpers').TestHelper;
const bundleHelper = new BundleHelper(pkg);
gulp.task('build', () => {
    return bundleHelper.bundle('index.js');
});

gulp.task('minify', ['build'], () => {
    bundleHelper.minify();
});

gulp.task('watch', ['build'], () => {
    gulp.watch(['index.js', './gulpfile.js'], ['build']);
});

gulp.task('test', ['build'], () => {
    testHelper.test(karmaConfig);
});

gulp.task('tdd', ['build'], () => {
    karmaConfig.singleRun = false;
    gulp.watch(['index.js'], ['test']);
    testHelper.test(karmaConfig);
});

gulp.task('default', ['watch']);

Develop

Based on rollup, karma and uglify