Exemple #1
0
module.exports = function (pipelines) {
  var mainRequireJS = requireJS({
      // FIXME: auto?
      preserveLicenseComments: false,
      paths: {
          'lodash-amd': '../bower_components/lodash-amd',
          'immutable': '../bower_components/immutable/dist/immutable'
      }
  });

  var toBuildDir = write('./build');
  var writeBoth = all(
    [uglifyJS, toBuildDir],
    toBuildDir
  );

  /* jshint -W069 */

  pipelines['build'] = [
    // TODO: use bower operation to find main of this component?
    // As per: https://github.com/bower/bower/issues/1090
    // bower('scribe'),
    glob('./src/scribe.js'),
    mainRequireJS,
    // Send the resource along these branches
    writeBoth
  ];
};
module.exports = function (pipelines) {
  var toBuildDir = write('./build');
  var writeBoth = all(
    // Send the resource along these branches
    [uglifyJS(), toBuildDir],
    toBuildDir
  );

  pipelines['build'] = [
    glob('src/scribe-plugin-inline-styles-to-elements.js'),
    requireJS(),
    writeBoth
  ];
};
module.exports = function (pipelines) {
  var keyboardPluginRequireJs = requireJS({
    paths: {
      'lodash-amd': '../bower_components/lodash-amd'
    }
  });

  var toBuildDir = write('./build');
  var writeBoth = all(
    // Send the resource along these branches
    [uglifyJS(), toBuildDir],
    toBuildDir
  );

  pipelines['build'] = [
    glob('src/scribe-plugin-keyboard-shortcuts.js'),
    keyboardPluginRequireJs,
    writeBoth
  ];
};
module.exports = function (pipelines) {
  var sanitizerPluginRequireJS = requireJS({
    paths: {
      'html-janitor':  '../bower_components/html-janitor/src/html-janitor',
      'lodash-modern': '../bower_components/lodash-amd/modern'
    }
  });

  var toBuildDir = write('./build');
  var writeBoth = all(
    // Send the resource along these branches
    [uglifyJS, toBuildDir],
    toBuildDir
  );

  pipelines['build'] = [
    glob('src/scribe-plugin-sanitizer.js'),
    sanitizerPluginRequireJS,
    writeBoth
  ];
};