├── packages ├── utils-scripts │ ├── lib │ │ ├── tasks │ │ │ ├── publish.js │ │ │ ├── index.js │ │ │ ├── default.js │ │ │ ├── tools │ │ │ │ └── pipes.js │ │ │ ├── clean.js │ │ │ ├── publish-doc.js │ │ │ ├── doc.js │ │ │ ├── typing.js │ │ │ ├── build.js │ │ │ └── dev.js │ │ ├── config │ │ │ ├── env │ │ │ │ ├── prod.js │ │ │ │ ├── index.js │ │ │ │ └── dev.js │ │ │ ├── index.js │ │ │ ├── base.js │ │ │ ├── target │ │ │ │ ├── es.js │ │ │ │ ├── cjs.js │ │ │ │ ├── index.js │ │ │ │ └── target.js │ │ │ ├── target.js │ │ │ ├── plugins │ │ │ │ └── dts-export.js │ │ │ ├── jest.config.js │ │ │ └── esdoc.js │ │ ├── cli │ │ │ ├── publish.js │ │ │ ├── dev.js │ │ │ ├── doc.js │ │ │ ├── build.js │ │ │ └── test.js │ │ └── index.js │ ├── src │ │ ├── config │ │ │ ├── env │ │ │ │ ├── prod.js │ │ │ │ ├── index.js │ │ │ │ └── dev.js │ │ │ ├── index.js │ │ │ ├── base.js │ │ │ ├── target.js │ │ │ ├── esdoc.js │ │ │ └── jest.config.js │ │ ├── tasks │ │ │ ├── default.js │ │ │ ├── index.js │ │ │ ├── clean.js │ │ │ ├── tools │ │ │ │ └── pipes.js │ │ │ ├── publish-doc.js │ │ │ ├── doc.js │ │ │ ├── typing.js │ │ │ ├── build.js │ │ │ └── dev.js │ │ ├── cli │ │ │ ├── dev.ts │ │ │ ├── doc.ts │ │ │ ├── build.ts │ │ │ └── test.ts │ │ └── index.ts │ ├── docs-template │ │ ├── index.html │ │ ├── manual.html │ │ ├── single.html │ │ ├── image │ │ │ ├── search.png │ │ │ ├── esdoc-logo-mini.png │ │ │ ├── esdoc-logo-mini-black.png │ │ │ ├── badge.svg │ │ │ └── manual-badge.svg │ │ ├── manualIndex.html │ │ ├── file.html │ │ ├── script │ │ │ ├── patch-for-local.js │ │ │ ├── manual.js │ │ │ ├── pretty-print.js │ │ │ ├── inherited-summary.js │ │ │ ├── inner-link.js │ │ │ ├── test-summary.js │ │ │ ├── search.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ └── prettify.js │ │ ├── testInterface.html │ │ ├── test.html │ │ ├── nav.html │ │ ├── identifiers.html │ │ ├── manualCardIndex.html │ │ ├── properties.html │ │ ├── css │ │ │ ├── identifiers.css │ │ │ ├── source.css │ │ │ ├── test.css │ │ │ ├── github.css │ │ │ ├── search.css │ │ │ ├── prettify-tomorrow.css │ │ │ ├── manual.css │ │ │ └── style.css │ │ ├── source.html │ │ ├── summary.html │ │ ├── layout.html │ │ ├── class.html │ │ └── details.html │ ├── __tests__ │ │ └── utils-scripts.test.js │ ├── README.md │ ├── tsconfig.json │ ├── LICENSE │ ├── package.json │ └── package-lock.json └── create-utils │ ├── template-javascript │ ├── src │ │ ├── money │ │ │ ├── index.js │ │ │ └── tozhCN.js │ │ ├── string │ │ │ ├── index.js │ │ │ └── addZero.js │ │ └── index.js │ ├── .prettierrc │ ├── .editorconfig │ ├── __tests__ │ │ ├── string │ │ │ └── addZero.test.js │ │ └── money │ │ │ └── tozhCN.test.js │ ├── .travis.yml │ ├── tsconfig.json │ ├── README.md │ └── .gitignore │ ├── template-typescript │ ├── src │ │ ├── money │ │ │ ├── index.ts │ │ │ └── tozhCN.ts │ │ ├── string │ │ │ ├── index.ts │ │ │ └── addZero.ts │ │ └── index.ts │ ├── .prettierrc │ ├── .editorconfig │ ├── __tests__ │ │ ├── string │ │ │ └── addZero.test.ts │ │ └── money │ │ │ └── tozhCN.test.ts │ ├── .travis.yml │ ├── tsconfig.json │ ├── README.md │ ├── tslint.json │ └── .gitignore │ ├── __tests__ │ └── create-utils.test.js │ ├── README.md │ ├── tsconfig.json │ ├── src │ ├── index.ts │ └── cli │ │ └── create.ts │ ├── LICENSE │ ├── lib │ ├── index.js │ └── cli │ │ └── create.js │ ├── package.json │ ├── package-lock.json │ └── yarn.lock ├── lerna.json ├── tslint.json ├── package.json ├── CONTRIBUTING.md ├── LICENSE ├── .gitignore └── README.md /packages/utils-scripts/lib/tasks/publish.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | -------------------------------------------------------------------------------- /packages/utils-scripts/src/config/env/prod.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | prod: true, 3 | }; 4 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/index.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/manual.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/utils-scripts/lib/config/env/prod.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = { 3 | prod: true, 4 | }; 5 | -------------------------------------------------------------------------------- /packages/create-utils/template-javascript/src/money/index.js: -------------------------------------------------------------------------------- 1 | import tozhCN from './tozhCN'; 2 | export default { 3 | tozhCN, 4 | }; 5 | -------------------------------------------------------------------------------- /packages/create-utils/template-javascript/src/string/index.js: -------------------------------------------------------------------------------- 1 | import addZero from './addZero'; 2 | export default { 3 | addZero, 4 | }; 5 | -------------------------------------------------------------------------------- /packages/create-utils/template-typescript/src/money/index.ts: -------------------------------------------------------------------------------- 1 | import tozhCN from './tozhCN'; 2 | 3 | export default { 4 | tozhCN, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/create-utils/template-typescript/src/string/index.ts: -------------------------------------------------------------------------------- 1 | import addZero from './addZero'; 2 | 3 | export default { 4 | addZero, 5 | } -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/single.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/utils-scripts/src/tasks/default.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | 3 | gulp.task('default', gulp.series('clean', 'dev', 'typing', 'doc')); 4 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmClient": "yarn", 3 | "useWorkspaces": true, 4 | "version": "independent", 5 | "packages": [ 6 | "packages/*" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/image/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youzan/create-utils/HEAD/packages/utils-scripts/docs-template/image/search.png -------------------------------------------------------------------------------- /packages/create-utils/template-javascript/src/index.js: -------------------------------------------------------------------------------- 1 | import money from './money'; 2 | import string from './string'; 3 | export default { 4 | money, 5 | string, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/create-utils/template-typescript/src/index.ts: -------------------------------------------------------------------------------- 1 | import money from './money'; 2 | import string from './string'; 3 | 4 | export default { 5 | money, 6 | string, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/image/esdoc-logo-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youzan/create-utils/HEAD/packages/utils-scripts/docs-template/image/esdoc-logo-mini.png -------------------------------------------------------------------------------- /packages/create-utils/template-javascript/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "semi": true, 4 | "singleQuote": true, 5 | "printWidth": 120, 6 | "trailingComma": "all" 7 | } 8 | -------------------------------------------------------------------------------- /packages/create-utils/template-typescript/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "semi": true, 4 | "singleQuote": true, 5 | "printWidth": 120, 6 | "trailingComma": "all" 7 | } 8 | -------------------------------------------------------------------------------- /packages/create-utils/__tests__/create-utils.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createUtils = require('..'); 4 | 5 | describe('create-utils', () => { 6 | it('needs tests'); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/image/esdoc-logo-mini-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/youzan/create-utils/HEAD/packages/utils-scripts/docs-template/image/esdoc-logo-mini-black.png -------------------------------------------------------------------------------- /packages/utils-scripts/__tests__/utils-scripts.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const utilsScripts = require('..'); 4 | 5 | describe('utils-scripts', () => { 6 | it('needs tests'); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/utils-scripts/src/tasks/index.js: -------------------------------------------------------------------------------- 1 | import './clean'; 2 | import './typing'; 3 | import './doc'; 4 | import './dev'; 5 | import './build'; 6 | import './default'; 7 | import './publish-doc'; 8 | -------------------------------------------------------------------------------- /packages/create-utils/README.md: -------------------------------------------------------------------------------- 1 | # `create-utils` 2 | 3 | > TODO: description 4 | 5 | ## Usage 6 | 7 | ``` 8 | const createUtils = require('create-utils'); 9 | 10 | // TODO: DEMONSTRATE API 11 | ``` 12 | -------------------------------------------------------------------------------- /packages/utils-scripts/README.md: -------------------------------------------------------------------------------- 1 | # `utils-scripts` 2 | 3 | > TODO: description 4 | 5 | ## Usage 6 | 7 | ``` 8 | const utilsScripts = require('utils-scripts'); 9 | 10 | // TODO: DEMONSTRATE API 11 | ``` 12 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint-config-standard", 3 | "rules": { 4 | "ter-indent": [true, 2, { 5 | "SwitchCase": 1 6 | }], 7 | "no-eval": false, 8 | "semicolon": [true, "always"], 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/utils-scripts/src/config/env/index.js: -------------------------------------------------------------------------------- 1 | const devConfig = require('./dev'); 2 | const prodConfig = require('./prod'); 3 | 4 | const isProd = process.env.NODE_ENV === 'production'; 5 | module.exports = isProd ? prodConfig : devConfig; 6 | -------------------------------------------------------------------------------- /packages/utils-scripts/lib/config/env/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var devConfig = require('./dev'); 3 | var prodConfig = require('./prod'); 4 | var isProd = process.env.NODE_ENV === 'production'; 5 | module.exports = isProd ? prodConfig : devConfig; 6 | -------------------------------------------------------------------------------- /packages/utils-scripts/src/config/env/dev.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | prod: false, 3 | connect: { 4 | port: parseInt(process.env.PORT) || 3001, 5 | host: '127.0.0.1', 6 | debug: false, 7 | livereload: true, 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/manualIndex.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/create-utils/template-javascript/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [Makefile] 12 | indent_style = tab -------------------------------------------------------------------------------- /packages/create-utils/template-typescript/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [Makefile] 12 | indent_style = tab -------------------------------------------------------------------------------- /packages/utils-scripts/src/config/index.js: -------------------------------------------------------------------------------- 1 | const base = require('./base'); 2 | const env = require('./env'); 3 | const esdoc = require('./esdoc'); 4 | const target = require('./target'); 5 | 6 | module.exports = { 7 | base, 8 | env, 9 | target, 10 | esdoc, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |Sorry, this documentation does not provide source code.
4 | -------------------------------------------------------------------------------- /packages/utils-scripts/lib/config/env/dev.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = { 3 | prod: false, 4 | connect: { 5 | port: parseInt(process.env.PORT) || 3001, 6 | host: '127.0.0.1', 7 | debug: false, 8 | livereload: true, 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/script/patch-for-local.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | if (location.protocol === 'file:') { 3 | var elms = document.querySelectorAll('a[href="./"]'); 4 | for (var i = 0; i < elms.length; i++) { 5 | elms[i].href = './index.html'; 6 | } 7 | } 8 | })(); 9 | -------------------------------------------------------------------------------- /packages/create-utils/template-javascript/__tests__/string/addZero.test.js: -------------------------------------------------------------------------------- 1 | import addZero from '../../src/string/addZero'; 2 | 3 | describe('string:addZero', () => { 4 | test('addZero is work', () => { 5 | expect(addZero(2)).toBe('02'); 6 | expect(addZero(11)).toBe('11'); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/create-utils/template-typescript/__tests__/string/addZero.test.ts: -------------------------------------------------------------------------------- 1 | import addZero from '../../src/string/addZero'; 2 | 3 | describe('string:addZero', () => { 4 | test('addZero is work', () => { 5 | expect(addZero(2)).toBe('02'); 6 | expect(addZero(11)).toBe('11'); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/testInterface.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /packages/utils-scripts/lib/tasks/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | require("./clean"); 4 | require("./typing"); 5 | require("./doc"); 6 | require("./dev"); 7 | require("./build"); 8 | require("./default"); 9 | require("./publish-doc"); 10 | -------------------------------------------------------------------------------- /packages/utils-scripts/src/tasks/clean.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import del from 'del'; 3 | import config from '../config'; 4 | 5 | gulp.task('clean', () => { 6 | return del([config.base.esTemp, config.base.docCache, config.base.dist, config.base.publishCache, config.esdoc.destination]); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/utils-scripts/lib/tasks/default.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | var tslib_1 = require("tslib"); 4 | var gulp_1 = tslib_1.__importDefault(require("gulp")); 5 | gulp_1.default.task('default', gulp_1.default.series('clean', 'dev', 'typing', 'doc')); 6 | -------------------------------------------------------------------------------- /packages/utils-scripts/src/cli/dev.ts: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | 3 | import '../tasks'; 4 | 5 | process.env.NODE_ENV = 'development'; 6 | 7 | 8 | gulp.on('error', e => console.log('error', e)); 9 | 10 | export default function() { 11 | 12 | gulp.task('dev')((err) => {console.log('dev done')}); 13 | } -------------------------------------------------------------------------------- /packages/utils-scripts/docs-template/test.html: -------------------------------------------------------------------------------- 1 || Description | 6 |Identifier | 7 |
| Name | Type | Attribute | Description |
| 10 | | 11 | | 12 | | 13 | |
| File | 7 |Identifier | 8 |Document | 9 | 10 | 11 | 12 |
| 17 | | 18 | | 19 | 20 | 21 | 22 | |
| 6 | 7 | 8 | 9 | 10 | 11 | | 12 |
13 |
14 |
21 | 15 | 16 | 17 | 18 | 19 | 20 |
22 |
23 |
24 |
25 |
26 | |
27 | 28 | version 29 | since 30 | | 31 |
2 |
3 |
4 |
23 |
24 |
25 | | 33 | | 34 | |
| 46 | | 47 | |
| 58 | | 59 | |
| 70 | | 71 | |
=h&&(b+=2);f>=k&&(w+=2)}}finally{g&&(g.style.display=a)}}catch(x){E.console&&console.log(x&&x.stack||x)}}var E=window,C=["break,continue,do,else,for,if,return,while"], 34 | F=[[C,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],H=[F,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"], 35 | O=[F,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],P=[F,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"], 36 | F=[F,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],Q=[C,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],R=[C,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],C=[C,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"], 37 | S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,W=/\S/,X=y({keywords:[H,P,O,F,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",Q,R,C],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),I={};t(X,["default-code"]);t(G([],[["pln",/^[^]+/],["dec", 38 | /^]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^