How to Improve packages build time?


#1

Hello,

I’m trying to add a custom build of ckeditor into my package.

my package.js :

Package.onUse(function(api) {
  api.versionsFrom('1.3.2.4');

  api.use([
    'ecmascript',
    'underscore',
    'session',
    'accounts-password',
    'jquery'
  ]);

  api.use([
    'kadira:flow-router-ssr@3.13.0',
    'aldeed:collection2@2.9.1',
    'aldeed:simple-schema@1.5.3',
    'mdg:validated-method@1.1.0',
    'fourseven:scss@3.4.3'
  ]);

  api.addAssets(getFiles('public/js/**/*.*'), 'client');
  api.addAssets(getFiles('public/icons/**/*.*'), 'client');

  api.addFiles('ui/main.scss', 'client');

  api.mainModule('startup/client/routes.jsx', 'client');
  api.mainModule('startup/server/index.js', 'server');
});

function getFiles(glob) {
  var path = Npm.require('path');
  var Glob = Npm.require('glob');
  var packagePath = path.join(process.cwd(), '/packages/myproject');

  var globResults = Glob.sync(glob, {
    cwd : packagePath
  });

  return globResults;
}

so i have a ckeditor.min.js and other libraries with *.min.js files and i don’t understant why when i do a “api.addAssets” those files seems to be “processed” although that they are just plain assets.