How to use the watchify/package.json.version function in watchify

To help you get started, we’ve selected a few watchify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github royriojas / persistify / bin / cmd.js View on Github external
var w = require( '../' )( null, {
    cacheId,
    cacheDir,
    command: _argv.join( ' ' ),
    neverCache,
    watch,
    recreate
  }, process.argv.slice( 2 ) );

  var outfile = w.argv.o || w.argv.outfile;
  var verbose = w.argv.v || w.argv.verbose;

  if ( w.argv.version ) {
    nodeConsole.error( 'persistify v' + require( '../package.json' ).version +
        ' (in ' + path.resolve( __dirname, '..' ) + ')' );
    nodeConsole.error( 'watchify v' + require( 'watchify/package.json' ).version +
        ' (in ' + path.dirname( require.resolve( 'watchify' ) ) + ')' );
    nodeConsole.error( 'browserify v' + require( 'browserify/package.json' ).version +
        ' (in ' + path.dirname( require.resolve( 'browserify' ) ) + ')' );
    return;
  }

  if ( !outfile ) {
    nodeConsole.error( 'You MUST specify an outfile with -o.' );
    process.exit( 1 ); //eslint-disable-line
  }

  var bytes, time;
  if ( watch ) {
    w.on( 'bytes', function ( b ) {
      bytes = b;
    } );
github mattdesl / watchify-middleware / index.js View on Github external
module.exports.getWatchifyVersion = function () {
  return require('watchify/package.json').version
}

watchify

watch mode for browserify builds

MIT
Latest version published 4 years ago

Package Health Score

65 / 100
Full package analysis