New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

gulp-js-freezer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-js-freezer

JS resources freezer. The best use for cache invalidation.

latest
Source
npmnpm
Version
0.0.7
Version published
Weekly downloads
6
-50%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-js-freezer

JS resources freezer. The best use for cache invalidation.

What it does

Source JS files
app-script.js
subdir/subdir-script.js
Freezed files
79f2ced21645cb7800b13c899aa09177ff5cad96.js
347770f808e05d90280d6dac1723d3e6f37db08e.js
js-freeze-map.json
Freezing map file
{
 "app-script.js": "../dest/79f2ced21645cb7800b13c899aa09177ff5cad96.js",
 "subdir/subdir-script.js": "../dest/347770f808e05d90280d6dac1723d3e6f37db08e.js"
}

Install

Install with npm

$ npm i gulp-js-freezer --save-dev

Usage

var gulpJsFreezer = require('gulp-js-freezer');

var deployPath = '../_deploy'

gulp.task('freeze-js', function () {
    return gulp.src('../static/js/**/*.js')
        .pipe(gulpJsFreeze({freezeMapBaseDir: '../static/js'}))
        .pipe(gulp.dest(deployPath)) // writes freezed resources
        .pipe(gulpJsFreezer.freezeMapResolve()) // creates map of freezed resources
        .pipe(gulp.dest(deployPath)) // writes freeze map file
})

Options
var gulpJsFreezer = require('gulp-js-freezer');

var deployPath = '../_deploy'

gulp.task('freeze-js', function () {
    return gulp.src('../static/js/*.js')
        .pipe(gulpJsFreezer({
            freezeMapBaseDir: '../static/js', // resolve paths inside map file name by freezeMapBaseDir.
                                               // default null (writes absolute path of freezed file)
            freezeNestingLevel: 3, // nesting levels of directories; default 1
            freezeMapFileName: 'js-freeze-map.json' // freeze map file name; default js-freeze-map.json
        }))
        .pipe(gulp.dest(deployPath))
        .pipe(gulpJsFreezer.freezeMapResolve())
        .pipe(gulp.dest(deployPath))
})

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Alex Batalov

  • github/radist2s

Inspired by borschik.

License

Copyright © 2015 Alex Batalov Licensed under the MIT license.

Keywords

gulp

FAQs

Package last updated on 10 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts