Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions app/config/versions.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
module.exports = {
libs: {
'bem-core': 'v2.8.0',
'bem-components': 'v2.3.0'
'bem-core': 'v2.9.1',
'bem-components': 'v2.5.1'
},
deps: {
// enb
enb: '^0.17.2',
enb: '^1.1.2',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[email protected] brings backward incompatible changes, so generator will not work.

'enb-autoprefixer': '^0.3.1',
'enb-bemxjst': '^2.0.2',
'enb-bem-techs': '^2.0.1',
'enb-bh': '^1.0.0',
'enb-borschik': '^2.0.0',
'enb-js': '^1.0.0',
'enb-bemxjst': '^6.2.0',
'enb-bem-techs': '^2.2.1',
'enb-bh': '^1.2.0',
'enb-borschik': '^2.4.0',
'enb-js': '^1.1.0',
'enb-modules': '^0.2.0',
'enb-stylus': '^2.0.0',
'enb-stylus': '^2.3.2',
'enb-beautify': '^0.0.3',

// bem-tools
bem: '^0.10.1',
bem: '^0.10.2',

bower: '^1.5.3',
'borschik-tech-cleancss': '^2.0.1'
bower: '^1.7.7',
'borschik-tech-cleancss': '^2.1.0'
}
};
10 changes: 0 additions & 10 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ var BemGenerator = yeoman.generators.Base.extend({
name: 'email',
message: 'Enter an email of the project owner:',
'default': this.user.git.email() || '[email protected]'
}, {
type: 'list',
name: 'assembler',
message: 'Choose a toolkit to build the project:',
choices: [{
name: 'ENB',
value: 'enb'
}, {
value: 'bem-tools'
}]
}, {
type: 'checkbox',
name: 'addLibraries',
Expand Down
26 changes: 8 additions & 18 deletions app/templates/.enb/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,20 @@ module.exports = function (config) {
}]<% } %><% if (technologies.inTechs['bemtree']) { %>,
// bemtree
[require('enb-bemxjst/techs/bemtree'), {
devMode: process.env.BEMTREE_ENV === 'development',
compact: true
sourceSuffixes: ['bemtree', 'bemtree.js']
}]<% } %><% if (technologies.inTechs['node.js']) { %>,
// node.js
[require('enb-js/techs/node-js'), { target: '?.pre.node.js' }],
[require('enb-modules/techs/prepend-modules'), {
source: '?.pre.node.js',
target: '?.node.js'
}]<% } %><% if (technologies.inTechs['browser.js']) { %>,
[require('enb-js/techs/node-js'), { includeYM: true }]<% } %><% if (technologies.inTechs['browser.js']) { %>,
// browser.js
[require('enb-js/techs/browser-js'), { target: '?.browser.js' }],
[require('enb-js/techs/browser-js'), { includeYM: true }],
[require('enb/techs/file-merge'), {
target: '?.pre.js',
target: '?.js',
sources: ['?.browser.<%=technologies.inTechs["bemhtml"] ? "bemhtml" : "bh"%>.js', '?.browser.js']
}],
[require('enb-modules/techs/prepend-modules'), {
source: '?.pre.js',
target: '?.js'
}]<% } %><% if (technologies.inTechs['bemhtml']) { %>,
}]
<% } %><% if (technologies.inTechs['bemhtml']) { %>,
// bemhtml
[require('enb-bemxjst/techs/bemhtml'), {
devMode: process.env.BEMHTML_ENV === 'development',
compact: true
sourceSuffixes: ['bemhtml', 'bemhtml.js']
}]<% } %><% if (technologies.inTechs['bemhtml'] && technologies.inTechs['browser.js']) { %>,
// client bemhtml
[enbBemTechs.depsByTechToBemdecl, {
Expand All @@ -73,8 +64,7 @@ module.exports = function (config) {
[require('enb-bemxjst/techs/bemhtml'), {
target: '?.browser.bemhtml.js',
filesTarget: '?.bemhtml.files',
devMode: process.env.BEMHTML_ENV === 'development',
compact: true
sourceSuffixes: ['bemhtml', 'bemhtml.js']
}]<% } %><% if (technologies.inTechs['bh']) { %>,
// bh
[require('enb-bh/techs/bh-commonjs'), {
Expand Down
2 changes: 1 addition & 1 deletion app/templates/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ libs/
# bem
.enb/tmp/
*.bundles*/*/*.*
<%= isBemjson ? '!*.bundles*/*/*.bemjson.js' : '!*.bundles*/*/*.bemdecl.js' %><%= assemblerName === 'bem-tools' ? '\n!*.bundles*/.bem/*' : '' %>
!*.bundles*/*/*.bem<%= isBemjson ? 'json' : 'decl' %>.js
10 changes: 6 additions & 4 deletions app/templates/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{
"name": "<%= projectName %>",
"description": "BEM project",
"version": "0.0.0",
"version": "1.0.0",
"author": {
"name": "<%= author %>",
"email": "<%= email %>"
},
"repository": {},
"engines": {
"node": ">=0.10.0"
"node": ">=4.0.0"
},
"dependencies": {
"bower": "^1.7.9"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want bower as a dependency, but not as devDependency (as it is implemented now) you should remove it from here.

Because in current implementation of your pull request bower will be added to dependencies and devDependencies both , so npm logs warning:

s3j2j-2016-05-12_16-40-59

},
"devDependencies": {
<%= _.map(technologies.inJSON, function(technology) { return ' "' + technology.name + '": "' + technology.version + '"'}).join(',\n') %>
},
"scripts": {
"start": "enb server",
"postinstall": "npm run deps",
"deps": "bower install",
"postinstall": "npm run deps"
"deps": "bower i --allow-root"
},
"private": true
}