HTML UI Toolkit build tool
Want to see pretty graphs? Log in now!
npm install hut-build
|1||downloads in the last week|
|58||downloads in the last month|
|Last Published By|
|Version||0.3.2 last updated 4 months ago|
|Keywords||build, hut, browser|
|Dependencies (15)||mkdirp, browserify, build-jshint, rework-vars, rework-npm, rework, async, sauce-tap-runner, gaze, nomnom, through, serve-script, st, redirecter, routes-router|
HTML UI Toolkit build tool.
This tool is custom-made for the HTML UI Toolkit (
hut) packages. It is not
intended to be a general-purpose build utility.
hut-build lint in your project directory to lint all the source files
using JSHint. See the
jshint.json file for the JSHint settings.
Write tests in the
test.js file in your project directory. Tests must output
TAP-compatible output to the console. Run the tests using
hut-build test. This
lints the source files and runs the tests on all supported browsers (see the
Tests are run on Sauce Labs browsers. The
SAUCE_KEY environment variables must be set to your Sauce Labs username
and key, respectively. When running under Travis CI
or Drone.io, the build number is automatically sent to
Sauce Labs to update the
See Serve Locally for directions on serving the test files locally.
When writing an HTML/CSS/JS module, you can use the
hut-build build command.
Write an example using your module in the
example directory inside of your
project directory. Include an
index.html file for the HTML page. You can also
example.js file that will be bundled with Browserify and an
example.css that will be processed with Rework. Reference the
example.css files from
index.html file when using them.
hut-build build, the processed files (
example.css) will be written to the
When developing, it is a pain to always run
hut-build build. To serve the
files locally, run
hut-build serve. This will serve the processed example
http://localhost:8000/example/. Specify the port to use with the
--port argument and enable source maps for JS with the
This also serves the JS tests. Run the tests at
The console output will be shown on the page.
The project structure expected by
my-project - example # A directory containing an example using the project - index.html # Example HTML file - example.js # Example JS file - example.css # Example CSS file - build # A directory containing the built files - build - index.html # Copied from example/index.html - example.css # Processed by rework - example.js # Processed by browserify - test.js # The JS test file, must use TAP output to console - package.json # The package.json file needed for NPM