diff --git a/README.md b/README.md index fb50525..0060222 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,18 @@ -# api documentation for [generator-angular-fullstack (v4.1.4)](https://github.com/angular-fullstack/generator-angular-fullstack) [![npm package](https://img.shields.io/npm/v/npmdoc-generator-angular-fullstack.svg?style=flat-square)](https://www.npmjs.org/package/npmdoc-generator-angular-fullstack) [![travis-ci.org build-status](https://api.travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack.svg)](https://travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack) +# npmdoc-generator-angular-fullstack + +#### basic api documentation for [generator-angular-fullstack (v4.2.0)](https://github.com/angular-fullstack/generator-angular-fullstack) [![npm package](https://img.shields.io/npm/v/npmdoc-generator-angular-fullstack.svg?style=flat-square)](https://www.npmjs.org/package/npmdoc-generator-angular-fullstack) [![travis-ci.org build-status](https://api.travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack.svg)](https://travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack) + #### Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node -[![NPM](https://nodei.co/npm/generator-angular-fullstack.png?downloads=true)](https://www.npmjs.com/package/generator-angular-fullstack) +[![NPM](https://nodei.co/npm/generator-angular-fullstack.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/generator-angular-fullstack) + +- [https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/apidoc.html](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/apidoc.html) -[![apidoc](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/screen-capture.buildNpmdoc.browser._2Fhome_2Ftravis_2Fbuild_2Fnpmdoc_2Fnode-npmdoc-generator-angular-fullstack_2Ftmp_2Fbuild_2Fapidoc.html.png)](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build..beta..travis-ci.org/apidoc.html) +[![apidoc](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/screenCapture.buildCi.browser.%252Ftmp%252Fbuild%252Fapidoc.html.png)](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/apidoc.html) -![package-listing](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/screen-capture.npmPackageListing.svg) +![npmPackageListing](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/screenCapture.npmPackageListing.svg) + +![npmPackageDependencyTree](https://npmdoc.github.io/node-npmdoc-generator-angular-fullstack/build/screenCapture.npmPackageDependencyTree.svg) @@ -16,7 +23,6 @@ { "author": { "name": "Andrew Koroluk", - "email": "koroluka@gmail.com", "url": "http://andrewk.me/" }, "bugs": { @@ -29,17 +35,14 @@ }, { "name": "Cody Mize", - "email": "me@codymize.com", "url": "http://codymize.com/" }, { "name": "Brian Ford", - "email": "btford@umich.edu", "url": "http://briantford.com/" }, { "name": "Pascal Hartig", - "email": "passy@twitter.com", "url": "http://passy.me/" }, { @@ -48,7 +51,6 @@ }, { "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", "url": "https://twitter.com/sindresorhus" } ], @@ -107,14 +109,14 @@ }, "directories": {}, "dist": { - "shasum": "ca2dc23f9abee9803714d34a3cb12835f5ffce8f", - "tarball": "https://registry.npmjs.org/generator-angular-fullstack/-/generator-angular-fullstack-4.1.4.tgz" + "shasum": "9e0cc7a9cfca2971a613d6cedaea7df68a7262ee", + "tarball": "https://registry.npmjs.org/generator-angular-fullstack/-/generator-angular-fullstack-4.2.0.tgz" }, "engines": { "node": "^6.2.2", "npm": "^3.9.5" }, - "gitHead": "431c4563713cfc8299166f59937a935fca5ad030", + "gitHead": "bc0ce9a73ac859264508839f44cca24773b5c14a", "homepage": "https://github.com/angular-fullstack/generator-angular-fullstack", "keywords": [ "yeoman-generator", @@ -132,17 +134,14 @@ "license": "BSD-2-Clause", "maintainers": [ { - "name": "daftmonk", - "email": "tylerhenkel@hotmail.com" + "name": "daftmonk" }, { - "name": "awk34", - "email": "koroluka@gmail.com" + "name": "awk34" } ], "name": "generator-angular-fullstack", "optionalDependencies": {}, - "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/angular-fullstack/generator-angular-fullstack.git" @@ -151,324 +150,10 @@ "prepublish": "gulp build", "test": "gulp updateFixtures:test && gulp installFixtures && gulp build && gulp test" }, - "version": "4.1.4" -} -``` - - - -# [table of contents](#apidoc.tableOfContents) - -#### [module generator-angular-fullstack](#apidoc.module.generator-angular-fullstack) -1. object generator-angular-fullstack.generator_base -1. object generator-angular-fullstack.util - -#### [module generator-angular-fullstack.generator_base](#apidoc.module.generator-angular-fullstack.generator_base) -1. [function generator-angular-fullstack.generator_base.genBase (self)](#apidoc.element.generator-angular-fullstack.generator_base.genBase) -1. [function generator-angular-fullstack.generator_base.genNamedBase (self)](#apidoc.element.generator-angular-fullstack.generator_base.genNamedBase) - -#### [module generator-angular-fullstack.util](#apidoc.module.generator-angular-fullstack.util) -1. [function generator-angular-fullstack.util.appSuffix (self)](#apidoc.element.generator-angular-fullstack.util.appSuffix) -1. [function generator-angular-fullstack.util.processDirectory (source, destination)](#apidoc.element.generator-angular-fullstack.util.processDirectory) -1. [function generator-angular-fullstack.util.relativeRequire (to, fr)](#apidoc.element.generator-angular-fullstack.util.relativeRequire) -1. [function generator-angular-fullstack.util.rewrite (args)](#apidoc.element.generator-angular-fullstack.util.rewrite) -1. [function generator-angular-fullstack.util.rewriteFile (args)](#apidoc.element.generator-angular-fullstack.util.rewriteFile) -1. [function generator-angular-fullstack.util.runCmd (cmd)](#apidoc.element.generator-angular-fullstack.util.runCmd) - - - -# [module generator-angular-fullstack](#apidoc.module.generator-angular-fullstack) - - - -# [module generator-angular-fullstack.generator_base](#apidoc.module.generator-angular-fullstack.generator_base) - -#### [function generator-angular-fullstack.generator_base.genBase (self)](#apidoc.element.generator-angular-fullstack.generator_base.genBase) -- description and source-code -```javascript -function genBase(self) { - self = self || this; - - var yoCheckPromise = void 0; - if (!process.env.CI) { - yoCheckPromise = genUtils.runCmd('yo --version').then(function (stdout) { - if (!_semver2.default.satisfies(_semver2.default.clean(stdout), '>= 1.7.1')) { - throw new Error('ERROR: You need to update yo to at least 1.7.1 (npm i -g yo)\n\'yo --version\' output: ' + stdout); - } - }); - } else { - // CI won't have yo installed - yoCheckPromise = Promise.resolve(); - } - - self.lodash = _lodash2.default; - self.yoWelcome = _yeomanWelcome2.default; - - var baseDetermineAppname = self.determineAppname.bind(self); - self.determineAppname = function () { - if (self['name']) { - return self['name']; - } else { - return baseDetermineAppname(); - } - }; - - self.appname = _lodash2.default.camelize(_lodash2.default.slugify(_lodash2.default.humanize(self.determineAppname()))); - self.scriptAppName = self.appname + genUtils.appSuffix(self); - - self.filters = self.filters || self.config.get('filters'); - - // dynamic assertion statements - self.expect = function () { - return self.filters.expect ? 'expect(' : ''; - }; - self.to = function () { - return self.filters.expect ? ').to' : '.should'; - }; - - // dynamic relative require path - self.relativeRequire = genUtils.relativeRequire.bind(self); - // process template directory - self.processDirectory = genUtils.processDirectory.bind(self); - // rewrite a file in place - self.rewriteFile = genUtils.rewriteFile; - - return yoCheckPromise; -} -``` -- example usage -```shell -n/a -``` - -#### [function generator-angular-fullstack.generator_base.genNamedBase (self)](#apidoc.element.generator-angular-fullstack.generator_base.genNamedBase) -- description and source-code -```javascript -function genNamedBase(self) { - self = self || this; - - // extend genBase - return genBase(self).then(function () { - var name = self.name.replace(/\//g, '-'); - - self.cameledName = _lodash2.default.camelize(name); - self.classedName = _lodash2.default.classify(name); - - self.basename = _path2.default.basename(self.name); - self.dirname = self.name.indexOf('/') >= 0 ? _path2.default.dirname(self.name) : self.name; - }); -} -``` -- example usage -```shell -n/a -``` - - - -# [module generator-angular-fullstack.util](#apidoc.module.generator-angular-fullstack.util) - -#### [function generator-angular-fullstack.util.appSuffix (self)](#apidoc.element.generator-angular-fullstack.util.appSuffix) -- description and source-code -```javascript -function appSuffix(self) { - var suffix = self.options['app-suffix']; - return typeof suffix === 'string' ? self.lodash.classify(suffix) : ''; + "version": "4.2.0", + "bin": {} } ``` -- example usage -```shell -... - return self['name']; - } else { - return baseDetermineAppname(); - } -}; - -self.appname = _lodash2.default.camelize(_lodash2.default.slugify(_lodash2.default.humanize(self.determineAppname()))); -self.scriptAppName = self.appname + genUtils.appSuffix(self); - -self.filters = self.filters || self.config.get('filters'); - -// dynamic assertion statements -self.expect = function () { - return self.filters.expect ? 'expect(' : ''; -}; -... -``` - -#### [function generator-angular-fullstack.util.processDirectory (source, destination)](#apidoc.element.generator-angular-fullstack.util.processDirectory) -- description and source-code -```javascript -function processDirectory(source, destination) { - var self = this; - var root = _path2.default.isAbsolute(source) ? source : _path2.default.join(self.sourceRoot(), source); - var files = expandFiles('**', { dot: true, cwd: root }); - var dest, src; - - files.forEach(function (f) { - var filteredFile = filterFile(f); - if (self.basename) { - filteredFile.name = filteredFile.name.replace('basename', self.basename); - } - if (self.name) { - filteredFile.name = filteredFile.name.replace('name', self.name); - } - var name = filteredFile.name; - var copy = false, - stripped; - - src = _path2.default.join(root, f); - dest = _path2.default.join(destination, name); - - if (self.filters.ts && dest.indexOf('client') > -1 && dest.indexOf('.json') === -1) { - dest = dest.replace('.js', '.ts'); - } - - if (_path2.default.basename(dest).indexOf('_') === 0) { - stripped = _path2.default.basename(dest).replace(/^_/, ''); - dest = _path2.default.join(_path2.default.dirname(dest), stripped); - } - - if (_path2.default.basename(dest).indexOf('!') === 0) { - stripped = _path2.default.basename(dest).replace(/^!/, ''); - dest = _path2.default.join(_path2.default.dirname(dest), stripped); - copy = true; - } - - if (templateIsUsable(self, filteredFile)) { - if (copy) { - self.fs.copy(src, dest); - } else { - self.filePath = dest; - self.fs.copyTpl(src, dest, self); - delete self.filePath; - } - } - }); -} -``` -- example usage -```shell -n/a -``` - -#### [function generator-angular-fullstack.util.relativeRequire (to, fr)](#apidoc.element.generator-angular-fullstack.util.relativeRequire) -- description and source-code -```javascript -function relativeRequire(to, fr) { - fr = this.destinationPath(fr || this.filePath); - to = this.destinationPath(to); - return _path2.default.relative(_path2.default.dirname(fr), to).replace(/\\/g, '/') // convert win32 separator to posix - .replace(/^(?!\.\.)(.*)/, './$1') // prefix non parent path with ./ - .replace(/[\/\\]index\.js$/, ''); // strip index.js suffix from path -} -``` -- example usage -```shell -n/a -``` - -#### [function generator-angular-fullstack.util.rewrite (args)](#apidoc.element.generator-angular-fullstack.util.rewrite) -- description and source-code -```javascript -function rewrite(args) { - // check if splicable is already in the body text - var re = new RegExp(args.splicable.map(function (line) { - return '\s*' + escapeRegExp(line); - }).join('\n')); - - if (re.test(args.haystack)) { - return args.haystack; - } - - var lines = args.haystack.split('\n'); - - var otherwiseLineIndex = -1; - lines.forEach(function (line, i) { - if (line.indexOf(args.needle) !== -1) { - otherwiseLineIndex = i; - } - }); - if (otherwiseLineIndex === -1) return lines.join('\n'); - - var spaces = 0; - while (lines[otherwiseLineIndex].charAt(spaces) === ' ') { - spaces += 1; - } - - var spaceStr = ''; - while ((spaces -= 1) >= 0) { - spaceStr += ' '; - } - - lines.splice(otherwiseLineIndex + 1, 0, args.splicable.map(function (line) { - return spaceStr + line; - }).join('\n')); - - return lines.join('\n'); -} -``` -- example usage -```shell -n/a -``` - -#### [function generator-angular-fullstack.util.rewriteFile (args)](#apidoc.element.generator-angular-fullstack.util.rewriteFile) -- description and source-code -```javascript -function rewriteFile(args) { - args.path = args.path || process.cwd(); - var fullPath = _path2.default.join(args.path, args.file); - - args.haystack = _fs2.default.readFileSync(fullPath, 'utf8'); - var body = rewrite(args); - - _fs2.default.writeFileSync(fullPath, body); -} -``` -- example usage -```shell -n/a -``` - -#### [function generator-angular-fullstack.util.runCmd (cmd)](#apidoc.element.generator-angular-fullstack.util.runCmd) -- description and source-code -```javascript -function runCmd(cmd) { - return new _bluebird2.default(function (resolve, reject) { - (0, _child_process.exec)(cmd, {}, function (err, stdout, stderr) { - if (err) { - console.error(stdout); - return reject(err); - } else { - if (DEBUG) console.log(cmd + ' stdout: ' + stdout); - return resolve(stdout); - } - }); - }); -} -``` -- example usage -```shell -... -_lodash2.default.mixin(_underscore2.default.exports()); - -function genBase(self) { -self = self || this; - -var yoCheckPromise = void 0; -if (!process.env.CI) { - yoCheckPromise = genUtils.runCmd('yo --version').then(function (stdout) { - if (!_semver2.default.satisfies(_semver2.default.clean(stdout), '>= 1.7.1')) { - throw new Error('ERROR: You need to update yo to at least 1.7.1 (npm i -g yo)\n\'yo --version\' output: ' + stdout); - } - }); -} else { - // CI won't have yo installed - yoCheckPromise = Promise.resolve(); -... -``` diff --git a/assets.npmdoc_generator_angular_fullstack.rollup.js b/assets.npmdoc_generator_angular_fullstack.rollup.js index f13a1e9..f44567e 100644 --- a/assets.npmdoc_generator_angular_fullstack.rollup.js +++ b/assets.npmdoc_generator_angular_fullstack.rollup.js @@ -15,7 +15,7 @@ - // run shared js-env code - pre-init + // run shared js-env code - init-before (function () { // init local local = {}; diff --git a/lib.npmdoc_generator_angular_fullstack.js b/lib.npmdoc_generator_angular_fullstack.js index f13a1e9..f44567e 100644 --- a/lib.npmdoc_generator_angular_fullstack.js +++ b/lib.npmdoc_generator_angular_fullstack.js @@ -15,7 +15,7 @@ - // run shared js-env code - pre-init + // run shared js-env code - init-before (function () { // init local local = {}; diff --git a/package.json b/package.json index 753c8e9..3f727b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "kai zhu ", "buildNpmdoc": "generator-angular-fullstack", - "description": "api documentation for [generator-angular-fullstack (v4.1.4)](https://github.com/angular-fullstack/generator-angular-fullstack) [![npm package](https://img.shields.io/npm/v/npmdoc-generator-angular-fullstack.svg?style=flat-square)](https://www.npmjs.org/package/npmdoc-generator-angular-fullstack) [![travis-ci.org build-status](https://api.travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack.svg)](https://travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack)", + "description": "#### basic api documentation for [generator-angular-fullstack (v4.2.0)](https://github.com/angular-fullstack/generator-angular-fullstack) [![npm package](https://img.shields.io/npm/v/npmdoc-generator-angular-fullstack.svg?style=flat-square)](https://www.npmjs.org/package/npmdoc-generator-angular-fullstack) [![travis-ci.org build-status](https://api.travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack.svg)](https://travis-ci.org/npmdoc/node-npmdoc-generator-angular-fullstack)", "devDependencies": { "electron-lite": "kaizhu256/node-electron-lite#alpha", "generator-angular-fullstack": "*", @@ -36,5 +36,5 @@ "start": "(set -e; export PORT=${PORT:-8080}; utility2 start test.js)", "test": "(set -e; export PORT=$(utility2 shServerPortRandom); utility2 test test.js)" }, - "version": "0.0.1" + "version": "2017.4.25" } diff --git a/test.js b/test.js index 971828d..23d36be 100644 --- a/test.js +++ b/test.js @@ -15,7 +15,7 @@ - // run shared js-env code - pre-init + // run shared js-env code - init-before (function () { // init local local = {}; @@ -48,7 +48,7 @@ // re-init local from example.js case 'node': local = (local.global.utility2_rollup || require('utility2')) - .requireExampleJsFromReadme(); + .requireReadme(); break; } // export local @@ -78,7 +78,7 @@ - // run shared js-env code - post-init + // run shared js-env code - init-after (function () { return; }()); @@ -86,8 +86,18 @@ - // run browser js-env code - post-init + // run browser js-env code - init-after case 'browser': + local.testCase_browser_nullCase = local.testCase_browser_nullCase || function ( + options, + onError + ) { + /* + * this function will test browsers's null-case handling-behavior-behavior + */ + onError(null, options); + }; + // run tests local.nop(local.modeTest && document.querySelector('#testRunButton1') && @@ -96,7 +106,7 @@ - // run node js-env code - post-init + // run node js-env code - init-after /* istanbul ignore next */ case 'node': local.testCase_buildApidoc_default = local.testCase_buildApidoc_default || function ( @@ -107,10 +117,6 @@ * this function will test buildApidoc's default handling-behavior-behavior */ options = { modulePathList: module.paths }; - if (local.env.npm_package_buildNpmdoc) { - local.buildNpmdoc(options, onError); - return; - } local.buildApidoc(options, onError); }; @@ -124,10 +130,20 @@ local.testCase_buildReadme_default(options, local.onErrorThrow); local.testCase_buildLib_default(options, local.onErrorThrow); local.testCase_buildTest_default(options, local.onErrorThrow); + local.testCase_buildCustomOrg_default(options, local.onErrorThrow); options = []; local.buildApp(options, onError); }; + local.testCase_buildCustomOrg_default = local.testCase_buildCustomOrg_default || + function (options, onError) { + /* + * this function will test buildCustomOrg's default handling-behavior + */ + options = {}; + local.buildCustomOrg(options, onError); + }; + local.testCase_buildLib_default = local.testCase_buildLib_default || function ( options, onError @@ -146,10 +162,6 @@ /* * this function will test buildReadme's default handling-behavior-behavior */ - if (local.env.npm_package_buildNpmdoc) { - onError(); - return; - } options = {}; local.buildReadme(options, onError); }; diff --git a/touch.txt b/touch.txt index 686e170..eaed126 100644 --- a/touch.txt +++ b/touch.txt @@ -1 +1 @@ -2017-04-02T17:39:18Z +2017-04-25T11:02:44.072Z