Beautifies source code with JS Beautify
and checks it for trouble spots with
JSLint.
The following cleans all scripts found in myapp/myapp.html.
./js steal/cleanjs myapp/myapp.html
Use
Typically, steal.clean is used from the command line
steal/cleanjs script. It takes
a path to an html or js file on the filesystem and
a list of options. It then
updates the file or files in place.
Using on a single file
./js steal/cleanjs myapp/myapp.js
Using on many files
./js steal/cleanjs myapp/myapp.html
Turning on JSLint and other options
Turn on JSLint like:
./js steal/cleanjs myapp/myapp.js -jslint true
You can pass other options in a similar way.
The clean script
When you generate a JavaScriptMVC application, it comes with
a steal script. You can modify the options in this file.
Ignoring Files
To ignore a file from your application, mark it as clean with a comment like:
//@steal-clean
The steal.clean function
Takes a relative path to a file on the filesystem;
checks if it is a html page or a single js file; runs
beautify on it then optionally runs JSLint.
steal.clean(url, options) -> undefined
{String}
the path to a page or a JS file
{optional:Object}
an optional set of params. If you
want to turn on steal, this should be true.
Beautifies source code with JS Beautify and checks it for trouble spots with JSLint.
The following cleans all scripts found in myapp/myapp.html.
Use
Typically, steal.clean is used from the command line
steal/cleanjsscript. It takes a path to an html or js file on the filesystem and a list of options. It then updates the file or files in place.Using on a single file
Using on many files
Turning on JSLint and other options
Turn on JSLint like:You can pass other options in a similar way.
The clean script
When you generate a JavaScriptMVC application, it comes with a steal script. You can modify the options in this file.
Ignoring Files
To ignore a file from your application, mark it as clean with a comment like:
The steal.clean function
Takes a relative path to a file on the filesystem; checks if it is a html page or a single js file; runs beautify on it then optionally runs JSLint.