A skeleton for a jquery plugin with BusterJS for testing and Google Closure Compiler for minification.
A skeleton builder for jquery plugins. Included is BusterJS for testing and Google Closure Compiler for minification.
So first of all you need to create a repository on Github and clone it. Respectively create a new folder.
# clone the repo ...git clone git://github.com/yourname/jquery.plugin-name.git# ... or download the foldermkdir jquery.plugin-name# ... and finally go into the foldercd jquery.plugin-name
Afterwards do this:
# Initialize npm in that new folder and answer the questions.npm init# Add jquery.skeleton to your package.json.npm install jquery.skeleton --save# Execute the init process and let the magic happen.node_modules/.bin/jquery.skeleton init# Start coding!
The major goal of the skeleton is actually to program in a test driven way. So once you ran all of the previous commands, you will get access to BusterJS. Here is how to go on coding:
# Run the BusterJS server.node_modules/.bin/buster-server# Open a new bash.# Point your server to and capture your browser.# Choose one of the following commands or do it just manually.openfirefox# Minify the code in the src folder and run the tests:npm test
jquery.skeleton to the latest version of jquery.skeleton.
# Update your project:node_modules/.bin/jquery.skeleton update
Hereby placed under MIT license.