awinogradov / generator-bem-ng Goto Github PK
View Code? Open in Web Editor NEWYeoman generator for AngularJS applications on BEM methodology
Home Page: http://ru.bem.info/built-with-b
Yeoman generator for AngularJS applications on BEM methodology
Home Page: http://ru.bem.info/built-with-b
This solve #14
Думаю не верно указывать переменные окружения в make.js
, будет правильно выделить их в документацию
export YENV=production
export XJST_ASYNCIFY=yes
export BEM_MAKE_NO_COLORS=yes
export BEM_MAKE_VERBOSITY=error
хотя, если они переопределяются то это не важно.
Use browser-sync for pretty development
после выполнения сборки, путь на стили и скрипты остается прежним:
...
<!--[if gt IE 9]><!-->
<link rel="stylesheet" href="_index.css"/>
<!--<![endif]--><!--[if gte IE 6]>
<link rel="stylesheet" href="_index.ie.css"/><![endif]-->
...
<script src="_index.js"></script>
...
Now project-stub structure located in the templates folder. And copied during execution generator. Bad way.
Include methods from generator-bem-stub
Write BundlesLevelNode in make.js and name for merged bundle to project.json
Now is one level only
csscomb, image min, css min, js min and other
Automatic documentation system
Will be cut from bem-protein
Maybe get it from angularjs Yeoman generator
Watch it here project-stub. New project-stub use Bower for managing libs(like bem-core and bem-components) and now directory .bem not need on the levels.
Now structure for blocks and levels copied from templates directory. Read about API here
And rename templates directory to views.
bem-protein by example
update to bem-core 2.0.0
update to new bem-components
use bem-techs and delete techs from .bem/techs
use gulp for create dist only
add to readme info about development with bem-server
add bem-tools-autoprefixer
Use this level for connecting with vendors
Add prompt for select pre-proccessor: less, stylus.
Add tech to make.js, levels/*.js, Gruntfile
Edit Grunfile for distribute project. Use borschik freeze for static. Optimize js, css, images.
Release 1.0.0 😹 cool!
Я не понял назначение base и именно в ней описывается уровень *.blocks/base/.bem
из этого следует что блоки создаются в ней bem create -l desktop.blocks/base -b myblock
, какой work flow ты предполагаешь?
If not, images will be near block files.
Solve #14
Files for editing: app/templates/app.bundles/.bem/level.js and app/index.js
Get from here
Default techs: js, css, bemhtml, md.
md langs also get from project.json
Also insert techs to Gruntfile
$ sudo npm i verybigman/generator-bem -g
$ mkdir project && cd $_
$ yo bem && yo bem:init
$ bem make
$ bem create -l blocks -b test
Error: Tech module with path '/home/ilyar/project/libs/bem-core/.bem/techs/browser.js.js' not found on require search paths
$ node -v && npm -v && yo -v && bem -v
v0.10.26
1.4.3
1.1.2
0.7.8
проблема в файле .bem/levels/blocks.js
:
var PATH = require('path'),
environ = require('bem-environ'),
join = PATH.join,
решается в сгенерированном проекте так:
var PATH = require('path'),
- environ = require('bem-environ'),
+ environ = require('bem-environ')({ libDir: 'Значение из project.json:libDir' })
join = PATH.join,
В проекте есть шаблон только для init/templates/_bundles.js
, вероятно ..bem/levels/blocks.js
берется как есть из project-stub, поэтому не понятно что пулреквестить.
Now work fine with bundles for one page, but this is bad. For repeat this bug set 2 or more pages in top of Gruntfile.
npm install -g yo generator-bem
mkdir test_bem_gen && cd $_
yo bem
grunt
...
Running "exec:mkdirs" (exec) task
>> �訡�� � ᨭ⠪���� �������.
>> Exited with code: 1.
Warning: Task "exec:mkdirs" failed. Use --force to continue.
Aborted due to warnings.
Remove chaos in 'exec' section.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.