Allows a
taskfile.js
to be written with ES6 or ES7 syntax.
$ npm install --save-dev @taskr/esnext
That's it! 🎉 You've now enabled async
/await
and import
syntax for your taskfile.js
!
Note: This will NOT compile your ES6 files into ES5. You must download and setup
@taskr/babel
or@taskr/buble
for that.
A taskfile.js
may also include require()
statements (not shown).
// taskfile.js
import { foo, bar as baz } from './bat';
export default async function (task) {
await task.source('src/*.js') // etc...
}
export async function lint(task) {
await task.source('src/*.js') // etc...
}
export async function styles(task, obj) {
await task.source(obj.src || 'src/*.sass') // etc...
}
Any issues or questions can be sent to the Taskr monorepo.
Please be sure to specify that you are using @taskr/esnext
.
MIT © Luke Edwards