zoukankan      html  css  js  c++  java
  • Yeoman

    Yeoman - scaffold JavaScript Web Application (setup new JavaScript web app quickly)

    depend on two tools:
    -Grunt, JavaScript task runner
    -Bower, A package manager for web

    step0, install Node.js and NPM
    step1, install Grunt: # npm install -g grunt-cli
    step2, install Bower: # npm install -g bower
    step3, install Yeoman: # npm -g install yo

    step4, install Yeoman generator for Marionette.js: # npm install -g generator-marionette
    step5, install Mocha generator(Marionette generator required): # npm install -g generator-mocha-amd

    step6, create Marionette Application:

      # mkdir webapptest
          # cd webapptest
          # yo marionette

    step7, run application: # grunt

    备注:

    使用grunt命令时会报错误

    grunt-cli: The grunt command line interface. (v0.1.13)
    
    Fatal error: Unable to find local grunt.
    
    If you're seeing this message, either a Gruntfile wasn't found or grunt
    hasn't been installed locally to your project. For more information about
    installing and configuring grunt, please see the Getting Started guide:
    
    http://gruntjs.com/getting-started
    

     原因是:Grunt.js 0.4之后,其不再使用全局方式安装整个Grunt.js,而是在全局安装Grunt.js Client,然后在当前项目中安装Grunt,来避免未来不同项目对Grunt不同版本的依赖关系。

    step8, 更近一步: # npm install grunt --save-dev

    报错:

    Loading "Gruntfile.js" tasks...ERROR
    >> Error: Cannot find module 'grunt-contrib-livereload/lib/utils'
    Warning: Task "default" not found. Use --force to continue.
    
    Aborted due to warnings.
    

    安装所有依赖:

     # npm install

    可使用Gulp来作为build tools.

    Reference:
    1. http://yeoman.io/generators/ for more generator
    2. build tool(Grunt/Gulp), package manager(Bower/npm)

    3. 主要参考

  • 相关阅读:
    CodeForces 681D Gifts by the List (树上DFS)
    UVa 12342 Tax Calculator (水题,纳税)
    CodeForces 681C Heap Operations (模拟题,优先队列)
    CodeForces 682C Alyona and the Tree (树上DFS)
    CodeForces 682B Alyona and Mex (题意水题)
    CodeForces 682A Alyona and Numbers (水题,数学)
    Virtualizing memory type
    页面跳转
    PHP Misc. 函数
    PHP 5 Math 函数
  • 原文地址:https://www.cnblogs.com/wangyinhui/p/4342541.html
Copyright © 2011-2022 走看看