@urbaninstitute/baines

0.2.0 • Public • Published

Baines

A gulp flavored build tool for quick and modular charts, features, and pym iframes.

rough getting started guide

  • clone this repo
  • run npm install
  • change name/details inside package.json
  • modify github remote accordingly

Available commands

See gulpfile.js for full list of tasks

gulp run will compile everything

gulp watch will watch for changes

In order to compile the public/ folder, set the node environment to production by entering the following:

export NODE_ENV=production

Then run gulp run and check that the public/ folder looks correct.

Note! Each time you restart your terminal your NODE_ENV will reset

After this, if you want to push to the gh-pages branch use the following command:

git add public && git commit -m "Some commit message" git subtree push --prefix public origin gh-pages

cf: https://gist.github.com/cobyism/4730490

Modifying and adjusting for your needs

  • adjust available browsers to compile to at the bottom of the package.json (see Browserslist for more info)

Tools and Resources

Getting started, I followed this tutorial but note that it is run with Gulp 3.x, and not 4.x. The substantive differences are in the following items:

HTML templating and precompile injection: Gulp-hb

Transpiling: Babel and Browserslist

Ordering of JS

  • deporder: this allows us to order the js without using imports/require statements.

Needed improvements

  • clean out .tmp/,build/, and public/ on deploys
  • full readme
  • Continuous integration
  • Pym.js support
  • More sophisticated require or webpack type js management
  • more sophisticated html template/partial injection with conditionals, a la nunjucks

Readme

Keywords

Package Sidebar

Install

npm i @urbaninstitute/baines

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

3.48 MB

Total Files

49

Last publish

Collaborators

  • benkates
  • mitchthorson