From d99d0053e77a58a09066dde69142935c6d569bf0 Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 17 Jun 2015 00:46:27 +0300 Subject: [PATCH 1/5] Simplify npm scripts --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9da2055..6ac0801 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ "license": "Commercial License", "scripts": { "test": "echo \"Error no any test specified yet. \" && exit 1", - "init": "cd server && npm i && cd ../static && npm i && ./node_modules/.bin/bower i && ./node_modules/.bin/enb make", - "server": "cd ./static && ./node_modules/.bin/enb make && cd .. && node server", + "init": "cd server && npm i && cd ../static && npm i && bower i && enb make", + "server": "cd ./static && enb make && cd .. && node server", "serverOnly": "node server", - "jscs": "./node_modules/jscs/bin/jscs --verbose ./server", - "jshint": "./node_modules/jshint/bin/jshint --verbose ./server", + "jscs": "jscs --verbose ./server", + "jshint": "jshint --verbose ./server", "csslint": "./node_modules/csslint/cli.js ./static --exclude-list=./static/node_modules/,./static/vendors/", "codestyle": "npm run jscs && npm run jshint && npm run csslint" }, @@ -31,4 +31,4 @@ "precommit-hook": "latest" } -} \ No newline at end of file +} From 212a976bef4441cf58a6e39326d0fb135a14fd75 Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 17 Jun 2015 00:47:33 +0300 Subject: [PATCH 2/5] Fix typo --- static/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/package.json b/static/package.json index d366732..b39eaf2 100755 --- a/static/package.json +++ b/static/package.json @@ -1,6 +1,6 @@ { "name": "bemongo-stub", - "version": "0.0.1", + "version": "0.0.2", "author": "Anton Konev ", "dependencies": { "enb": "~0.15.0", From a431647e85f05ba51fb904a07c087829ba0b811d Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 17 Jun 2015 00:48:47 +0300 Subject: [PATCH 3/5] bower: Specify version of bem-components --- static/bower.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/bower.json b/static/bower.json index 73a41ca..c999b5e 100755 --- a/static/bower.json +++ b/static/bower.json @@ -10,7 +10,6 @@ "tests" ], "dependencies": { - "bem-core": "git://github.com/bem/bem-core.git", - "bem-components": "git://github.com/bem/bem-components.git" + "bem-components": "^2.2.1" } } From b050e01c11d7c285815ced4cdbc8647f2bed7b2d Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 17 Jun 2015 00:55:27 +0300 Subject: [PATCH 4/5] bower: vendors -> libs --- .gitignore | 4 ++-- static/.bowerrc | 2 +- static/.enb/make.js | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index a0c2f63..760a0ed 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,9 @@ npm-debug.log *.log node_modules static/node_modules -static/vendors +static/libs static/.enb/tmp static/desktop.bundles/*/* !static/desktop.bundles/*/blocks !static/desktop.bundles/*/*.bemjson.js -!static/desktop.bundles/*/*.bemdecl.js \ No newline at end of file +!static/desktop.bundles/*/*.bemdecl.js diff --git a/static/.bowerrc b/static/.bowerrc index b4eb29f..c0ccf32 100755 --- a/static/.bowerrc +++ b/static/.bowerrc @@ -1,3 +1,3 @@ { - "directory": "vendors" + "directory": "libs" } diff --git a/static/.enb/make.js b/static/.enb/make.js index d393b08..0c51f41 100755 --- a/static/.enb/make.js +++ b/static/.enb/make.js @@ -43,11 +43,11 @@ module.exports = function(config) { config.nodeMask(/desktop.bundles\/.*/, function(nodeConfig) { function getLevels() { return [ - {"path":"vendors/bem-core/common.blocks","check":false}, - {"path":"vendors/bem-core/desktop.blocks","check":false}, - - {"path":"vendors/bem-components/common.blocks","check":false}, - {"path":"vendors/bem-components/desktop.blocks","check":false}, + {"path":"libs/bem-core/common.blocks","check":false}, + {"path":"libs/bem-core/desktop.blocks","check":false}, + + {"path":"libs/bem-components/common.blocks","check":false}, + {"path":"libs/bem-components/desktop.blocks","check":false}, {"path":"desktop.blocks","check":true} ].map(function(l) { return config.resolvePath(l); }); From 0c06fb47ce7bb90805ae2169bc3e8377dc4aaeff Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 17 Jun 2015 00:56:45 +0300 Subject: [PATCH 5/5] Get rid of ie.css --- static/.enb/make.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/static/.enb/make.js b/static/.enb/make.js index 0c51f41..bf53e08 100755 --- a/static/.enb/make.js +++ b/static/.enb/make.js @@ -13,11 +13,7 @@ module.exports = function(config) { } ], [ require("enb/techs/file-copy"), { sourceTarget: "?.{lang}.js", destTarget: "_?.{lang}.js" } ], - [ require("enb/techs/file-copy"), { sourceTarget: "?.css", destTarget: "_?.css" } ], - [ require("enb/techs/file-copy"), { sourceTarget: "?.ie6.css", destTarget: "_?.ie6.css" } ], - [ require("enb/techs/file-copy"), { sourceTarget: "?.ie7.css", destTarget: "_?.ie7.css" } ], - [ require("enb/techs/file-copy"), { sourceTarget: "?.ie8.css", destTarget: "_?.ie8.css" } ], - [ require("enb/techs/file-copy"), { sourceTarget: "?.ie9.css", destTarget: "_?.ie9.css" } ] + [ require("enb/techs/file-copy"), { sourceTarget: "?.css", destTarget: "_?.css" } ] ]); }); }); @@ -31,11 +27,7 @@ module.exports = function(config) { } ], [ require("enb/techs/borschik"), { sourceTarget: "?.{lang}.js", destTarget: "_?.{lang}.js", minify: true, freeze: true } ], - [ require("enb/techs/borschik"), { sourceTarget: "?.css", destTarget: "_?.css", minify: true, freeze: true } ], - [ require("enb/techs/borschik"), { sourceTarget: "?.ie6.css", destTarget: "_?.ie6.css", minify: true, freeze: true } ], - [ require("enb/techs/borschik"), { sourceTarget: "?.ie7.css", destTarget: "_?.ie7.css", minify: true, freeze: true } ], - [ require("enb/techs/borschik"), { sourceTarget: "?.ie8.css", destTarget: "_?.ie8.css", minify: true, freeze: true } ], - [ require("enb/techs/borschik"), { sourceTarget: "?.ie9.css", destTarget: "_?.ie9.css", minify: true, freeze: true } ] + [ require("enb/techs/borschik"), { sourceTarget: "?.css", destTarget: "_?.css", minify: true, freeze: true } ] ]); }); }); @@ -65,12 +57,8 @@ module.exports = function(config) { [ require("enb/techs/i18n-lang-js"), { lang: "{lang}" } ], require('enb/techs/js'), [ require("./enb/techs/js-i18n"), { lang: "{lang}" } ], - require("enb/techs/css"), - [ require("enb/techs/css-ie6"), { sourceSuffixes: ['css', 'ie.css', 'ie6.css'] }], - [ require("enb/techs/css-ie7"), { sourceSuffixes: ['css', 'ie.css', 'ie7.css'] }], - [ require("enb/techs/css-ie8"), { sourceSuffixes: ['css', 'ie.css', 'ie8.css'] }], - [ require("enb/techs/css-ie9"), { sourceSuffixes: ['css', 'ie9.css'] }] + require("enb/techs/css") ]); - nodeConfig.addTargets(["_?.{lang}.js", "?.priv.js", "?.priv.{lang}.js", "_?.css", "_?.ie6.css", "_?.ie7.css", "_?.ie8.css", "_?.ie9.css"]); + nodeConfig.addTargets(["_?.{lang}.js", "?.priv.js", "?.priv.{lang}.js", "_?.css"]); }); };