This project is now obsolete, see why in issue #18.
- Check if your javascript files are valid with jshint.
- Compile your javascript files with Uglify JS.
- (Later) Watch your javascript files for jshint while you're coding.
- Create an aggregated file of all your javascripts.
npm install ready.js --global
Usage: readyjs [FILES OR DIRECTORIES] [options]
Options:
-o, --output The file or directory in which to write the output
-c, --config Specify a config.json file
-i, --ignore Ignore these files from JSHint but output them in the aggregated file
-k, --keep Keep individual minified files
--no-recursive Don't recurse in sub-directories
-h, --help Display this help
-v, --version Display the current version
- run
npm install ready.js --global
- run
echo 'readyjs path/to/src -o path/to/dest' >> .git/hooks/pre-commit
You can use a configuration file with ready.js. It has to be a JSON with that format :
{
"output" : "path/to/destination", // The file in which to write the output
"ignore" : [], // Ignore these files from JSHint but output them in the aggregated file
"keep" : false, // Keep individual minified files
"no-recursive" : false // Don't recurse in sub-directories
}
You can create issues.
You can also contribute code :
- Fork the code on GitHub
- Clone your fork in your environment :
git clone git@github.com:USERNAME/ready.js.git
- Create a branch for your feature :
git checkout -b your_branch_name
- Write and delete code and commit as often as you can :
git commit -am "A descriptive message"
- Push the branch to your fork :
git push origin your_branch_name
- Create a pull request on GitHub (click the Pull request button on your fork page)
You can use this function readyjs.compile(sources, [options], callback(err, minified))
ready.compile(['./js', 'lib/cat.js'], {analyse:false}, function(err, minified) {
});
See main file for more information.
ignore
default is[]
: A list of files to ignore. (ex : _jquery*.js)analyze
default istrue
: If should analyze files through jshintrecursive
default istrue
: If should go through directory recursively
err
: The errors that happened. If jshint didn't pass,err
will contain formatted jshint errorsminified
: The aggregated minified code for all files
- Create an issue.
- Write me an email at dsimard@azanka.ca