Sha256: 556ecd07fc984efaa177db7232ebb3948ed12be02e96a0c2a2bb60581355a006

Contents?: true

Size: 1.7 KB

Versions: 29

Compression:

Stored size: 1.7 KB

Contents

'use strict';


// Build script from https://github.com/nodeca/mincer/tree/master/examples

//
// Require module
//


var Mincer = require('mincer');


//
// Get Mincer environment
//


//
// Configure Mincers logger, by default, all
// messages are going to the middle of nowhere
//


Mincer.logger.use(console);


//
// Create and export environment
//


var environment = new Mincer.Environment(process.cwd());


//
// Configure environment load paths (where to find ssets)
//

// Include bootstrap scss load path
var bootstrapPath = '../../';
environment.appendPath(bootstrapPath + 'assets/stylesheets');

// Include fonts load path
environment.appendPath(bootstrapPath + 'assets/fonts');

// Include dir with assets, root just for test
environment.appendPath('./');


//
// Define environment essential *_path helper that will be available in the
// processed assets. See `assets/stylesheets/app.css.ejs` for example.
//


environment.ContextClass.defineAssetPath(function (pathname, options) {
  var asset = this.environment.findAsset(pathname, options);

  if (!asset) {
    throw new Error("File " + pathname + " not found");
  }

  return '/assets/' + asset.digestPath;
});


//
// Create and compile Manifest
//

var manifest_path = process.argv[2] || __dirname + '/assets';

var manifest = new Mincer.Manifest(environment, manifest_path);


manifest.compile(['application.css'], function (err, assetsData) {
  if (err) {
    console.error("Failed compile assets: " + (err.message || err.toString()));
    process.exit(128);
  }

  console.info('\n\nAssets were successfully compiled.\n' +
               'Manifest data (a proper JSON) was written to:\n' +
               manifest.path + '\n\n');
  console.dir(assetsData);
});

Version data entries

29 entries across 29 versions & 5 rubygems

Version Path
entreprise7pro-bootstrap-sass-3.4.7 test/dummy_node_mincer/manifest.js
entreprise7pro-bootstrap-sass-3.4.6 test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/bootstrap-sass-3.4.1/test/dummy_node_mincer/manifest.js
bootstrap-sass-3.2.0.4 test/dummy_node_mincer/manifest.js
bootstrap-sass-3.4.1 test/dummy_node_mincer/manifest.js
bootstrap-sass-3.4.0 test/dummy_node_mincer/manifest.js
bootstrap-sass-3.3.7 test/dummy_node_mincer/manifest.js
bootstrap-sass-3.3.6 test/dummy_node_mincer/manifest.js
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/bootstrap-sass-3.3.5.1/test/dummy_node_mincer/manifest.js
bootstrap-sass-3.3.5.1 test/dummy_node_mincer/manifest.js
bootstrap-sass-3.3.5 test/dummy_node_mincer/manifest.js