├── .babelrc ├── .eslintrc ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── cli.gif ├── dev.gif ├── package.json ├── src ├── .eslintrc ├── Mingify.js ├── cli.js ├── example │ ├── Display.js │ ├── Example.js │ └── logo.jpg └── index.js ├── test ├── .eslintrc └── index.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "react", "stage-0"] 3 | } 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "rules": { 4 | "quotes": 0, 5 | "no-trailing-spaces": 0, 6 | "eqeqeq": 0, 7 | "no-underscore-dangle": 0, 8 | "no-undef": 0, 9 | "no-extra-boolean-cast": 0, 10 | "no-mixed-spaces-and-tabs": 0, 11 | "no-alert": 0, 12 | "no-shadow": 0, 13 | "no-empty": 0, 14 | "no-irregular-whitespace": 0, 15 | "no-multi-spaces": 0, 16 | "no-new": 0, 17 | "no-unused-vars": 2, // disallow declaration of variables that are not used in the code 18 | "no-redeclare": 2, // disallow declaring the same variable more then once 19 | "new-cap": 0, 20 | // 21 | // eslint-plugin-react 22 | // 23 | // React specific linting rules for ESLint 24 | // 25 | //"react/display-name": 0, // Prevent missing displayName in a React component definition 26 | "react/jsx-boolean-value": [2, "always"], // Enforce boolean attributes notation in JSX 27 | "react/jsx-no-undef": 2, // Disallow undeclared variables in JSX 28 | "react/jsx-quotes": [2, "double", "avoid-escape"], // Enforce quote style for JSX attributes 29 | "react/jsx-sort-prop-types": 0, // Enforce propTypes declarations alphabetical sorting 30 | "react/jsx-sort-props": 0, // Enforce props alphabetical sorting 31 | "react/jsx-uses-react": 2, // Prevent React to be incorrectly marked as unused 32 | "react/jsx-uses-vars": 2, // Prevent variables used in JSX to be incorrectly marked as unused 33 | //"react/no-did-mount-set-state": 2, // Prevent usage of setState in componentDidMount 34 | "react/no-did-update-set-state": 2, // Prevent usage of setState in componentDidUpdate 35 | "react/no-multi-comp": 0, // Prevent multiple component definition per file 36 | "react/no-unknown-property": 2, // Prevent usage of unknown DOM property 37 | "react/prop-types": 2, // Prevent missing props validation in a React component definition 38 | "react/react-in-jsx-scope": 2, // Prevent missing React when using JSX 39 | "react/require-extension": [1, { "extensions": [".js"] }], // Restrict file extensions that may be required 40 | "react/self-closing-comp": 2, // Prevent extra closing tags for components without children 41 | "react/wrap-multilines": 2 // Prevent missing parentheses around multilines JSX 42 | }, 43 | "globals": { 44 | "jQuery": true, 45 | "$": true, 46 | "reveal": true, 47 | "Pikaday": true, 48 | "NProgress": true, 49 | "cytoscape": true 50 | }, 51 | "plugins": ["react"], 52 | "ecmaFeatures": { 53 | "arrowFunctions": true, 54 | "binaryLiterals": true, 55 | "blockBindings": true, 56 | "classes": true, 57 | "defaultParams": true, 58 | "destructuring": true, 59 | "forOf": true, 60 | "generators": true, 61 | "modules": true, 62 | "objectLiteralComputedProperties": true, 63 | "objectLiteralDuplicateProperties": true, 64 | "objectLiteralShorthandMethods": true, 65 | "objectLiteralShorthandProperties": true, 66 | "octalLiterals": true, 67 | "regexUFlag": true, 68 | "regexYFlag": true, 69 | "spread": true, 70 | "superInFunctions": true, 71 | "templateStrings": true, 72 | "unicodeCodePointEscapes": true, 73 | "globalReturn": true, 74 | "jsx": true 75 | }, 76 | "env": { 77 | "browser": true, 78 | "es6": true 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | /dist/ 11 | 12 | # Dependency directory 13 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 14 | node_modules 15 | 16 | # Precommit hook 17 | .jshint* 18 | 19 | /example/ 20 | .coveralls.yml 21 | /reports/ 22 | gulpfile.js 23 | 24 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - v5 4 | - v4 5 | - '0.12' 6 | - '0.10' 7 | after_script: 8 | - 'npm run coveralls' 9 | - 'npm run coveralls' 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Robert Chang 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 all 13 | 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 THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [](https://gitter.im/cht8687/help) 2 | 3 |  4 | 5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
33 |
34 |
37 | 38 |
39 | 40 | 41 | 一切起源: 42 | 43 | >[老实说我从来没用过JQUERY,正因为我反感JQUERY。 为什么我反感,因为我完全有开发JQUERY的能力,JQUERY的底层我都了如指掌。](https://github.com/drduan/minggeJS) 44 | >--- mingge 45 | 46 | 引擎(底层)贡献者: 47 | 48 | >[“我完全有开发明哥体生成器的能力,明哥体生成器的底层我都了如指掌”](https://github.com/drduan/minggeJS/issues/148) 49 | > --- jamesliu96 50 | 51 | ## 在线实例 52 | 53 | [http://cht8687.github.io/mingify/example/](http://cht8687.github.io/mingify/example/) 54 | 55 | ## 使用范例 56 | 57 | 如 `mingify("Angular")`返回 58 | 59 | ```js 60 | 老实说我从来没用过Angular,正因为我反感Angular。 为什么我反感,因为我完全有开发Angular的能力,Angular的底层我都了如指掌。 61 | 62 | 虽说我反感Angular,但是Angular却在测试界占有大量的用户份额,之后我有个想法,不如重新开发一个属于自己思想,自己架构的Angular。 63 | 64 | 我给了他一个霸气的名字:MingGeAngular, 65 | 66 | 它的名字叫MingGeAngular,MingGe就是我的大名, 一看到Angular名字,就知道作者是我,知道它是国产的,让别人知道国产Angular一样做得很出色,出众 67 | 68 | 我是mingge 请支持国产minggeAngular,因为我们都是中国人. 69 | ``` 70 | 71 | CLI 72 | 73 | ``` 74 | $ mingify Angular 75 | ``` 76 | 77 | ## 安装 78 | 79 | ### npm 80 | 81 | ``` 82 | $ npm install --save mingify 83 | ``` 84 | 85 | Or install CLI globally 86 | 87 | ``` 88 | $ npm install --global mingify 89 | ``` 90 | 91 |  92 | 93 | ###引用: 94 | 95 | ####ES5 96 | 97 | ```js 98 | var mingify = require('mingify'); 99 | 100 | var result = mingify("Angular"); 101 | ``` 102 | 103 | ####ES6 104 | 105 | ```js 106 | import mingify from 'mingify' 107 | 108 | const result = mingify("Angular"); 109 | ``` 110 | 111 | ## 如何克隆并开发 112 | 113 | ``` 114 | $ git clone git@github.com:cht8687/mingify.git 115 | $ cd mingify 116 | $ npm install 117 | $ webpack-dev-server 118 | ``` 119 | 120 | 然后 121 | 122 | ``` 123 | 打开 http://localhost:8080/webpack-dev-server/ 124 | ``` 125 |  126 | 127 | ## Demo项目使用技术 128 | 129 | 1. React 130 | 2. Webpack 131 | 3. Webpack-hot-reload 132 | 4. ES6 133 | 134 | 然而,在明哥面前,这些都没什么卵用。因为所有底层他都了如指掌。 135 | 136 | ## 贡献者 137 | 138 | * 主引擎,底层:[jamesliu96](https://github.com/jamesliu96) 139 | 140 | * Logo: [tianyuf](https://github.com/tianyuf) 141 | 142 | ## License 143 | 144 | MIT 145 | -------------------------------------------------------------------------------- /cli.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cht8687/mingify/4081c888b6b6137d71fb73f30df505a7e2bf2cd8/cli.gif -------------------------------------------------------------------------------- /dev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cht8687/mingify/4081c888b6b6137d71fb73f30df505a7e2bf2cd8/dev.gif -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mingify", 3 | "version": "0.2.1", 4 | "description": "明哥体生成器", 5 | "main": "dist/index.js", 6 | "bin": "dist/cli.js", 7 | "scripts": { 8 | "prepublish": "parallelshell -w \"npm run build:dist -s\" \"npm run build:example -s\" \"npm run build:bower -s\"", 9 | "prebuild": "rimraf dist example build", 10 | "build:dist": "babel src --out-dir dist --source-maps --ignore src/example", 11 | "build:example": "webpack --config webpack.config.js", 12 | "postbuild": "npm run test -s", 13 | "test": "babel-node test/index.js | tnyan", 14 | "coverage": "babel-node node_modules/isparta/bin/isparta cover test/index.js", 15 | "coveralls": "npm run coverage -s && coveralls < coverage/lcov.info", 16 | "postcoveralls": "rimraf ./coverage" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/cht8687/mingify.git" 21 | }, 22 | "keywords": [ 23 | "minggejs", 24 | "mingify" 25 | ], 26 | "files": [ 27 | "dist" 28 | ], 29 | "author": "Robert Chang