coreybutler / productionline-web

An extension of productionline, providing common web/UI build capabilities.
5 stars 3 forks source link

Need ability to specify javascript path and excludes #16

Open gbdrummer opened 6 years ago

gbdrummer commented 6 years ago

At the moment, the buildJavaScript() method uses this hardcoded path:

path.join(this.SOURCE, '/**/*.js')

This is an issue in the event that there are libraries or other js files that we don't want to be processed, ie pre-built webcomponents etc.

If we could specify paths and excludes for the different types of source files we have, we could avoid having to rewrite the buildJavaScript method for custom builds.

gbdrummer commented 6 years ago

This also applies to buildHtml() and any other similar methods. It would be great to be able to specify the paths easily like:

builder.paths = {
  html: path.join(builder.SOURCE, '**/*.htm*'),
  javascript: path.join(builder.SOURCE, 'js/**/*.js'),
  css: path.join(builder.SOURCE, '**/*.css')
}
coreybutler commented 6 years ago

productionline-web inherits the ignoreList config property, allowing you to ignore specific files and directories. It supports the glob syntax. See https://github.com/coreybutler/productionline/blob/master/index.js#L270.

Given that it's possible to exclude sources this way, does this still seem like an issue?