jspm-dev-builder-cli

0.3.0 • Public • Published

jspm-dev-builder-cli

Incremental development builds with jspm

0.17

This project has been incorporated into jspm core and is available in version 0.17.0-beta.12. You can continue to use this project for 0.16.x projects, but you should prefer the built-in feature for 0.17.x projects.

Motivations

By default, jspm fetches and transpiles all the files in the browser which is great as you don't have to configure anything. However, when your project grows, this turn out to take a lot of times. This project is an attempt to reduce this time by watching the files and rebuilding when they change.

Install

Install watchman and then run this command in a terminal

npm install -g jspm-dev-builder-cli

Usage

jspm-dev-builder app/app -o bundle.js

This will

  • bundle your application starting with app/app as entrypoint
  • Output the result in a file bundle.js
  • watch files and rebuild the application when a file changes

Watched files

How do we know which files to watch ? It turns out that SystemJS builder (which is used by jspm to build your app) has this nice method called trace that build direct trace tree objects that can be used to determine your app files. That way, we are sure we only watch the files that are really needed and not all the files of a given folder that have nothing to do with jspm (like a README.md file for example).

Credits

Credits goes to Jack Franklin who did all the hard work in jspm-dev-builder.

Readme

Keywords

none

Package Sidebar

Install

npm i jspm-dev-builder-cli

Weekly Downloads

1

Version

0.3.0

License

MIT

Last publish

Collaborators

  • oligot