Skip to content

Commit

Permalink
Merge pull request #79 from enb-bem/jsdoc-update
Browse files Browse the repository at this point in the history
jsdoc: corrections
  • Loading branch information
blond committed Jul 31, 2015
2 parents ac1e2c4 + eb90cdb commit 745ee44
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions lib/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var vowCode = require('./vow-code'),
EOL = require('os').EOL;

/**
* Wrap code of BEMHTML or BEMTREE to bundle.
* Wraps code of BEMHTML or BEMTREE to bundle.
*
* The compiled bundle supports CommonJS and YModules. If there is no any modular system in the runtime,
* the module will be provided as global variable with name specified in `exportName` option.
Expand Down Expand Up @@ -80,12 +80,12 @@ exports.compile = function (code, options) {
};

/**
* Compile code with YModule definition.
* Compiles code with YModule definition.
*
* @ignore
* @param {String} name Module name
* @param {String} name Module name.
* @param {Object} [requires] Names for requires dependencies.
* @param {String} [libs] Required dependencies string representation for yModule system
* @param {String} [libs] Required dependencies string representation for YModule system
* @returns {String}
*/
function compileYModule(name, requires, libs) {
Expand Down
10 changes: 5 additions & 5 deletions lib/vow-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ var fs = require('fs'),
/**
* Code of `vow` module.
*
* Provide to `Vow` variable.
* Provides to `Vow` variable.
*
* This code need for correct work of BEMTREE. Base templates of BEMTREE expect `vow` module from `Vow` variable.
* This code is used for correct work of BEMTREE. Base templates of BEMTREE expect `vow` module from `Vow` variable.
* Without this variable work of BEMTREE will be completed with an error.
*
* @type {String}
*/
module.exports = [
// Prohibit `vow` module to provide itself in modular systems: CommonJS, YModules, AMD
// Prohibits `vow` module to provide itself in modular systems: CommonJS, YModules, AMD.
'var __vow_init = function(module, exports, modules, define){',
contents,
'};',
// Override execution context to `__sandbox`.
// Overrides execution context to `__sandbox`.
// After execution `vow` is available in `__sandbox.vow`.
'var __sandbox = {};',
'__vow_init.apply(__sandbox)',
// Provide module to `Vow` variable
// Provides module to `Vow` variable
'var Vow = __sandbox.vow;'
].join(EOL);
14 changes: 7 additions & 7 deletions techs/bem-xjst.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ var EOL = require('os').EOL,
* It supports only JS syntax by default. Use `compat` option to support old BEMXJST syntax. <br/><br/>
*
* @param {Object} [options] Options
* @param {String} [options.target='?.bem-xjst.js'] Path to target with compiled file.
* @param {String} [options.target='?.bem-xjst.js'] Path to a target with compiled file.
*/
module.exports = require('enb/lib/build-flow').create()
.name('bem-xjst')
.target('target', '?.bem-xjst.js')
.methods({
/**
* Process all given source files. Join them into single file and pass into BEMXJST compiler
* @param {Object[]} sourceFiles — objects that contain file information
* @param {Boolean} oldSyntax — enables transpilation from old syntax to regular JS syntax
* Processes all given source files. Join them into single file and pass into BEMXJST compiler.
* @param {Object[]} sourceFiles — objects that contain file information.
* @param {Boolean} oldSyntax — enables transpilation from old syntax to regular JS syntax.
* @returns {Promise}
* @private
*/
Expand Down Expand Up @@ -59,9 +59,9 @@ module.exports = require('enb/lib/build-flow').create()
}, this);
},
/**
* Uses BEMXJST processor for templates compilation
* Wraps compiled code for usage with different modular systems
* @param {String} source — merged code of templates
* Uses BEMXJST processor for templates compilation.
* Wraps compiled code for usage with different modular systems.
* @param {String} source — merged code of templates.
* @returns {Promise}
* @private
*/
Expand Down
8 changes: 4 additions & 4 deletions techs/bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ var bundle = require('../lib/bundle'),
* Important: It supports only JS syntax by default. Use `compat` option to support old BEMHTML syntax.
*
* @param {Object} [options] Options
* @param {String} [options.target='?.bemhtml.js'] Path to target with compiled file.
* @param {String} [options.target='?.bemhtml.js'] Path to a target with compiled file.
* @param {String} [options.exportName='BEMHTML'] Name of BEMHTML template variable.
* @param {Boolean} [options.compat=false] Set `compat` option to support old BEMHTML syntax.
* @param {Boolean} [options.devMode=true] Set `devMode` option for convenient debugging. If `devMode` is
* @param {Boolean} [options.compat=false] Sets `compat` option to support old BEMHTML syntax.
* @param {Boolean} [options.devMode=true] Sets `devMode` option for convenient debugging. If `devMode` is
* set to true, code of templates will not be compiled but only wrapped for development purposes.
* @param {Boolean} [options.cache=false] Set `cache` option for cache usage.
* @param {Boolean} [options.cache=false] Sets `cache` option for cache usage.
* @param {Object} [options.requires] Names of dependencies which should be available from
* code of templates.
* @param {String[]} [options.sourceSuffixes] Files with specified suffixes involved in the assembly.
Expand Down
4 changes: 2 additions & 2 deletions techs/bemjson-to-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var requireOrEval = require('enb/lib/fs/require-or-eval'),
* This tech uses `BEMHTML.apply(bemjson)` to build HTML.
*
* @param {Object} [options] Options
* @param {String} [options.target='?.html'] Path to target with HTML file.
* @param {String} [options.bemhtmlFile='?.bemhtml.js'] Path to file with compiled BEMHTML module.
* @param {String} [options.target='?.html'] Path to a target with HTML file.
* @param {String} [options.bemhtmlFile='?.bemhtml.js'] Path to a file with compiled BEMHTML module.
* @param {String} [options.bemjsonFile='?.bemjson.js'] Path to BEMJSON file.
*
* @example
Expand Down
12 changes: 6 additions & 6 deletions techs/bemtree.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ var bundle = require('../lib/bundle'),
* Important: It supports only JS syntax by default. Use `compat` option to support old BEMTREE syntax.
*
* @param {Object} [options] Options
* @param {String} [options.target='?.bemtree.js'] Path to target with compiled file.
* @param {String} [options.target='?.bemtree.js'] Path to a target with compiled file.
* @param {String} [options.exportName='BEMTREE'] Name of BEMTREE template variable.
* @param {Boolean} [options.compat=false] Set `compat` option to support old BEMTREE syntax.
* @param {Boolean} [options.devMode=true] Set `devMode` option for convenient debugging.
* @param {Boolean} [options.compat=false] Sets `compat` option to support old BEMTREE syntax.
* @param {Boolean} [options.devMode=true] Sets `devMode` option for convenient debugging.
* If `devMode` is set to true, code of templates will not be compiled but only wrapped for development purposes.
* @param {Boolean} [options.includeVow=true] Set `includeVow` option to include code of `vow` module
* into template file
* @param {Boolean} [options.includeVow=true] Sets `includeVow` option to include code of `vow` module
* into a template file.
* @param {String[]} [options.sourceSuffixes] Files with specified suffixes involved in the assembly.
*
* @example
Expand All @@ -35,7 +35,7 @@ var bundle = require('../lib/bundle'),
* bem.files
* ]);
*
* // build BEMTREE file
* // builds BEMTREE file
* node.addTech(BemtreeTech);
* node.addTarget('?.bemtree.js');
* });
Expand Down

0 comments on commit 745ee44

Please sign in to comment.