Skip to content

Commit

Permalink
Resolve pr notations from @blond
Browse files Browse the repository at this point in the history
  • Loading branch information
tormozz48 committed Jul 6, 2015
1 parent 6d8431b commit 8fffd08
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
21 changes: 7 additions & 14 deletions techs/borschik.js
Expand Up @@ -18,19 +18,18 @@ var vow = require('vow'),
*
* Also has ability to override links to *.js and *.css files inside bemtree templates
*
* @param {Object} [options] Options
* @param {String} [options.target] Path to target with compiled file.
* @param {String} [options.source] Path to source file which should be processed.
* @param {String[]} [options.dependantFiles] Files with given suffixes must be built before this tech execution.
* @param {Object} options] Options
* @param {String} options.target Path to target with processed file.
* @param {String} options.source Path to source file which should be processed.
* @param {String[]} [options.dependantFiles] Files that must be built before this tech execution.
* @param {Boolean} [options.minify=true] Minimize file during borschik processing.
* @param {Boolean} [options.freeze=false] Freeze links to sources.
* @param {Boolean} [options.noCache=false] Forcibly drop cache usage.
* @param {String} [options.tech] Technology for borschik processing.
* @param {Object} [options.techOptions] Params for 'tech' technology option
*
* @example
* var CssStylus = require('enb-stylus/techs/stylus'),
* CssAutoprefixer = require('enb-autoprefixer/techs/css-autoprefixer'),
* var Css = require('enb/techs/css'),
* Borschik = require('enb-borschik/techs/borschik'),
* FileProvideTech = require('enb/techs/file-provider'),
* bem = require('enb-bem-techs');
Expand All @@ -46,14 +45,7 @@ var vow = require('vow'),
* ]);
*
* // build css file
* node.addTechs([
* [CssStylus, { target: '?.noprefix.css' }],
* [CssAutoprefixer, {
* sourceTarget: '?.noprefix.css',
* destTarget: '?.css',
* browserSupport: ['last 2 versions', 'ie 10', 'opera 12.16']
* }]
* ]);
* node.addTechs(Css);
*
* // minimize and freeze links inside *.css file by borschik
* node.addTech([Borschik, {
Expand All @@ -71,6 +63,7 @@ module.exports = require('enb/lib/build-flow').create()
.name('borschik')
.target('target')
.useSourceFilename('source')
.defineRequiredOption('source')
.useSourceListFilenames('dependantFiles')
.optionAlias('target', 'destTarget')
.optionAlias('source', 'sourceTarget')
Expand Down
18 changes: 5 additions & 13 deletions techs/js-borschik-include.js
Expand Up @@ -12,15 +12,13 @@ var EOL = require('os').EOL;
* https://en.bem.info/tools/optimizers/borschik/js-include
* https://ru.bem.info/tools/optimizers/borschik/js-include
*
* @param {Object} [options] Options
* @param {String} [options.target] Path to target with compiled file.
* @param {Object} options Options
* @param {String} options.target Path to target with compiled file.
* @param {String[]} [options.sourceSuffixes=['js']] Files with specified suffixes involved in the assembly.
*
* @example
* var BrowserJs = require('enb-diverse-js/techs/browser-js'),
* YModules = require('enb-modules/techs/prepend-modules'),
* BorschikJsInclude = require('enb-borschik/techs/js-borschik-include'),
* Borschik = require('enb-borschik/techs/borschik'),
* FileProvideTech = require('enb/techs/file-provider'),
* bem = require('enb-bem-techs');
*
Expand All @@ -35,17 +33,11 @@ var EOL = require('os').EOL;
* ]);
*
* // build js file
* node.addTechs([
* [BrowserJs, { target: '?.pre.js' }],
* [YModules, { target: '?.js', source: '?.pre.js'}],
* ]);
* node.addTechs([BrowserJs, { target: '?.js' }]);
*
* // open js include declarations
* // minimize and freeze links inside *.js file by borschik
* node.addTechs([
* BorschikJsInclude,
* [Borschik, { source: '?.js', target: '_?.js', freeze: true, minify: true }]
* ]);
* node.addTech(BorschikJsInclude);
*
* node.addTarget('_?.js');
* });
* };
Expand Down

0 comments on commit 8fffd08

Please sign in to comment.