mixu / gluejs

Build CommonJS modules for the browser via a chainable API
http://mixu.net/gluejs/
165 stars 13 forks source link

Cannot run against files in `dist/` #21

Closed jamesarosen closed 11 years ago

jamesarosen commented 11 years ago

Running

./node_modules/gluejs/bin/gluejs \
  --include ./dist/cjs/ \
  --main ./dist/cjs/i18n.js \
  --replace emberjs=window.Ember,handlebars=window.Handlebars,jquery=window.jQuery \
  --global Ember.I18n \
  --out ./dist/ember-i18n.js

yields

/.../node_modules/gluejs/lib/runner/package-commonjs/index.js:93
    throw new Error('No files were included in the build. Check your `.include
          ^
Error: No files were included in the build. Check your `.include()` call paths.
    at module.exports (/.../node_modules/gluejs/lib/runner/package-commonjs/index.js:93:11)
    at API.render (/.../node_modules/gluejs/index.js:37:5)
    at Object.<anonymous> (/.../node_modules/gluejs/bin/gluejs:161:5)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

I don't have a .npmignore file and dist/ doesn't appear in my .gitignore. Moving the ./dist/ structure to ./tmp/ solves the problem.

mixu commented 11 years ago

Thanks for filing this! The issue was that there are some default exclusions which were not overridable. Fixed in 2ed191b6c26ac0c1adf92a543de590b9404c03fa and documented in d75c11d235ce9e11dc3ec02b2dcc915c709e8021. You can now set --reset-exclude to skip the default exclusions.