Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gulp plugin for unassert: Encourages programming with assertions by providing tools to compile them away.

License

Notifications You must be signed in to change notification settings

unassert-js/gulp-unassert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-unassert

A gulp plugin for unassert.

unassert

NPM version Build Status Dependency Status License

Description

gulp-unassert is a gulp plugin for unassert: Encourages programming with assertions by providing tools to compile them away.

Related modules

Usage

First, install gulp-unassert as a devDependencies:

npm install --save-dev gulp-unassert

Then, add it to your gulpfile.js:

var unassert = require('gulp-unassert');

gulp.task('build', function () {
    gulp.src('./src/*.js')
        .pipe(unassert())
        .pipe(gulp.dest('./dist'));
});

Source maps

gulp-unassert can be used with gulp-sourcemaps to generate source maps for the transformed javascript code. Note that you should init gulp-sourcemaps prior to running the gulp-unassert and write the source maps after. gulp-unassert works well with some gulp plugins that supports gulp-sourcemaps.

var unassert = require('gulp-unassert');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('build', function () {
    // compile, instrument then concatinate
    gulp.src('./src/**/*.coffee')
        .pipe(sourcemaps.init())
        .pipe(coffee({bare: true}))
        .pipe(unassert())
        .pipe(concat('bundle.js'))
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('./build'));
    // will write the source maps inline in the code
});

For more information, see gulp-sourcemaps.

Changelog

See CHANGELOG

Author

Our Support Policy

We support Node under maintenance. In other words, we stop supporting old Node version when their maintenance ends.

This means that any other environment is not supported.

NOTE: If gulp-unassert works in any of the unsupported environments, it is purely coincidental and has no bearing on future compatibility. Use at your own risk.

License

Licensed under the MIT license.

About

Gulp plugin for unassert: Encourages programming with assertions by providing tools to compile them away.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •