Closed timaschew closed 10 years ago
ohhhh doing .use()
was just an example. didn't expect people to actually .use()
nothing.
oops :)
nevertheless I get undefined
for the css output, if there is no styles defined in the component.json. Is that desired? If yes, so then I should always check for an error and undefined return value?
build(function(err, css) {
if (err) throw err;
if (!css) return; // or css = "";
fs.writeFileSync(path, css);
}
yeah you should check whether there's css or not
use()
without any param should be documented at https://github.com/component/builder2.js/blob/master/docs/builders.md#pluginsThe usage of that I see in some snippets, also here: https://github.com/component/bundler.js/commit/14b12d665c40a970ced0cf17f587a14426dc83fe
which breaks the build without any error all bundles, except the boot is okay, but for the others the build output is
undefined
if I replace
use()
with.use('scripts', build.plugins.js())
the build is fine!