├── .gitattributes ├── .gitignore ├── .eslintignore ├── generators └── app │ ├── templates │ ├── .eslintignore │ ├── .babelrc │ ├── .gitignore │ ├── .editorconfig │ ├── test │ │ └── index.js │ ├── src │ │ └── index.js │ ├── README.md │ ├── jsdoc.json │ ├── .eslintrc.js │ ├── build │ │ └── rollup.js │ └── _package.json │ └── index.js ├── .travis.yml ├── .yo-rc.json ├── .editorconfig ├── CHANGELOG.md ├── __tests__ └── app.js ├── LICENSE ├── README.md └── package.json /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | coverage 2 | **/templates 3 | test 4 | -------------------------------------------------------------------------------- /generators/app/templates/.eslintignore: -------------------------------------------------------------------------------- 1 | dist/*.js 2 | test 3 | src/test.js -------------------------------------------------------------------------------- /generators/app/templates/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env"] 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /generators/app/templates/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | script: 5 | - npm run test 6 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-node": { 3 | "promptValues": { 4 | "authorEmail": "greenfavo@qq.com", 5 | "authorUrl": "https://github.com/greenfavo", 6 | "authorName": "shijianan" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /generators/app/templates/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | -------------------------------------------------------------------------------- /generators/app/templates/test/index.js: -------------------------------------------------------------------------------- 1 | import { add } from '../src/index.js' 2 | import { expect } from 'chai' 3 | 4 | describe('add function', function() { 5 | it('1+1=2', function() { 6 | expect(add(1, 1)).to.be.equal(2) 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /generators/app/templates/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * <%= fullName %> 3 | * (c) <%= year %> <%= author %> 4 | * @license <%= license %> 5 | */ 6 | 7 | /** 8 | * 求和 9 | * @method add 10 | * @param {Number} a - 数字a 11 | * @param {Number} b - 数字b 12 | * @return {Number} 和 13 | * @example 14 | * add(1, 1) 15 | * 2 16 | */ 17 | export function add (a, b) { 18 | return a + b 19 | } 20 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## 1.0.1 (2018-07-20) 3 | 4 | 5 | ### Features 6 | 7 | * ** generator:** init project ([c4ac47b](https://github.com/greenfavo/generator-javascript-plugin/commit/c4ac47b)) 8 | * **generator:** add namespace ([cbdc14d](https://github.com/greenfavo/generator-javascript-plugin/commit/cbdc14d)) 9 | * **generator:** 修改 template babel配置 ([d2c3fcc](https://github.com/greenfavo/generator-javascript-plugin/commit/d2c3fcc)) 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /generators/app/templates/README.md: -------------------------------------------------------------------------------- 1 | # <%= fullName %> 2 | 3 | > <%= description %> 4 | 5 | ## Installation 6 | 7 | ```bash 8 | npm install <%= fullName %> 9 | ``` 10 | 11 | ## Development Setup 12 | 13 | ``` bash 14 | # install deps 15 | npm install # or yarn install 16 | 17 | # build library 18 | npm run build 19 | 20 | # run test 21 | npm run test 22 | 23 | # create documents 24 | npm run 25 | 26 | # create changelog 27 | npm run changelog 28 | ``` 29 | 30 | ## License 31 | 32 | [MIT](http://opensource.org/licenses/MIT) 33 | 34 | Copyright (c) <%= year %> <%= author %> 35 | -------------------------------------------------------------------------------- /generators/app/templates/jsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "allowUnknownTags": true 4 | }, 5 | "source": { 6 | "include": [ 7 | "src" 8 | ], 9 | "includePattern": "(js)$", 10 | "excludePattern": "(^|\\/|\\\\)_" 11 | }, 12 | "exclude": [], 13 | "plugins": [ 14 | "plugins/markdown", 15 | "plugins/summarize" 16 | ], 17 | "templates": { 18 | "cleverLinks": false, 19 | "monospaceLinks": false 20 | }, 21 | "opts": { 22 | "encoding": "utf8", 23 | "package": "./package.json", 24 | "readme": "./README.md", 25 | "template": "node_modules/docdash", 26 | "destination": "./docs/jsdoc/", 27 | "recurse": false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /generators/app/templates/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | parserOptions: { 5 | sourceType: 'module' 6 | }, 7 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 8 | extends: 'standard', 9 | // add your custom rules here 10 | 'rules': { 11 | // allow paren-less arrow functions 12 | 'arrow-parens': 0, 13 | // allow async-await 14 | 'generator-star-spacing': 0, 15 | // allow debugger during development 16 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 17 | "max-len": [1, 120] 18 | }, 19 | globals: { 20 | __VERSION__: false, 21 | __BUILDTIME__: false 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /__tests__/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const path = require('path'); 3 | const assert = require('yeoman-assert'); 4 | const helpers = require('yeoman-test'); 5 | 6 | describe('generator-javascript-plugin:app', () => { 7 | beforeAll(() => { 8 | return helpers 9 | .run(path.join(__dirname, '../generators/app')) 10 | .withPrompts({ someAnswer: true }); 11 | }); 12 | 13 | it('creates files', () => { 14 | assert.file(['build/rollup.js']); 15 | assert.file(['dist']); 16 | assert.file(['src']); 17 | assert.file(['test']); 18 | assert.file(['package.json']); 19 | assert.file(['.babelrc']); 20 | assert.file(['.editorconfig']); 21 | assert.file(['.eslintignore']); 22 | assert.file(['.eslintrc.js']); 23 | assert.file(['.gitignore']); 24 | assert.file(['jsdoc.json']); 25 | assert.file(['docs']); 26 | assert.file(['README.md']); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 shijianan (https://github.com/greenfavo) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /generators/app/templates/build/rollup.js: -------------------------------------------------------------------------------- 1 | const rollup = require('rollup') 2 | const babel = require('rollup-plugin-babel') 3 | const resolve = require('rollup-plugin-node-resolve') 4 | const path = require('path') 5 | const chalk = require('chalk') 6 | 7 | let input = path.resolve(__dirname, '..', 'src/index.js') 8 | 9 | // 文件打包成模块的格式 10 | let formats = ['umd', 'es'] 11 | 12 | // 输入参数 13 | const inputOption = { 14 | input, 15 | plugins: [ 16 | resolve(), 17 | babel({ 18 | exclude: 'node_modules/**', // 只编译我们的源代码 19 | babelrc: false, // 防止和babel-register冲突 20 | presets: [['env', { modules: false }]] 21 | }) 22 | ] 23 | } 24 | 25 | async function build (inputOption, outputOption) { 26 | // 生成打包对象 27 | const bundle = await rollup.rollup(inputOption) 28 | // 写入硬盘 29 | return bundle.write(outputOption) 30 | } 31 | 32 | let promises = formats.map(format => { 33 | // 输出配置 34 | let outputOption = { 35 | file: path.resolve(__dirname, '..', `dist/<%= name %>.${format}.js`), 36 | format 37 | } 38 | format === 'umd' && (outputOption.name = '<%= camelCaseName %>') 39 | return build(inputOption, outputOption) 40 | }) 41 | 42 | Promise.all(promises) 43 | .then(() => { 44 | console.log(chalk.green('build done!')) 45 | }) 46 | .catch(e => { 47 | console.log(chalk.red(e)) 48 | }) 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # generator-javascript-plugin [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] 2 | > javascript plugin generator 快速生成javascript项目 3 | 4 | ## Installation 5 | 6 | First, install [Yeoman](http://yeoman.io) and generator-javascript-plugin using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)). 7 | 8 | ```bash 9 | npm install -g yo 10 | npm install -g generator-javascript-plugin 11 | ``` 12 | 13 | Then generate your new project: 14 | 15 | ```bash 16 | yo javascript-plugin 17 | ``` 18 | ## Features 19 | 20 | - 支持es6语法 21 | - 使用rollup打包,体积更小, 兼容umd和es 22 | - 支持es6语法的mocha测试框架 23 | - 支持jsdoc生成文档 24 | - 支持eslint语法检查 25 | - 自动生成changelog 26 | 27 | ## Getting To Know Yeoman 28 | 29 | * Yeoman has a heart of gold. 30 | * Yeoman is a person with feelings and opinions, but is very easy to work with. 31 | * Yeoman can be too opinionated at times but is easily convinced not to be. 32 | * Feel free to [learn more about Yeoman](http://yeoman.io/). 33 | 34 | ## License 35 | 36 | MIT © [shijianan](https://github.com/greenfavo) 37 | 38 | 39 | [npm-image]: https://badge.fury.io/js/generator-javascript-plugin.svg 40 | [npm-url]: https://npmjs.org/package/generator-javascript-plugin 41 | [travis-image]: https://travis-ci.org/greenfavo/generator-javascript-plugin.svg?branch=master 42 | [travis-url]: https://travis-ci.org/greenfavo/generator-javascript-plugin 43 | -------------------------------------------------------------------------------- /generators/app/templates/_package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= fullName %>", 3 | "description": "<%= description %>", 4 | "version": "1.0.0", 5 | "private": false, 6 | "main": "dist/<%= name %>.umd.js", 7 | "module": "dist/<%= name %>.es.js", 8 | "files": [ 9 | "dist/*.js", 10 | "src" 11 | ], 12 | "scripts": { 13 | "prebuild": "npm run lint && npm run test && npm run doc", 14 | "build": "node ./build/rollup.js", 15 | "lint": "eslint --ext .js, src", 16 | "test": "mocha --require babel-register --bail", 17 | "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", 18 | "doc": "jsdoc -c ./jsdoc.json" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "<%= repository %>" 23 | }, 24 | "keywords": [<% for(var i=0; i 25 | "<%= keywords[i] %>"<% if(i,<% } %><% } %> 26 | ], 27 | "author": { 28 | "name": "<%= author %>", 29 | "email": "<%= email %>", 30 | "url": "<%= homepage %>" 31 | }, 32 | "license": "<%= license %>", 33 | "devDependencies": { 34 | "babel": "^6.23.0", 35 | "babel-core": "^6.26.0", 36 | "babel-eslint": "^8.0.1", 37 | "babel-preset-env": "^1.7.0", 38 | "babel-register": "^6.26.0", 39 | "chai": "^4.1.2", 40 | "chalk": "^2.4.1", 41 | "conventional-changelog-cli": "^2.0.1", 42 | "docdash": "^0.4.0", 43 | "eslint": "^4.7.1", 44 | "eslint-config-standard": "^10.2.1", 45 | "eslint-plugin-import": "^2.8.0", 46 | "eslint-plugin-node": "^5.2.1", 47 | "eslint-plugin-promise": "^3.6.0", 48 | "eslint-plugin-standard": "^3.0.1", 49 | "jsdoc": "^3.5.5", 50 | "mocha": "^5.2.0", 51 | "rollup": "^0.50.0", 52 | "rollup-plugin-babel": "^3.0.2", 53 | "rollup-plugin-node-resolve": "^3.0.0" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator-javascript-plugin", 3 | "version": "1.0.1", 4 | "description": "javascript plugin generator", 5 | "homepage": "https://github.com/greenfavo", 6 | "author": { 7 | "name": "shijianan", 8 | "email": "greenfavo@qq.com", 9 | "url": "https://github.com/greenfavo" 10 | }, 11 | "files": [ 12 | "generators" 13 | ], 14 | "main": "generators/index.js", 15 | "keywords": [ 16 | "javascript-plugin", 17 | "generator", 18 | "yeoman-generator" 19 | ], 20 | "devDependencies": { 21 | "conventional-changelog-cli": "^2.0.1", 22 | "eslint": "^4.19.1", 23 | "eslint-config-prettier": "^2.9.0", 24 | "eslint-config-xo": "^0.20.1", 25 | "eslint-plugin-prettier": "^2.6.0", 26 | "husky": "^0.14.3", 27 | "jest": "^22.0.6", 28 | "lint-staged": "^6.1.1", 29 | "nsp": "^2.8.0", 30 | "prettier": "^1.11.1", 31 | "yeoman-assert": "^3.1.0", 32 | "yeoman-test": "^1.7.0" 33 | }, 34 | "engines": { 35 | "npm": ">= 4.0.0" 36 | }, 37 | "dependencies": { 38 | "yeoman-generator": "^2.0.1", 39 | "chalk": "^2.1.0", 40 | "yosay": "^2.0.1" 41 | }, 42 | "jest": { 43 | "testEnvironment": "node" 44 | }, 45 | "scripts": { 46 | "prepublishOnly": "nsp check", 47 | "pretest": "eslint . --fix", 48 | "test": "jest", 49 | "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" 50 | }, 51 | "lint-staged": { 52 | "*.js": [ 53 | "eslint --fix", 54 | "git add" 55 | ], 56 | "*.json": [ 57 | "prettier --write", 58 | "git add" 59 | ] 60 | }, 61 | "eslintConfig": { 62 | "extends": [ 63 | "xo", 64 | "prettier" 65 | ], 66 | "env": { 67 | "jest": true, 68 | "node": true 69 | }, 70 | "rules": { 71 | "prettier/prettier": [ 72 | "error", 73 | { 74 | "singleQuote": true, 75 | "printWidth": 90 76 | } 77 | ] 78 | }, 79 | "plugins": [ 80 | "prettier" 81 | ] 82 | }, 83 | "repository": { 84 | "type": "git", 85 | "url": "git@github.com:greenfavo/generator-javascript-plugin.git" 86 | }, 87 | "license": "MIT" 88 | } 89 | -------------------------------------------------------------------------------- /generators/app/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const Generator = require('yeoman-generator'); 3 | const chalk = require('chalk'); 4 | const yosay = require('yosay'); 5 | const path = require('path'); 6 | const mkdirp = require('mkdirp'); 7 | 8 | module.exports = class extends Generator { 9 | initializing() { 10 | this.props = {}; 11 | } 12 | 13 | prompting() { 14 | // Have Yeoman greet the user. 15 | this.log( 16 | yosay(`Welcome to the beautiful 17 | ${chalk.red('generator-javascript-plugin')} generator!`) 18 | ); 19 | 20 | const prompts = [ 21 | { 22 | type: 'input', 23 | name: 'namespace', 24 | message: 'Please input your project namespace,such as @xunlei:', 25 | default: '' 26 | }, 27 | { 28 | type: 'input', 29 | name: 'name', 30 | message: 'Please input project name:', 31 | default: 'js-plugin' 32 | }, 33 | { 34 | type: 'input', 35 | name: 'description', 36 | message: 'Please input project description:', 37 | default: 'a javascript plugin' 38 | }, 39 | { 40 | type: 'input', 41 | name: 'main', 42 | message: 'Main file (index.js):', 43 | default: 'index.js' 44 | }, 45 | { 46 | type: 'input', 47 | name: 'keywords', 48 | message: 'Package keywords (comma to split)', 49 | default: 'javascript,plugin' 50 | }, 51 | { 52 | type: 'input', 53 | name: 'author', 54 | message: '"Author\'s Name"', 55 | default: '' 56 | }, 57 | { 58 | type: 'input', 59 | name: 'email', 60 | message: '"Author\'s Email"', 61 | default: '' 62 | }, 63 | { 64 | type: 'input', 65 | name: 'repository', 66 | message: 'Project homepage url', 67 | default: '' 68 | }, 69 | { 70 | type: 'input', 71 | name: 'homepage', 72 | message: '"Author\'s Homepage"', 73 | default: '' 74 | }, 75 | { 76 | type: 'input', 77 | name: 'license', 78 | message: 'License', 79 | default: 'MIT' 80 | } 81 | ]; 82 | 83 | return this.prompt(prompts).then(props => { 84 | // To access props later use this.props.someAnswer; 85 | this.props = props; 86 | if (this.props.namespace) { 87 | this.props.fullName = this.props.namespace + '/' + this.props.name; 88 | } else { 89 | this.props.fullName = this.props.name; 90 | } 91 | }); 92 | } 93 | 94 | default() { 95 | if (path.basename(this.destinationPath()) !== this.props.name) { 96 | this.log(`\nYour generator must be inside a folder named 97 | ${this.props.name}\n 98 | I will automatically create this folder.\n`); 99 | 100 | mkdirp(this.props.name); 101 | this.destinationRoot(this.destinationPath(this.props.name)); 102 | } 103 | } 104 | 105 | _getCamelCaseName(name) { 106 | if (name.indexOf('-')) { 107 | let tempName = name.toLowerCase().split('-'); 108 | 109 | for (let i = 1; i < tempName.length; i++) { 110 | tempName[i] = 111 | tempName[i].substring(0, 1).toUpperCase() + tempName[i].substring(1); 112 | } 113 | 114 | return tempName.join(''); 115 | } 116 | return name; 117 | } 118 | 119 | writing() { 120 | this.log('\nWriting...\n'); 121 | 122 | this._writingPackageJSON(); 123 | this._writingREADME(); 124 | this._writingBabelrc(); 125 | this._writingGitignore(); 126 | this._writingEditorConfig(); 127 | this._writingEslintignore(); 128 | this._writingEslintrc(); 129 | this._writingJsDoc(); 130 | this._writingSrc(); 131 | this._writingBuild(); 132 | this._writingDist(); 133 | this._writingTest(); 134 | this._writingDocs(); 135 | } 136 | 137 | _writingPackageJSON() { 138 | this.fs.copyTpl( 139 | this.templatePath('_package.json'), 140 | this.destinationPath('package.json'), 141 | { 142 | name: this.props.name, 143 | fullName: this.props.fullName, 144 | description: this.props.description, 145 | keywords: this.props.keywords.split(','), 146 | author: this.props.author, 147 | email: this.props.email, 148 | repository: this.props.repository, 149 | homepage: this.props.homepage, 150 | license: this.props.license 151 | } 152 | ); 153 | } 154 | 155 | _writingREADME() { 156 | this.fs.copyTpl( 157 | this.templatePath('README.md'), 158 | 159 | this.destinationPath('README.md'), 160 | { 161 | name: this.props.name, 162 | fullName: this.props.fullName, 163 | description: this.props.description, 164 | author: this.props.author, 165 | year: new Date().getFullYear() 166 | } 167 | ); 168 | } 169 | 170 | _writingBabelrc() { 171 | this.fs.copyTpl(this.templatePath('.babelrc'), this.destinationPath('.babelrc')); 172 | } 173 | 174 | _writingGitignore() { 175 | this.fs.copyTpl(this.templatePath('.gitignore'), this.destinationPath('.gitignore')); 176 | } 177 | 178 | _writingEditorConfig() { 179 | this.fs.copyTpl( 180 | this.templatePath('.editorconfig'), 181 | this.destinationPath('.editorconfig') 182 | ); 183 | } 184 | 185 | _writingEslintrc() { 186 | this.fs.copyTpl( 187 | this.templatePath('.eslintrc.js'), 188 | this.destinationPath('.eslintrc.js') 189 | ); 190 | } 191 | 192 | _writingEslintignore() { 193 | this.fs.copyTpl( 194 | this.templatePath('.eslintignore'), 195 | this.destinationPath('.eslintignore') 196 | ); 197 | } 198 | 199 | _writingJsDoc() { 200 | this.fs.copyTpl(this.templatePath('jsdoc.json'), this.destinationPath('jsdoc.json')); 201 | } 202 | 203 | _writingSrc() { 204 | this.fs.copyTpl( 205 | this.templatePath('src/index.js'), 206 | this.destinationPath('src/index.js'), 207 | { 208 | name: this.props.name, 209 | fullName: this.props.fullName, 210 | author: this.props.author, 211 | license: this.props.license, 212 | camelCaseName: this._getCamelCaseName(this.props.name), 213 | year: new Date().getFullYear() 214 | } 215 | ); 216 | } 217 | 218 | _writingTest() { 219 | this.fs.copyTpl( 220 | this.templatePath('test/index.js'), 221 | this.destinationPath('test/index.js') 222 | ); 223 | } 224 | 225 | _writingBuild() { 226 | this.fs.copyTpl( 227 | this.templatePath('build/rollup.js'), 228 | this.destinationPath('build/rollup.js'), 229 | { 230 | name: this.props.name, 231 | camelCaseName: this._getCamelCaseName(this.props.name) 232 | } 233 | ); 234 | } 235 | 236 | _writingDocs() { 237 | mkdirp('docs'); 238 | } 239 | 240 | _writingDist() { 241 | mkdirp('dist'); 242 | } 243 | 244 | install() { 245 | this.log('\nInstall deps...\n'); 246 | this.installDependencies({ bower: false }); 247 | } 248 | }; 249 | --------------------------------------------------------------------------------