jQuery Startr: A starter kit for your jQuery Development
This is a work in progress.
- Clone the repository
- Develop your project in
- cd to the
build/folder, then run
ant build(or just
ant) which will create an optimized build of your app in
ant minifyif you want further html compression)
For non github user, you could download this prepackaged build of jQuery Startr.
build/holds build-related script and tools (including requirejs)
public/folder is where the actual development takes place.
support/folder aims to contain all external libs and dependencies that this repo can use.
publish/can be generated using the build script and contains an optimized version of
public/. This folder is .gitignored by default in this repo.
For the time being, this repo contains a starting example using RequireJS, Sammy, jQuery and the hthml5boilerplate files structure and build script (configured in a way that it uses require's optimization tool for the JS part).
- The file
public/js/app/main.jsis the starting point for your development. You can write code in this file, use it to express dependencies on other files, or both. Though, this file should be used only for bootstrapping code.
src/index.htmlfile loads the file located at
src/js/app/main.js, which in turn asynchronously loads
src/js/libs/sammy.js. Sammy is registered as an ASM module, jQuery is registered as is internally by requirejs.
- The file
build/build.xml(coming from h5b) is slightly modified to deal with RequireJS optimization tool that reads the build file at
build/config/build.js, which contains instructions to RequireJS on how to build the files for production. RequireJS creates a single file that includes jQuery, Sammy, your application's code, and all associated dependencies as specified within your application's code.
- html5boilerplate - as a starter kit template
- Modernizr - as a feature tester (part of h5b)
- jQuery - as a base core library (part of h5b)
- QUnit - solid unit testing solution (part of h5b)
- jQuery UI - as a widget and UI library. focus on $.widget.
- RequireJS - as a dependency management and build system.
- Sammy - as a router and front controller solution.
- Undescore - as a fantastic and really solid utility library.
- Amplify - as a set of components (Request, Store, Pub/Sub) for data management and application communication.
- EasyXDM - cross domain communication.
- jQuery Mockjax - as an handy mocking tool for ajax requests with jQuery
At a glance, jQuery Startr has the goal of allowing you to get started in a new project that makes use of these components (or not, depending on your needs) in less than 5 minutes. It also tries to promote some basic best practices while enforcing you to adopt a more modular and less DOM-centric approach of solving problems.
Most of these components are available as submodules in the
Customizing jQuery startr
Just like the really nifty HTML5Boilerplate which this project is based upon, jQuery Startr claims itself delete-key friendly :) Feel free to kill off any tools or parts you don't feel the need.