1 //search 2 bower search jquery 3 4 bower search jquery | grep formstyler 5 6 //info 7 bower info jquery 8 9 //install (lastest one) 10 bower install jquery 11 12 //install # version 13 bower install jquery#1.10 14 bower install prism --save-dev //add to bower.json file 15 //install dependencies according to bower.json 16 bower install 17 18 //uninstall 19 bower uninstall jquery 20 21 //mainfest file 22 bower init 23 //a bower.json will be created, inside it 24 "dependencies": { 25 //<name>, <version> 26 "jquery": "2.0.1", 27 "moment": "2.0.0" 28 //<name>, <package> 29 //<name>, <folder> 30 } 31 32 //.bowerrc (config file) 33 { 34 "directory": "libs", //all libraries will be install under lib folder 35 "json": "bower.json", 36 .... 37 } 38 39 //if some package is not listed in bower 40 //we can get from git, then add into bower.json 41 //devDependencies 42 "dependencies": { 43 //<name>, <version> 44 "jquery": "2.0.1", 45 "moment": "2.0.0" 46 //<name>, <package> 47 //<name>, <folder> 48 }, 49 "devDependencies": { 50 "hugrid": "http://github.....git" //head-up gird 51 } 52 53 54 //Modular Javascript -- requireJS 55 //find it on cdnjs 56 <script src="" data-main="main"></script> //read as main.js 57 //inside of main.js 58 require.config({ 59 paths: { 60 "jquery": "libs/jquery/jquery.min", 61 "moment": "libs/moment/moment" 62 } 63 }); 64 65 require(["jquery", "moment"], function($, moment){ 66 console.log(moment("20111111","YYYYMMDD").fromNow()); 67 });