Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"banner" property #168

Closed
6 tasks done
azproduction opened this issue Jan 4, 2014 · 1 comment
Closed
6 tasks done

"banner" property #168

azproduction opened this issue Jan 4, 2014 · 1 comment

Comments

@azproduction
Copy link
Owner

refs #167

We need a way to define custom banner for bundle. Default value will be:
// This file was automatically generated from ...

It also possible to use lmd licence as banner.

var read = require('fs').readFileSync;

var banner = '/*!\n  * ' + read(require.resolve('lmd/LICENCE')).replace(/\n/g, '\n  * ') + '\n  */';

module.exports = {
    banner: banner,
    modules: {
        ...
    }
};

It also possible to use some variables __dirname and __filename in banner template.

  • default value of "banner" is // This file was automatically generated from ...
  • it should not be printed if it is a non-string
  • possible to use variables in it __dirname, __filename
  • builder should warn if banner contains JavaScript (not just a comment block)
  • bundles should inherit "banner" value from parent config
  • source map should consider banner lines
@leonidborisenko
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants