Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Latest commit

 

History

History
executable file
·
59 lines (41 loc) · 1.17 KB

README.md

File metadata and controls

executable file
·
59 lines (41 loc) · 1.17 KB

adonis-es6-browser

An Ace command that starts a listener on file change compiling them into ES5 code using rollup with babel as well booting up a livereload server that updates the browser when changes occurred.

How to Install

To install adonis-es6-browser:

$ npm i -D adonis-es6-browser

Config AdonisJS to use the command at start/app.js:

/*
|------------------------------------------------------------------
| Commands
|------------------------------------------------------------------
|
| Here you store ace commands for your package
|
*/
const commands = [
  require('adonis-es6-browser')
]

How to Use

For Development:

$ adonis browser

For Production:

$ adonis browser --prod

Code Structure

To use this command you have to follow a directory pattern:

  • All ES6 code go into src/ at project root.
  • Master Page code go into src/master.
  • Code of other pages go into src/pages/[pageName].
  • Every page folder has to have an index.js.
  • The output folder is public/js/pages/[pageName].min.js.

License

Copyright (c) 2017 Andre P. Pedroza

Released under the MIT license. See LICENSE for details.