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 jquery11 12 //install # version13 bower install jquery#1.1014 bower install prism --save-dev //add to bower.json file15 //install dependencies according to bower.json16 bower install17 18 //uninstall19 bower uninstall jquery20 21 //mainfest file22 bower init 23 //a bower.json will be created, inside it24 "dependencies": {25 //, 26 "jquery": "2.0.1",27 "moment": "2.0.0"28 // , 29 // , 30 }31 32 //.bowerrc (config file)33 {34 "directory": "libs", //all libraries will be install under lib folder35 "json": "bower.json",36 ....37 }38 39 //if some package is not listed in bower40 //we can get from git, then add into bower.json41 //devDependencies42 "dependencies": {43 // , 44 "jquery": "2.0.1",45 "moment": "2.0.0"46 // , 47 // , 48 },49 "devDependencies": {50 "hugrid": "http://github.....git" //head-up gird51 }52 53 54 //Modular Javascript -- requireJS55 //find it on cdnjs56 //read as main.js57 //inside of main.js58 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 });