Сначала видео: Конференция JSLab, образовательного проекта для IT-специалистов GeeksLab, 28.03.2015
Грибанов Александр. "Yeoman - избавляемся от рутинных задач"
"В докладе пойдет речь о современных средствах автоматизации web разработки, начиная от создания структуры проекта и заканчивая разворачиваем приложения.
Рассмотрим популярные генераторы приложений и вы узнаете как написать свой
Затронем тему Grunt и Gulp, разберемся в чем разница"
Затем лог установки Yeoman
Опубликовано: 7 апр. 2015 г.
Yeoman getting started - как установить и запустить чужое приложение, а можно еще создать свое, страница тоже называется "getting started"
generator-bootstrap-kickstart
bootstrap-kickstart
Handlebars is largely compatible with Mustache templates. In most cases it is possible to swap out Mustache with Handlebars and continue using your current templates. Complete details can be found here.
cmder Cmder is a software package created out of pure frustration over the absence of nice console emulators on Windows. It is based on amazing software, and spiced up with the Monokai color scheme and a custom prompt layout. Looking sexy from the start.
####Gulp
Устанавливаем Yeoman¶
#0. Unzip portable console for windows - "cmder" to "F:\software"
#1. install yeoman globally
F:\stradorusite\yoman>npm install -g yo
#2. install generator-bootstrap-kickstart
F:\stradorusite\yoman>npm install -g generator-bootstrap-kickstart
#3.
yo bootstrap-kickstart help
Далее вместо help пошла установка:
F:\stradorusite\yoman\generator-bootstrap-kickstart (generator-name@0.1.0)
λ yo bootstrap-kickstart help
? ==========================================================================
We're constantly looking for ways to make yo better!
May we anonymously report usage statistics to improve the tool over time?
More info: https://github.com/yeoman/insight & http://yeoman.io
========================================================================== Yes
_-----_
| | .--------------------------.
|--(o)--| | Yozen, welcome to the |
`---------´ | ace Bootstrap Kickstart |
( _´U`_ ) | generator! |
/___A___\ '--------------------------'
| ~ |
__'.___.'__
´ ` |° ´ Y `
? What’s the name of your project? jplayer_page_1
? A short description of your project: Landing with jplayer list
? What would you like to name your Bootstrap theme in the less-files? jplayer_1
? Do you need to support Internet Explorer below IE9? Yes
? With how many boilerplate code you like to get started with? Just a little – Get started with a few example
files
? Do you like change the default output paths `dist`, `docs`, `reports`? No
? Choose a license for you project Apache License, Version 2.0
? What’s your Name? (used in package.json, bower.json and license) drykiss
? What’s the the URL of your website? (not the projects website if they differ – used in package.json and Lice nse)
? What initial version should we put in the bower.json and package.json files? 0.0.1
? Do you like to add additional info to bower.json and package.json? (email address, projects homepage, reposi tory etc.) No
? Do you like to add your production ready files (`dist` directory) to version control? Yes
create bower.json
conflict package.json
? Overwrite package.json? overwrite
force package.json
create .editorconfig
create .jshintrc
create .eslintrc
create assets\js\.eslintrc
create .bowerrc
create .gitignore
create .postinstall.js
create templates\default.hbs
create templates\helpers\helpers.js
create partials\footer.hbs
create partials\navbar.hbs
create index.hbs
create demoElements.hbs
create stickyFooter.hbs
create README.md
create Gruntfile.js
create LICENSE
create humans.txt
create CONTRIBUTING.md
create assets\fonts\font-placeholder.md
create assets\img\image-placeholder.md
create assets\js\base.js
create assets\js\moduleSkeleton.js
create assets\less\base.less
create assets\less\index.less
create assets\less\print.less
create assets\less\jplayer-1.less
create assets\less\jplayer-1\alerts.less
create assets\less\jplayer-1\demoElements.less
create assets\less\jplayer-1\footer.less
create assets\less\jplayer-1\ribbon.less
create assets\less\jplayer-1\mixins.less
create assets\less\jplayer-1\scaffolding.less
create assets\less\jplayer-1\testResponsiveHelpers.less
create assets\less\jplayer-1\variables.less
I'm all done. Running npm install & bower install for you to install the required dependencies.
If this fails, try running the command yourself.
npm WARN deprecated lodash@0.9.2: Grunt needs your help! See https://github.com/gruntjs/grunt/issues/1403.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases.
Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
loadDep:engine.io-client | |############################----------------------------------------------------|
Загрузка шла подозительно долго, но после огромной древовидной выдачи выскочили вот эти сообщения:
| `-- pinkie@2.0.4
+-- temp@0.8.3 extraneous
+-- time-grunt@1.2.2
| +-- date-time@1.0.0
| +-- figures@1.4.0
| +-- number-is-nan@1.0.0
| `-- pretty-ms@2.1.0
| +-- is-finite@1.0.1
| +-- parse-ms@1.0.1
| `-- plur@1.0.0
`-- when@3.7.7 extraneous
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! phantomjs@1.9.19 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs@1.9.19 install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs phantomjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! F:\stradorusite\yoman\generator-bootstrap-kickstart\npm-debug.log
bower not-cached git://github.com/twbs/bootstrap.git#3.3.5
bower resolve git://github.com/twbs/bootstrap.git#3.3.5
bower not-cached git://github.com/jquery/jquery-dist.git#1.11.3
bower resolve git://github.com/jquery/jquery-dist.git#1.11.3
bower not-cached git://github.com/scottjehl/Respond.git#1.4.2
bower resolve git://github.com/scottjehl/Respond.git#1.4.2
bower not-cached git://github.com/aFarkas/html5shiv.git#3.7.3
bower resolve git://github.com/aFarkas/html5shiv.git#3.7.3
bower not-cached git://github.com/mathiasbynens/jquery-placeholder.git#2.3.0
bower resolve git://github.com/mathiasbynens/jquery-placeholder.git#2.3.0
bower download https://github.com/aFarkas/html5shiv/archive/3.7.3.tar.gz
bower download https://github.com/jquery/jquery-dist/archive/1.11.3.tar.gz
bower download https://github.com/scottjehl/Respond/archive/1.4.2.tar.gz
bower download https://github.com/mathiasbynens/jquery-placeholder/archive/v2.3.0.tar.gz
bower extract jquery-placeholder#2.3.0 archive.tar.gz
bower extract respondJs#1.4.2 archive.tar.gz
bower download https://github.com/twbs/bootstrap/archive/v3.3.5.tar.gz
bower extract html5shiv#3.7.3 archive.tar.gz
bower resolved git://github.com/mathiasbynens/jquery-placeholder.git#2.3.0
bower resolved git://github.com/scottjehl/Respond.git#1.4.2
bower resolved git://github.com/aFarkas/html5shiv.git#3.7.3
bower extract jquery#1.11.3 archive.tar.gz
bower resolved git://github.com/jquery/jquery-dist.git#1.11.3
bower extract bootstrap#3.3.5 archive.tar.gz
bower resolved git://github.com/twbs/bootstrap.git#3.3.5
bower extra-resolution Unnecessary resolution: jquery#1.11.3
bower install jquery-placeholder#2.3.0
bower install respondJs#1.4.2
bower install html5shiv#3.7.3
bower install jquery#1.11.3
bower install bootstrap#3.3.5
jquery-placeholder#2.3.0 libs\jquery-placeholder
└── jquery#1.11.3
respondJs#1.4.2 libs\respondJs
html5shiv#3.7.3 libs\html5shiv
jquery#1.11.3 libs\jquery
bootstrap#3.3.5 libs\bootstrap
└── jquery#1.11.3
_-----_
| | .--------------------------.
|--(o)--| | That’s it! You’re all |
`---------´ | set to begin working |
( _´U`_ ) | with Bootstrap ✌(-‿-)✌ |
/___A___\ | |
| ~ | | Enter `grunt tasks` to |
__'.___.'__ | see the available Grunt |
´ ` |° ´ Y ` | tasks. |
'--------------------------'
F:\stradorusite\yoman\generator-bootstrap-kickstart (jplayer-page-1@0.0.1)
F:\stradorusite\yoman>npm install -g generator-webapp
F:\stradorusite\yoman\webapp
λ yo webapp
_-----_
| | .--------------------------.
|--(o)--| | 'Allo 'allo! Out of the |
`---------´ | box I include HTML5 |
( _´U`_ ) | Boilerplate, jQuery, and |
/___A___\ | a gulpfile to build your |
| ~ | | app. |
__'.___.'__ '--------------------------'
´ ` |° ´ Y `
? What more would you like? Sass, Bootstrap, Modernizr
create bower.json
create package.json
create gulpfile.babel.js
create .babelrc
create .gitignore
create .gitattributes
create .bowerrc
create .editorconfig
create app\favicon.ico
create app\apple-touch-icon.png
create app\robots.txt
create app\styles\main.scss
create app\scripts\main.js
create app\index.html
create test\spec\test.js
create test\index.html
I'm all done. Running npm install & bower install for you to install the required dependencies. If this fails, try running the command yourself.
loadDep:glob -> cache / |###########################-----------------------------------------------------|
| `-- supports-color@0.2.0
+-- glob@4.5.3
+-- lodash@2.4.2
+-- propprop@0.3.0
`-- through2@0.6.5
`-- readable-stream@1.0.33
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
bower not-cached git://github.com/twbs/bootstrap-sass.git#~3.3.5
bower resolve git://github.com/twbs/bootstrap-sass.git#~3.3.5
bower not-cached git://github.com/Modernizr/Modernizr.git#~2.8.1
bower resolve git://github.com/Modernizr/Modernizr.git#~2.8.1
bower download https://github.com/Modernizr/Modernizr/archive/v2.8.3.tar.gz
bower download https://github.com/twbs/bootstrap-sass/archive/v3.3.6.tar.gz
bower extract bootstrap-sass#~3.3.5 archive.tar.gz
bower extract modernizr#~2.8.1 archive.tar.gz
bower invalid-meta modernizr is missing "main" entry in bower.json
bower invalid-meta modernizr is missing "ignore" entry in bower.json
bower resolved git://github.com/Modernizr/Modernizr.git#2.8.3
bower resolved git://github.com/twbs/bootstrap-sass.git#3.3.6
bower cached git://github.com/jquery/jquery-dist.git#1.11.3
bower validate 1.11.3 against git://github.com/jquery/jquery-dist.git#>= 1.9.0
bower new version for git://github.com/jquery/jquery-dist.git#>= 1.9.0
bower resolve git://github.com/jquery/jquery-dist.git#>= 1.9.0
bower download https://github.com/jquery/jquery-dist/archive/2.2.1.tar.gz
bower extract jquery#>= 1.9.0 archive.tar.gz
bower resolved git://github.com/jquery/jquery-dist.git#2.2.1
bower install modernizr#2.8.3
bower install bootstrap-sass#3.3.6
bower install jquery#2.2.1
modernizr#2.8.3 bower_components\modernizr
bootstrap-sass#3.3.6 bower_components\bootstrap-sass
└── jquery#2.2.1
jquery#2.2.1 bower_components\jquery
bower not-cached git://github.com/chaijs/chai.git#*
bower resolve git://github.com/chaijs/chai.git#*
bower not-cached git://github.com/mochajs/mocha.git#*
bower resolve git://github.com/mochajs/mocha.git#*
bower download https://github.com/chaijs/chai/archive/3.5.0.tar.gz
bower download https://github.com/mochajs/mocha/archive/v2.4.5.tar.gz
bower extract chai#* archive.tar.gz
bower resolved git://github.com/chaijs/chai.git#3.5.0
bower extract mocha#* archive.tar.gz
bower resolved git://github.com/mochajs/mocha.git#2.4.5
bower install chai#3.5.0
bower install mocha#2.4.5
chai#3.5.0 bower_components\chai
mocha#2.4.5 bower_components\mocha
# 1. make dir with generator- prefix
F:\stradorusite\yoman>mkdir generator-bootstrap-kickstart
# 2. create a package.json file
{
"name": "generator-bootstrap-kickstart",
"version": "0.1.0",
"description": "",
"files": [
"app",
"router"
],
"keywords": ["yeoman-generator"],
"dependencies": {
"yeoman--bootstrap-kickstart": "^0.20.2"
}
}
Посты чуть ниже также могут вас заинтересовать
Комментариев нет:
Отправить комментарий