jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.97k stars 190 forks source link

The .file export is inconsistent #326

Closed vp2177 closed 7 years ago

vp2177 commented 7 years ago
const { task } = require('jake')
task('foo', () => console.log('PASS'))

vs.

const { file } = require('jake')
file('foo.min.js', [ 'file.js' ], () => console.log('FAIL'))
mde commented 7 years ago

What module system is this? It looks like a semicolonless mix of native ES imports and CommonJS.

vp2177 commented 7 years ago

It's a Jakefile. As those are interpreted in Node, it's CommonJS (no ES imports, yet).

Issue is regardless of module system however.

mde commented 7 years ago

Fixed in 80457ee5c45d171621cdb46945752cf1801cfe4e and pushed to NPM, v8.0.15.

vp2177 commented 7 years ago

Verified fixed, thank you

mde commented 7 years ago

You're very welcome, and thank you for reporting it. Apologies for the confusion about the import statement -- my friend @MiguelMadero pointed out to me that it's just simple object destructuring assignment. Apparently I am getting old, and it takes me a while to recognize all the newish ES6 syntax when I see it. :)