• [Bower] Bower


     
     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 });
  • 相关阅读:
    DokuWiki用storage的模式在sae上部署后速度太慢
    让禅道也可以玩BearyChat
    探讨c#中的unchecked是什么意思,起什么作用?
    重温Java的类加载机制
    JVM原理和优化
    为什么使用Redis
    高性能Web服务器Nginx及相关新技术的应用实践-张宴
    潘加宇--领域驱动设计和利润
    程序员跳槽全攻略
    EA强大的画图工具---设计数据库表格
  • 原文地址:https://www.cnblogs.com/Answer1215/p/4177410.html
Copyright © 2020-2023  润新知