Skip to content
/ fly Public
forked from lukeed/taskr

Node.js build system based in generators

License

Notifications You must be signed in to change notification settings

gt53/fly

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fly

Build status: Windows

Node.js build system based in generators.

Features

See the documentation to learn more.

Install

npm install fly

flyfile.js

ES5

Out of the box, a flyfile.js should be written in native ES5:

var x = module.exports
var paths = {
  scripts: ['src/**/*.js', '!src/ignore/**/*.js']
}

x.default = function * () {
  yield this.watch(paths.scripts, 'build')
}

x.build = function * () {
  yield this.source(paths.scripts)
    .eslint({
      rules: {'no-extra-semi': 0}
    })

  yield this.source(paths.scripts)
    .babel({
      presets: ['es2015', 'stage-0']
    })
    .concat('app.js')
    .target('dist')
}

ES2015 and beyond

If you'd prefer to write your flyfile.js and plugins with ES6 or ES7 syntax, install fly-esnext and that's it :)

npm i -D fly-esnext
const paths = {
  scripts: ['src/**/*.js', '!src/ignore/**/*.js']
}

export default async function () {
  await this.watch(paths.scripts, 'build')
}

export async function build() {
  await this.source(paths.scripts)
    .eslint({
      rules: {'no-extra-semi': 0}
    })

  await this.source(paths.scripts)
    .babel({
      presets: ['es2015', 'stage-0']
    })
    .concat('app.js')
    .target('dist')
}

About

Node.js build system based in generators

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%