0.2.0 • Published 8 years ago

flarum-gulp v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Gulp wrapper for Flarum JavaScript compilation.

This package sets up a Gulp program that compiles JavaScript for use in Flarum. Example usage:

// Gulpfile.js
var gulp = require('flarum-gulp');

gulp({
  files: [
    'bower_components/foo/bar.js'
  ],
  modules: {
    'vendor/package': 'src/**/*.js'
  }
});
$ gulp         # compile
$ gulp watch   # compile and watch for changes

Options

  • files An array of individual files to concatenate.
  • modules A map of module prefixes to their source files.
    • Modules are transpiled to ES5 using Babel, including Object.assign.
    • JSX is converted into Mithril's m syntax.
  • outputFile The resulting file to write to. Defaults to dist/extension.js.