0.0.2 • Published 4 years ago

malta-browserify v0.0.2

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

npm version npm downloads npm downloads


This plugin can be used on: .js files

browserify needs to be globally available (yarn global add browserify)

Options : You can pass the options using an options parameter to the plugin. Do not use the -o parameter cause malta-browserify adds it automatically with the right outfilename.

Sample usage:

malta app/source/home.js public/js -plugins=malta-browserify[options:[\"--dg\",\"-ig\",\"--deps\"]]
# remember that options cannot contain spaces

or in the .json file :

"app/source/home.js" : "public/js -plugins=malta-browserify[options:[\"--dg\",\"-ig\",\"--deps\"]]"

or in a script :

var Malta = require('malta');
Malta.get().check([
    'app/source/home.js',
    'public/js',
    '-plugins=malta-browserify[options:[\"--dg\",\"-ig\",\"--deps\"]]',
    '-options=showPath:false,watchInterval:500,verbose:0'
    ]).start(function (o) {
        var s = this;
        console.log('name : ' + o.name)
        console.log("content : \n" + o.content);
        'plugin' in o && console.log("plugin : " + o.plugin);
        console.log('=========');
    });