Mobile Build Tool
npm install mbt
|2||downloads in the last month|
|Version||0.1.1 last updated 2 years ago|
Mobile Build Tool
The tool is a set of libraries and tasks to help you install, configure, build, and maintain your mobile project based on Backbone.js and jQuery Mobile. This project is based on wonderful library called Grunt.
The tool is opinionated. AMD is popular these days but we decided to keep it 'simple' and use $script.js for loading resources in development. During release everything is minified and bundled into one file ready for production.
By default MBT currently includes:
- Underscore.js v1.3.3 we are also reviewing Lo-Dash
- Backbone.js v0.9.2
- jQuery v1.7.2
- jQuery Mobile v1.1.0
- jquerymobile-router v0.9
npm install -g mbt
Generate new js project:
mkdir PROJECT_FOLDER cd PROJECT_FOLDER mbt init:project npm install ./
Generate new coffee project
For people who prefer CoffeeScript
mkdir PROJECT_FOLDER cd PROJECT_FOLDER mbt init:project:coffee npm install ./
Generated project's folder structure
- collections - backbone collections
- config - app config, namespace, environments
- helpers - app helpers
- models - backbone models
- vendor - vendor dependecies
- views - backbone views
- app.js - starting point for the app
- files.js - array of paths to app source files
- init.js - loads dependecies and initializes JQM, PhoneGap
- router.js - jQM router
- templates.js - compiled templates from
- coffee - similar structure to js folder if coffee is your cup of tea...
- templates - project templates compiled into
- views - jQuery Mobile pages appended into body element in
Watch for changes in templates, views and styles:
Views will be minified and appended to body element in
CSS files will be minified and compiled into one file called
CoffeeScript files will be compiled into corresponding files under
Release for PhoneGap
files.js file into one file:
cordova.js (the PhoneGap source file) to files list before minifaction.
app.js and images are copied into
phonegap/android/assets/www folders and are ready for PhoneGap.
- command line generator for models, collections, views
- better release task to allow for releasing into different envs (dev, test, prod)
- add support for different templating systems
(The MIT License) Copyright (c) 2012 Incandescent Software Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.