├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── bin └── create-js-project.js ├── docs ├── CNAME ├── index.html ├── logo.png └── style.css ├── docs_gen ├── genDocs.js └── index.html ├── lib ├── buildTemplate.js ├── gitignore.js ├── license.js ├── questions.js └── util.js ├── package-lock.json ├── package.json └── templates ├── browser-plain ├── files │ └── src │ │ ├── index.html │ │ ├── main.js │ │ └── style.css └── template.json ├── express-fullstack ├── files │ └── src │ │ ├── app.js │ │ ├── index.js │ │ └── public │ │ ├── index.html │ │ ├── main.js │ │ └── style.css └── template.json ├── express-plain ├── files │ └── src │ │ ├── app.js │ │ └── index.js └── template.json ├── express-react-redux ├── files │ └── src │ │ ├── app.js │ │ ├── index.js │ │ └── public │ │ ├── App.css │ │ ├── App.js │ │ ├── counter.js │ │ ├── index.css │ │ ├── index.html │ │ └── index.js └── template.json ├── express-react ├── files │ └── src │ │ ├── app.js │ │ ├── index.js │ │ └── public │ │ ├── App.css │ │ ├── App.js │ │ ├── index.css │ │ ├── index.html │ │ └── index.js └── template.json ├── node-fullstack ├── files │ └── src │ │ ├── app.js │ │ ├── index.js │ │ └── public │ │ ├── index.html │ │ ├── main.js │ │ └── style.css └── template.json ├── node-plain ├── files │ └── src │ │ ├── app.js │ │ └── index.js └── template.json ├── node-react-redux ├── files │ └── src │ │ ├── app.js │ │ ├── index.js │ │ └── public │ │ ├── App.css │ │ ├── App.js │ │ ├── counter.js │ │ ├── index.css │ │ ├── index.html │ │ └── index.js └── template.json ├── node-react ├── files │ └── src │ │ ├── app.js │ │ ├── index.js │ │ └── public │ │ ├── App.css │ │ ├── App.js │ │ ├── index.css │ │ ├── index.html │ │ └── index.js └── template.json ├── react-plain ├── files │ └── src │ │ ├── App.css │ │ ├── App.js │ │ ├── index.css │ │ ├── index.html │ │ └── index.js └── template.json └── react-redux ├── files └── src │ ├── App.css │ ├── App.js │ ├── counter.js │ ├── index.css │ ├── index.html │ └── index.js └── template.json /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/* -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb-base", 3 | "rules": { 4 | "import/no-unresolved": [ 5 | "off", 6 | { 7 | "devDependencies": true 8 | } 9 | ], 10 | "no-undef": "off", 11 | "no-console": "off" 12 | }, 13 | "env": { 14 | "jest": true 15 | } 16 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | docs 2 | docs_gen -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Angelos Chalaris 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Create JavaScript Project](https://create-project.js.org/) 2 | Set up a JavaScript project by running one command. 3 | 4 | Before you start, you need to globally install `create-js-project` via npm or yarn: 5 | 6 | ```sh 7 | npm i -g create-js-project 8 | 9 | yarn global add create-js-project 10 | ``` 11 | 12 | Then, follow these 3 simple steps: 13 | 14 | 1. Create a project, optionally providing a [project-name] for your project: 15 | ``` 16 | create-js-project [project-name] 17 | 18 | npm init js-project [project-name] 19 | ``` 20 | 2. Answer the questions, such as your project's name and desired template. 21 | 3. Wait until the installation is complete and start coding! 22 | 23 | -------------------------------------------------------------------------------- /bin/create-js-project.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs-extra'); 4 | const inquirer = require('inquirer'); 5 | const chalk = require('chalk'); 6 | const argv = require('minimist')(process.argv.slice(2)); 7 | const { readTemplates, buildFromTemplate } = require('../lib/buildTemplate.js'); 8 | const { group } = require('../lib/util.js'); 9 | 10 | 11 | const templatesData = readTemplates(__dirname); 12 | const templates = { 13 | values: group(templatesData, v => v.category) 14 | .reduce((acc, v) => [...acc, new inquirer.Separator(), ...v]), 15 | }; 16 | templates.default = templates.values.findIndex(v => v.default); 17 | 18 | const questionOptions = { 19 | params: argv, 20 | currentDir: process.cwd(), 21 | templates, 22 | }; 23 | 24 | const questions = require('../lib/questions')(questionOptions); 25 | 26 | inquirer.prompt(questions).then((answers) => { 27 | if (answers.overwriteDir !== undefined && !answers.overwriteDir) { 28 | console.log(chalk.red('Please try again with a different name!')); 29 | process.exit(0); 30 | } 31 | if (answers.overwriteDir === undefined) { fs.mkdirSync(`${answers.projectName}`); } 32 | 33 | process.chdir(`./${answers.projectName}`); 34 | 35 | const selectedTemplate = templates.values.find(v => v.value === answers.projectTemplate); 36 | buildFromTemplate(__dirname, process.cwd(), selectedTemplate, answers.projectName); 37 | }); 38 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | create-project.js.org -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Create JavaScript Project · Set up a JavaScript project by running one command. 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | Create JavaScript Project 14 | 15 | 17 | 18 | 19 | 20 |
21 |
22 |
23 |

Create JavaScript Project 24 | Set up a JavaScript project by running one command. 25 |

26 | Get started 27 |
28 |
29 |
30 |

Focus on Code

31 |

You don't have to worry about build tools and configurations. All new projects come with build tools configured, instant reloading for development and build optimizations for production out of the box, so you can focus on your code.

32 |
33 |
34 |

Configurable

35 |

You can tweak your project's configuration anytime you want. Everything is set up just like you would set it up yourself, so you can change the configuration of the build tools, remove some of them or add new ones whenever you need.

36 |
37 |
38 |

Latest Tools

39 |

Your projects are powered by the latest versions of popular tools. When you start a new project, the latest versions of the appropriate dependencies are installed and configured and you can update them as your project keeps growing.

40 |
41 |
42 |
43 |
44 |

Get started 45 | It's as easy as 1, 2, 3! 46 |

47 |

Before you start, you need to globally install create-js-project via npm or yarn:

48 |
49 |
npm i -g create-js-project
50 |
yarn global add create-js-project
51 |
52 |

Then, follow these 3 simple steps:

53 |
    54 |
  1. 55 |

    Create a project, optionally providing a [project-name] for your project:

    56 |
    57 |
    create-js-project [project-name]
    58 |
    npm init js-project [project-name]
    59 |
    60 |
  2. 61 |
  3. 62 |

    Answer the questions, such as your project's name and desired template.

    63 |
  4. 64 |
  5. 65 |

    Wait until the installation is complete and start coding!

    66 |
  6. 67 |
68 |
69 |
70 | 71 |
72 |
73 |
74 |
75 | 76 |
77 |
78 |

Templates

79 |

We provide you with a handful of templates out of the box:

80 |
  • Browser - A basic template for projects that need to run in the browser.
  • 81 |
  • Express Static Server - A template for projects that run in the browser, powered by Express.
  • 82 |
  • Express HTTP Server - A basic template for an HTTP server, powered by Express.
  • 83 |
  • Express + React - An advanced template for projects based on React, powered by Express.
  • 84 |
  • Express + React + Redux - An advanced template for projects based on React and Redux, powered by Express.
  • 85 |
  • Node.js Static Server - A template for projects that run in the browser, powered by Node.js.
  • 86 |
  • Node.js HTTP Server - A basic template for an HTTP server, powered by Node.js.
  • 87 |
  • Node.js + React - An advanced template for projects based on React, powered by Node.js.
  • 88 |
  • Node.js + React + Redux - An advanced template for projects based on React and Redux, powered by Node.js.
  • 89 |
  • React - A basic template for projects based on React.
  • 90 |
  • React + Redux - A template for projects based on React and Redux.
91 |

We are planning to allow users to import their own templates from a local folder. If you want to help speed 92 | up the development of this feature, join the discussion here.

94 |
95 |
96 |
97 | 104 | 105 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chalarangelo/create-js-project/b5245afe96d6364bf9e406116ea217645f5f1e0d/docs/logo.png -------------------------------------------------------------------------------- /docs/style.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | scroll-behavior: smooth; 9 | } 10 | 11 | html, * { 12 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 13 | } 14 | 15 | body { 16 | margin: 0; 17 | } 18 | 19 | hr { 20 | box-sizing: content-box; 21 | height: 0; 22 | overflow: visible; 23 | } 24 | 25 | pre, pre * { 26 | font-family: monospace, monospace; 27 | font-size: 1em; 28 | } 29 | 30 | b, strong { 31 | font-weight: bolder; 32 | } 33 | 34 | code, kbd, samp { 35 | font-family: monospace, monospace; 36 | font-size: 0.95em; 37 | } 38 | 39 | small { 40 | font-size: 80%; 41 | } 42 | 43 | button, input, optgroup, select, textarea { 44 | font-family: inherit; 45 | font-size: 100%; 46 | line-height: 1.15; 47 | margin: 0; 48 | } 49 | 50 | button, select { 51 | text-transform: none; 52 | } 53 | 54 | button, [type="button"], [type="reset"], [type="submit"] { 55 | -webkit-appearance: button; 56 | } 57 | 58 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 59 | border-style: none; 60 | padding: 0; 61 | } 62 | 63 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 64 | outline: 1px dotted ButtonText; 65 | } 66 | 67 | /* ========================================== */ 68 | 69 | header { 70 | background: #1c2529; 71 | box-sizing: border-box; 72 | position: fixed; 73 | top: 0; 74 | left: 0; 75 | width: 100%; 76 | height: 50px; 77 | } 78 | 79 | .header-logo { 80 | margin: 7px; 81 | margin-left: calc(10% + 20px); 82 | border-radius: 10%; 83 | } 84 | 85 | .logo-title { 86 | color: #fff; 87 | font-size: 1.35rem; 88 | font-weight: 600; 89 | vertical-align: top; 90 | line-height: 50px; 91 | padding-left: 3px; 92 | } 93 | 94 | .github-link { 95 | position: fixed; 96 | top: 13px; 97 | right: calc(10% + 20px); 98 | } 99 | 100 | @media only screen and (max-width: 768px) { 101 | .header-logo { 102 | margin-left: 20px; 103 | } 104 | .github-link { 105 | right: 20px; 106 | } 107 | } 108 | 109 | @media only screen and (max-width: 360px) { 110 | .logo-title { 111 | font-size: 1rem; 112 | } 113 | .github-link { 114 | display: none; 115 | } 116 | } 117 | 118 | .docs { 119 | margin-top: 50px; 120 | } 121 | 122 | .docs .splash { 123 | height: 66vh; 124 | width: 100%; 125 | background: #232e33; 126 | text-align: center; 127 | color: #fff; 128 | } 129 | 130 | .docs .splash .logo-splash { 131 | margin-top: 10vh; 132 | border-radius: 100%; 133 | } 134 | 135 | h1 { 136 | margin: 0.67em 0; 137 | padding: 20vh 4px 20px 4px; 138 | font-weight: 600; 139 | font-size: 2rem; 140 | letter-spacing: .5px; 141 | } 142 | 143 | h1 small { 144 | margin-top: 14px; 145 | display: block; 146 | font-weight: 500; 147 | font-size: 65%; 148 | letter-spacing: 0px; 149 | word-spacing: 1px; 150 | } 151 | 152 | h2 { 153 | font-size: 1.75rem; 154 | font-weight: 500; 155 | } 156 | 157 | h2 small { 158 | font-style: italic; 159 | font-weight: 400; 160 | font-size: 80%; 161 | padding-left: 12px; 162 | } 163 | 164 | .get-started-link, .get-started-link:link, .get-started-link:visited { 165 | text-transform: uppercase; 166 | text-decoration: none; 167 | color: #fff; 168 | background: transparent; 169 | transition: .3s ease all; 170 | padding: 8px 10px; 171 | border: 1px solid #fff; 172 | border-radius: 4px; 173 | font-size: 0.8rem; 174 | } 175 | 176 | .get-started-link:hover, .get-started-link:active, .get-started-link:focus { 177 | background: #20292e; 178 | } 179 | 180 | .three-col { 181 | display: flex; 182 | flex-wrap: wrap; 183 | padding: 120px 10% 60px 10%; 184 | } 185 | 186 | .three-col > div { 187 | flex-grow: 1; 188 | width: 33%; 189 | padding: 20px; 190 | box-sizing: border-box; 191 | } 192 | 193 | .three-col h3 { 194 | font-size: 1.5rem; 195 | font-weight: 600; 196 | } 197 | 198 | .three-col p { 199 | line-height: 1.5; 200 | } 201 | 202 | .get-started { 203 | display: flex; 204 | flex-wrap: wrap; 205 | padding: 30px 10% 30px 10%; 206 | background: #F5F5F5; 207 | } 208 | 209 | .get-started > div:first-child { 210 | flex-grow: 1; 211 | width: 66%; 212 | padding: 20px; 213 | box-sizing: border-box; 214 | } 215 | .get-started > div:last-child { 216 | flex-grow: 1; 217 | width: 33%; 218 | padding: 20px; 219 | box-sizing: border-box; 220 | display: flex; 221 | flex-direction: column; 222 | justify-content: center; 223 | align-items: center; 224 | } 225 | 226 | .get-started > div:last-child > svg { 227 | background: #2962FF; 228 | padding: 16px; 229 | border-radius: 100%; 230 | box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2); 231 | } 232 | 233 | .two-pres > pre { 234 | background: #263238; 235 | display: block; 236 | margin: 8px 0; 237 | padding: 14px 20px; 238 | border-radius: 4px; 239 | color: #fff; 240 | font-size: 0.95rem; 241 | max-width: 590px; 242 | box-sizing: border-box; 243 | box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2); 244 | } 245 | 246 | ol, ul { 247 | padding: 0 20px; 248 | } 249 | 250 | ul > li { 251 | line-height: 1.4; 252 | } 253 | 254 | li > .two-pres { 255 | margin-left: -16px; 256 | margin-right: -16px; 257 | } 258 | 259 | .green { 260 | color: #43A047; 261 | } 262 | 263 | .yellow { 264 | color: #FFF59D; 265 | } 266 | 267 | .templates { 268 | display: flex; 269 | flex-wrap: wrap; 270 | padding: 30px 10% 30px 10%; 271 | } 272 | .templates > div:last-child { 273 | flex-grow: 1; 274 | width: 66%; 275 | padding: 20px; 276 | box-sizing: border-box; 277 | } 278 | .templates > div:first-child { 279 | flex-grow: 1; 280 | width: 33%; 281 | padding: 20px; 282 | box-sizing: border-box; 283 | display: flex; 284 | flex-direction: column; 285 | justify-content: center; 286 | align-items: center; 287 | } 288 | 289 | .templates > div:first-child > svg { 290 | background: #2962FF; 291 | padding: 16px; 292 | border-radius: 100%; 293 | box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2); 294 | } 295 | 296 | footer { 297 | color: #E0E0E0; 298 | background: #1c2529; 299 | margin-top: 0; 300 | padding: 20px 10%; 301 | word-spacing: 1px; 302 | } 303 | 304 | footer p { 305 | padding: 4px 20px; 306 | line-height: 1.5; 307 | font-size: 0.9rem; 308 | } 309 | 310 | a, a:link, a:visited { 311 | text-decoration: none; 312 | color: #1556d6; 313 | } 314 | 315 | @media only screen and (max-width: 768px) { 316 | .three-col { 317 | padding: 60px 0 30px 0; 318 | } 319 | .three-col > div { 320 | width: 100%; 321 | padding: 10px 20px; 322 | } 323 | .get-started { 324 | padding: 10px 0 10px 0; 325 | } 326 | .templates { 327 | padding: 10px 0 10px 0; 328 | } 329 | .get-started > div:first-child { 330 | width: 100%; 331 | } 332 | .get-started > div:last-child{ 333 | width: 100%; 334 | order: -1; 335 | padding-bottom: 0; 336 | } 337 | .templates > div:last-child { 338 | width: 100%; 339 | } 340 | .templates > div:first-child{ 341 | width: 100%; 342 | order: -1; 343 | padding-bottom: 0; 344 | } 345 | footer { 346 | padding: 10px 0 10px 0; 347 | } 348 | } 349 | -------------------------------------------------------------------------------- /docs_gen/genDocs.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | const { readTemplates } = require('../lib/buildTemplate.js'); 4 | 5 | const templatesData = readTemplates(__dirname); 6 | 7 | let index = fs.readFileSync(path.join(__dirname, 'index.html'), 'utf8'); 8 | 9 | const includedTemplates = templatesData.map( 10 | v => `
  • ${v.name} - ${v['meta:description']}
  • ` 11 | ).join('\n'); 12 | 13 | fs.writeFileSync(path.join(__dirname, '..', 'docs', 'index.html'), index.replace(/\$included_templates/g, includedTemplates)); -------------------------------------------------------------------------------- /docs_gen/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Create JavaScript Project · Set up a JavaScript project by running one command. 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 | 13 | Create JavaScript Project 14 | 15 | 17 | 18 | 19 | 20 |
    21 |
    22 |
    23 |

    Create JavaScript Project 24 | Set up a JavaScript project by running one command. 25 |

    26 | Get started 27 |
    28 |
    29 |
    30 |

    Focus on Code

    31 |

    You don't have to worry about build tools and configurations. All new projects come with build tools configured, instant reloading for development and build optimizations for production out of the box, so you can focus on your code.

    32 |
    33 |
    34 |

    Configurable

    35 |

    You can tweak your project's configuration anytime you want. Everything is set up just like you would set it up yourself, so you can change the configuration of the build tools, remove some of them or add new ones whenever you need.

    36 |
    37 |
    38 |

    Latest Tools

    39 |

    Your projects are powered by the latest versions of popular tools. When you start a new project, the latest versions of the appropriate dependencies are installed and configured and you can update them as your project keeps growing.

    40 |
    41 |
    42 |
    43 |
    44 |

    Get started 45 | It's as easy as 1, 2, 3! 46 |

    47 |

    Before you start, you need to globally install create-js-project via npm or yarn:

    48 |
    49 |
    npm i -g create-js-project
    50 |
    yarn global add create-js-project
    51 |
    52 |

    Then, follow these 3 simple steps:

    53 |
      54 |
    1. 55 |

      Create a project, optionally providing a [project-name] for your project:

      56 |
      57 |
      create-js-project [project-name]
      58 |
      npm init js-project [project-name]
      59 |
      60 |
    2. 61 |
    3. 62 |

      Answer the questions, such as your project's name and desired template.

      63 |
    4. 64 |
    5. 65 |

      Wait until the installation is complete and start coding!

      66 |
    6. 67 |
    68 |
    69 |
    70 | 71 |
    72 |
    73 |
    74 |
    75 | 76 |
    77 |
    78 |

    Templates

    79 |

    We provide you with a handful of templates out of the box:

    80 |
      $included_templates
    81 |

    We are planning to allow users to import their own templates from a local folder. If you want to help speed 82 | up the development of this feature, join the discussion here.

    84 |
    85 |
    86 |
    87 | 94 | 95 | -------------------------------------------------------------------------------- /lib/buildTemplate.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | const path = require('path'); 3 | const childProcess = require('child_process'); 4 | const chalk = require('chalk'); 5 | const license = require('./license'); 6 | const gitignore = require('./gitignore'); 7 | 8 | const readTemplates = (parentDir) => { 9 | const templatesDir = path.join(parentDir, '..', 'templates'); 10 | const subdirectories = fs.readdirSync(templatesDir) 11 | .filter(v => fs.lstatSync(path.join(templatesDir, v)).isDirectory()); 12 | const templates = subdirectories.map((dir) => { 13 | const templateData = JSON.parse(fs.readFileSync(path.join(templatesDir, dir, 'template.json'), 'utf8')); 14 | templateData.value = dir; 15 | return templateData; 16 | }); 17 | return templates; 18 | }; 19 | 20 | const buildPackageFromTemplate = (selectedTemplate, projectName) => { 21 | const packageData = { 22 | name: projectName, 23 | version: '1.0.0', 24 | description: 'A JavaScript project', 25 | main: selectedTemplate.main, 26 | scripts: selectedTemplate.scripts, 27 | repository: { 28 | type: 'git', 29 | url: '', 30 | }, 31 | keywords: [], 32 | author: '', 33 | license: 'MIT', 34 | }; 35 | return JSON.stringify(packageData, null, 2); 36 | }; 37 | 38 | const buildReadmeFromTemplate = (projectName) => { 39 | const readmeData = `# ${projectName}\nA JavaScript project\n`; 40 | return readmeData; 41 | }; 42 | 43 | const buildFromTemplate = (parentDir, workingDir, selectedTemplate, projectName) => { 44 | console.log(chalk.bold(`\n${process.platform !== 'win32' ? '🔨 ':''}Generating project files...\n`)); 45 | console.log('\tGenerating package.json...'); 46 | const packageData = buildPackageFromTemplate(selectedTemplate, projectName); 47 | fs.writeFileSync(path.join(workingDir, 'package.json'), packageData); 48 | 49 | console.log('\tGenerating README.md...'); 50 | const readmeData = buildReadmeFromTemplate(projectName); 51 | if (!fs.existsSync(path.join(workingDir, 'README.md'))) 52 | fs.writeFileSync(path.join(workingDir, 'README.md'), readmeData); 53 | 54 | console.log('\tGenerating LICENSE...'); 55 | if (!fs.existsSync(path.join(workingDir, 'LICENSE'))) 56 | fs.writeFileSync(path.join(workingDir, 'LICENSE'), license); 57 | 58 | console.log('\tGenerating .gitignore...'); 59 | if (!fs.existsSync(path.join(workingDir, '.gitignore'))) 60 | fs.writeFileSync(path.join(workingDir, '.gitignore'), gitignore); 61 | 62 | 63 | console.log('\tGenerating .npmignore...'); 64 | if(selectedTemplate.npmignore && selectedTemplate.npmignore.length) 65 | fs.writeFileSync(path.join(workingDir, '.npmignore'), selectedTemplate.npmignore.join('\n')); 66 | else 67 | fs.writeFileSync(path.join(workingDir, '.npmignore'), ''); 68 | 69 | if (selectedTemplate.eslintrc) { 70 | console.log('\tGenerating .eslintrc.json...'); 71 | fs.writeFileSync(path.join(workingDir, '.eslintrc.json'), JSON.stringify(selectedTemplate.eslintrc, null, 2)); 72 | } 73 | 74 | if (selectedTemplate.eslintignore && selectedTemplate.eslintignore.length) { 75 | console.log('\tGenerating .eslintignore...'); 76 | fs.writeFileSync(path.join(workingDir, '.eslintignore'), selectedTemplate.eslintignore.join('\n')); 77 | } 78 | 79 | if (selectedTemplate.dependencies && selectedTemplate.dependencies.length) { 80 | console.log(chalk.bold(`\n${process.platform !== 'win32' ? '🚚 ':''}Installing dependencies...\n`)); 81 | childProcess.execSync( 82 | `npm i ${selectedTemplate.dependencies.join(' ')}`, 83 | { cwd: workingDir, stdio: 'inherit' }, 84 | ); 85 | } 86 | 87 | if (selectedTemplate.devDependencies && selectedTemplate.devDependencies.length) { 88 | console.log(chalk.bold(`\n${process.platform !== 'win32' ? '🚧 ':''}Installing devDependencies...\n`)); 89 | childProcess.execSync( 90 | `npm i --save-dev ${selectedTemplate.devDependencies.join(' ')}`, 91 | { cwd: workingDir, stdio: 'inherit' }, 92 | ); 93 | } 94 | 95 | console.log(chalk.bold(`\n${process.platform !== 'win32' ? '📦 ':''}Copying template files...\n`)); 96 | const filesDir = path.join(parentDir, '..', 'templates', selectedTemplate.value, 'files'); 97 | fs.copySync(filesDir, workingDir); 98 | 99 | if (selectedTemplate.postInstall && selectedTemplate.postInstall.length) { 100 | console.log(chalk.bold(`\n${process.platform !== 'win32' ? '🔧 ':''}Running post-installation commands...\n`)); 101 | selectedTemplate.postInstall.forEach((cmd) => { 102 | childProcess.execSync(cmd, { cwd: workingDir, stdio: 'inherit' }); 103 | }); 104 | } 105 | }; 106 | 107 | module.exports = { readTemplates, buildFromTemplate }; 108 | -------------------------------------------------------------------------------- /lib/gitignore.js: -------------------------------------------------------------------------------- 1 | module.exports = `# Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | `; 63 | -------------------------------------------------------------------------------- /lib/license.js: -------------------------------------------------------------------------------- 1 | module.exports = `MIT License 2 | 3 | Copyright (c) 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 | -------------------------------------------------------------------------------- /lib/questions.js: -------------------------------------------------------------------------------- 1 | const { dirExists } = require('./util'); 2 | 3 | const questions = ({ params, templates, currentDir }) => [ 4 | { 5 | type: 'input', 6 | name: 'projectName', 7 | message: 'Specify a package name:', 8 | default() { 9 | return (params._ && params._.length) ? params._[0] : ''; 10 | }, 11 | validate(input) { 12 | return input.trim().length ? true : 'Sorry, package name cannot be empty!'; 13 | }, 14 | }, 15 | { 16 | type: 'confirm', 17 | name: 'overwriteDir', 18 | message: 'The specified directory already exists, do you want to overwrite it?', 19 | default: true, 20 | when(answers) { 21 | return dirExists(currentDir, answers.projectName); 22 | }, 23 | }, 24 | { 25 | type: 'list', 26 | name: 'projectTemplate', 27 | message: 'Choose a template:', 28 | choices: templates.values, 29 | default: templates.default, 30 | when(answers) { 31 | return answers.overwriteDir === undefined || answers.overwriteDir; 32 | }, 33 | }, 34 | ]; 35 | 36 | module.exports = questions; 37 | -------------------------------------------------------------------------------- /lib/util.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | const path = require('path'); 3 | 4 | const groupBy = (arr, fn) => arr.map(typeof fn === 'function' ? fn : val => val[fn]).reduce((acc, val, i) => { 5 | acc[val] = (acc[val] || []).concat(arr[i]); 6 | return acc; 7 | }, {}); 8 | 9 | const objectToArrays = obj => Object.keys(obj).reduce((acc, v) => [...acc, obj[v]], []); 10 | 11 | const composeRight = (...fns) => fns.reduce((f, g) => (...args) => g(f(...args))); 12 | 13 | const group = composeRight(groupBy, objectToArrays); 14 | 15 | const dirExists = (currentDir, dirName) => fs.existsSync(path.join(currentDir, dirName)); 16 | 17 | module.exports = { group, dirExists }; 18 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-js-project", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.0.0", 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", 10 | "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", 11 | "dev": true, 12 | "requires": { 13 | "@babel/highlight": "7.0.0" 14 | } 15 | }, 16 | "@babel/highlight": { 17 | "version": "7.0.0", 18 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", 19 | "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", 20 | "dev": true, 21 | "requires": { 22 | "chalk": "2.4.2", 23 | "esutils": "2.0.2", 24 | "js-tokens": "4.0.0" 25 | } 26 | }, 27 | "acorn": { 28 | "version": "6.0.5", 29 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz", 30 | "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==", 31 | "dev": true 32 | }, 33 | "acorn-jsx": { 34 | "version": "5.0.1", 35 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", 36 | "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", 37 | "dev": true 38 | }, 39 | "ajv": { 40 | "version": "6.7.0", 41 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", 42 | "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", 43 | "dev": true, 44 | "requires": { 45 | "fast-deep-equal": "2.0.1", 46 | "fast-json-stable-stringify": "2.0.0", 47 | "json-schema-traverse": "0.4.1", 48 | "uri-js": "4.2.2" 49 | } 50 | }, 51 | "ansi-escapes": { 52 | "version": "3.1.0", 53 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", 54 | "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" 55 | }, 56 | "ansi-regex": { 57 | "version": "3.0.0", 58 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", 59 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" 60 | }, 61 | "ansi-styles": { 62 | "version": "3.2.1", 63 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 64 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 65 | "requires": { 66 | "color-convert": "1.9.3" 67 | } 68 | }, 69 | "argparse": { 70 | "version": "1.0.10", 71 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 72 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 73 | "dev": true, 74 | "requires": { 75 | "sprintf-js": "1.0.3" 76 | } 77 | }, 78 | "astral-regex": { 79 | "version": "1.0.0", 80 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", 81 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", 82 | "dev": true 83 | }, 84 | "balanced-match": { 85 | "version": "1.0.0", 86 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 87 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 88 | "dev": true 89 | }, 90 | "brace-expansion": { 91 | "version": "1.1.11", 92 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 93 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 94 | "dev": true, 95 | "requires": { 96 | "balanced-match": "1.0.0", 97 | "concat-map": "0.0.1" 98 | } 99 | }, 100 | "builtin-modules": { 101 | "version": "1.1.1", 102 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 103 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", 104 | "dev": true 105 | }, 106 | "callsites": { 107 | "version": "3.0.0", 108 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", 109 | "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", 110 | "dev": true 111 | }, 112 | "chalk": { 113 | "version": "2.4.2", 114 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 115 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 116 | "requires": { 117 | "ansi-styles": "3.2.1", 118 | "escape-string-regexp": "1.0.5", 119 | "supports-color": "5.5.0" 120 | } 121 | }, 122 | "chardet": { 123 | "version": "0.7.0", 124 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", 125 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" 126 | }, 127 | "circular-json": { 128 | "version": "0.3.3", 129 | "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", 130 | "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", 131 | "dev": true 132 | }, 133 | "cli-cursor": { 134 | "version": "2.1.0", 135 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", 136 | "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", 137 | "requires": { 138 | "restore-cursor": "2.0.0" 139 | } 140 | }, 141 | "cli-width": { 142 | "version": "2.2.0", 143 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", 144 | "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" 145 | }, 146 | "color-convert": { 147 | "version": "1.9.3", 148 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 149 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 150 | "requires": { 151 | "color-name": "1.1.3" 152 | } 153 | }, 154 | "color-name": { 155 | "version": "1.1.3", 156 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 157 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 158 | }, 159 | "concat-map": { 160 | "version": "0.0.1", 161 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 162 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 163 | "dev": true 164 | }, 165 | "contains-path": { 166 | "version": "0.1.0", 167 | "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", 168 | "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", 169 | "dev": true 170 | }, 171 | "cross-spawn": { 172 | "version": "6.0.5", 173 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 174 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 175 | "dev": true, 176 | "requires": { 177 | "nice-try": "1.0.5", 178 | "path-key": "2.0.1", 179 | "semver": "5.6.0", 180 | "shebang-command": "1.2.0", 181 | "which": "1.3.1" 182 | } 183 | }, 184 | "debug": { 185 | "version": "4.1.1", 186 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 187 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 188 | "dev": true, 189 | "requires": { 190 | "ms": "2.1.1" 191 | } 192 | }, 193 | "deep-is": { 194 | "version": "0.1.3", 195 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 196 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 197 | "dev": true 198 | }, 199 | "define-properties": { 200 | "version": "1.1.3", 201 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 202 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", 203 | "dev": true, 204 | "requires": { 205 | "object-keys": "1.0.12" 206 | } 207 | }, 208 | "doctrine": { 209 | "version": "2.1.0", 210 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", 211 | "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", 212 | "dev": true, 213 | "requires": { 214 | "esutils": "2.0.2" 215 | } 216 | }, 217 | "error-ex": { 218 | "version": "1.3.2", 219 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", 220 | "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", 221 | "dev": true, 222 | "requires": { 223 | "is-arrayish": "0.2.1" 224 | } 225 | }, 226 | "es-abstract": { 227 | "version": "1.13.0", 228 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", 229 | "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", 230 | "dev": true, 231 | "requires": { 232 | "es-to-primitive": "1.2.0", 233 | "function-bind": "1.1.1", 234 | "has": "1.0.3", 235 | "is-callable": "1.1.4", 236 | "is-regex": "1.0.4", 237 | "object-keys": "1.0.12" 238 | } 239 | }, 240 | "es-to-primitive": { 241 | "version": "1.2.0", 242 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", 243 | "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", 244 | "dev": true, 245 | "requires": { 246 | "is-callable": "1.1.4", 247 | "is-date-object": "1.0.1", 248 | "is-symbol": "1.0.2" 249 | } 250 | }, 251 | "escape-string-regexp": { 252 | "version": "1.0.5", 253 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 254 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 255 | }, 256 | "eslint": { 257 | "version": "5.12.0", 258 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.12.0.tgz", 259 | "integrity": "sha512-LntwyPxtOHrsJdcSwyQKVtHofPHdv+4+mFwEe91r2V13vqpM8yLr7b1sW+Oo/yheOPkWYsYlYJCkzlFAt8KV7g==", 260 | "dev": true, 261 | "requires": { 262 | "@babel/code-frame": "7.0.0", 263 | "ajv": "6.7.0", 264 | "chalk": "2.4.2", 265 | "cross-spawn": "6.0.5", 266 | "debug": "4.1.1", 267 | "doctrine": "2.1.0", 268 | "eslint-scope": "4.0.0", 269 | "eslint-utils": "1.3.1", 270 | "eslint-visitor-keys": "1.0.0", 271 | "espree": "5.0.0", 272 | "esquery": "1.0.1", 273 | "esutils": "2.0.2", 274 | "file-entry-cache": "2.0.0", 275 | "functional-red-black-tree": "1.0.1", 276 | "glob": "7.1.3", 277 | "globals": "11.10.0", 278 | "ignore": "4.0.6", 279 | "import-fresh": "3.0.0", 280 | "imurmurhash": "0.1.4", 281 | "inquirer": "6.2.1", 282 | "js-yaml": "3.12.1", 283 | "json-stable-stringify-without-jsonify": "1.0.1", 284 | "levn": "0.3.0", 285 | "lodash": "4.17.11", 286 | "minimatch": "3.0.4", 287 | "mkdirp": "0.5.1", 288 | "natural-compare": "1.4.0", 289 | "optionator": "0.8.2", 290 | "path-is-inside": "1.0.2", 291 | "pluralize": "7.0.0", 292 | "progress": "2.0.3", 293 | "regexpp": "2.0.1", 294 | "semver": "5.6.0", 295 | "strip-ansi": "4.0.0", 296 | "strip-json-comments": "2.0.1", 297 | "table": "5.2.1", 298 | "text-table": "0.2.0" 299 | }, 300 | "dependencies": { 301 | "strip-ansi": { 302 | "version": "4.0.0", 303 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 304 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 305 | "dev": true, 306 | "requires": { 307 | "ansi-regex": "3.0.0" 308 | } 309 | } 310 | } 311 | }, 312 | "eslint-config-airbnb-base": { 313 | "version": "13.1.0", 314 | "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz", 315 | "integrity": "sha512-XWwQtf3U3zIoKO1BbHh6aUhJZQweOwSt4c2JrPDg9FP3Ltv3+YfEv7jIDB8275tVnO/qOHbfuYg3kzw6Je7uWw==", 316 | "dev": true, 317 | "requires": { 318 | "eslint-restricted-globals": "0.1.1", 319 | "object.assign": "4.1.0", 320 | "object.entries": "1.1.0" 321 | } 322 | }, 323 | "eslint-import-resolver-node": { 324 | "version": "0.3.2", 325 | "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", 326 | "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", 327 | "dev": true, 328 | "requires": { 329 | "debug": "2.6.9", 330 | "resolve": "1.9.0" 331 | }, 332 | "dependencies": { 333 | "debug": { 334 | "version": "2.6.9", 335 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 336 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 337 | "dev": true, 338 | "requires": { 339 | "ms": "2.0.0" 340 | } 341 | }, 342 | "ms": { 343 | "version": "2.0.0", 344 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 345 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 346 | "dev": true 347 | } 348 | } 349 | }, 350 | "eslint-module-utils": { 351 | "version": "2.2.0", 352 | "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", 353 | "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", 354 | "dev": true, 355 | "requires": { 356 | "debug": "2.6.9", 357 | "pkg-dir": "1.0.0" 358 | }, 359 | "dependencies": { 360 | "debug": { 361 | "version": "2.6.9", 362 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 363 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 364 | "dev": true, 365 | "requires": { 366 | "ms": "2.0.0" 367 | } 368 | }, 369 | "ms": { 370 | "version": "2.0.0", 371 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 372 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 373 | "dev": true 374 | } 375 | } 376 | }, 377 | "eslint-plugin-import": { 378 | "version": "2.14.0", 379 | "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", 380 | "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", 381 | "dev": true, 382 | "requires": { 383 | "contains-path": "0.1.0", 384 | "debug": "2.6.9", 385 | "doctrine": "1.5.0", 386 | "eslint-import-resolver-node": "0.3.2", 387 | "eslint-module-utils": "2.2.0", 388 | "has": "1.0.3", 389 | "lodash": "4.17.11", 390 | "minimatch": "3.0.4", 391 | "read-pkg-up": "2.0.0", 392 | "resolve": "1.9.0" 393 | }, 394 | "dependencies": { 395 | "debug": { 396 | "version": "2.6.9", 397 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 398 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 399 | "dev": true, 400 | "requires": { 401 | "ms": "2.0.0" 402 | } 403 | }, 404 | "doctrine": { 405 | "version": "1.5.0", 406 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", 407 | "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", 408 | "dev": true, 409 | "requires": { 410 | "esutils": "2.0.2", 411 | "isarray": "1.0.0" 412 | } 413 | }, 414 | "ms": { 415 | "version": "2.0.0", 416 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 417 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 418 | "dev": true 419 | } 420 | } 421 | }, 422 | "eslint-restricted-globals": { 423 | "version": "0.1.1", 424 | "resolved": "https://registry.npmjs.org/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz", 425 | "integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=", 426 | "dev": true 427 | }, 428 | "eslint-scope": { 429 | "version": "4.0.0", 430 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", 431 | "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", 432 | "dev": true, 433 | "requires": { 434 | "esrecurse": "4.2.1", 435 | "estraverse": "4.2.0" 436 | } 437 | }, 438 | "eslint-utils": { 439 | "version": "1.3.1", 440 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", 441 | "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", 442 | "dev": true 443 | }, 444 | "eslint-visitor-keys": { 445 | "version": "1.0.0", 446 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", 447 | "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", 448 | "dev": true 449 | }, 450 | "espree": { 451 | "version": "5.0.0", 452 | "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.0.tgz", 453 | "integrity": "sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA==", 454 | "dev": true, 455 | "requires": { 456 | "acorn": "6.0.5", 457 | "acorn-jsx": "5.0.1", 458 | "eslint-visitor-keys": "1.0.0" 459 | } 460 | }, 461 | "esprima": { 462 | "version": "4.0.1", 463 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 464 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 465 | "dev": true 466 | }, 467 | "esquery": { 468 | "version": "1.0.1", 469 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", 470 | "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", 471 | "dev": true, 472 | "requires": { 473 | "estraverse": "4.2.0" 474 | } 475 | }, 476 | "esrecurse": { 477 | "version": "4.2.1", 478 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", 479 | "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", 480 | "dev": true, 481 | "requires": { 482 | "estraverse": "4.2.0" 483 | } 484 | }, 485 | "estraverse": { 486 | "version": "4.2.0", 487 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", 488 | "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", 489 | "dev": true 490 | }, 491 | "esutils": { 492 | "version": "2.0.2", 493 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", 494 | "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", 495 | "dev": true 496 | }, 497 | "external-editor": { 498 | "version": "3.0.3", 499 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", 500 | "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", 501 | "requires": { 502 | "chardet": "0.7.0", 503 | "iconv-lite": "0.4.24", 504 | "tmp": "0.0.33" 505 | } 506 | }, 507 | "fast-deep-equal": { 508 | "version": "2.0.1", 509 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", 510 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", 511 | "dev": true 512 | }, 513 | "fast-json-stable-stringify": { 514 | "version": "2.0.0", 515 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 516 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", 517 | "dev": true 518 | }, 519 | "fast-levenshtein": { 520 | "version": "2.0.6", 521 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 522 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 523 | "dev": true 524 | }, 525 | "figures": { 526 | "version": "2.0.0", 527 | "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", 528 | "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", 529 | "requires": { 530 | "escape-string-regexp": "1.0.5" 531 | } 532 | }, 533 | "file-entry-cache": { 534 | "version": "2.0.0", 535 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", 536 | "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", 537 | "dev": true, 538 | "requires": { 539 | "flat-cache": "1.3.4", 540 | "object-assign": "4.1.1" 541 | } 542 | }, 543 | "find-up": { 544 | "version": "1.1.2", 545 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", 546 | "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", 547 | "dev": true, 548 | "requires": { 549 | "path-exists": "2.1.0", 550 | "pinkie-promise": "2.0.1" 551 | } 552 | }, 553 | "flat-cache": { 554 | "version": "1.3.4", 555 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", 556 | "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", 557 | "dev": true, 558 | "requires": { 559 | "circular-json": "0.3.3", 560 | "graceful-fs": "4.1.15", 561 | "rimraf": "2.6.3", 562 | "write": "0.2.1" 563 | } 564 | }, 565 | "fs-extra": { 566 | "version": "7.0.1", 567 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", 568 | "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", 569 | "requires": { 570 | "graceful-fs": "4.1.15", 571 | "jsonfile": "4.0.0", 572 | "universalify": "0.1.2" 573 | } 574 | }, 575 | "fs.realpath": { 576 | "version": "1.0.0", 577 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 578 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 579 | "dev": true 580 | }, 581 | "function-bind": { 582 | "version": "1.1.1", 583 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 584 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 585 | "dev": true 586 | }, 587 | "functional-red-black-tree": { 588 | "version": "1.0.1", 589 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 590 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 591 | "dev": true 592 | }, 593 | "glob": { 594 | "version": "7.1.3", 595 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 596 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", 597 | "dev": true, 598 | "requires": { 599 | "fs.realpath": "1.0.0", 600 | "inflight": "1.0.6", 601 | "inherits": "2.0.3", 602 | "minimatch": "3.0.4", 603 | "once": "1.4.0", 604 | "path-is-absolute": "1.0.1" 605 | } 606 | }, 607 | "globals": { 608 | "version": "11.10.0", 609 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.10.0.tgz", 610 | "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==", 611 | "dev": true 612 | }, 613 | "graceful-fs": { 614 | "version": "4.1.15", 615 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", 616 | "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" 617 | }, 618 | "has": { 619 | "version": "1.0.3", 620 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 621 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 622 | "dev": true, 623 | "requires": { 624 | "function-bind": "1.1.1" 625 | } 626 | }, 627 | "has-flag": { 628 | "version": "3.0.0", 629 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 630 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 631 | }, 632 | "has-symbols": { 633 | "version": "1.0.0", 634 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", 635 | "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", 636 | "dev": true 637 | }, 638 | "hosted-git-info": { 639 | "version": "2.7.1", 640 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", 641 | "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", 642 | "dev": true 643 | }, 644 | "iconv-lite": { 645 | "version": "0.4.24", 646 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 647 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 648 | "requires": { 649 | "safer-buffer": "2.1.2" 650 | } 651 | }, 652 | "ignore": { 653 | "version": "4.0.6", 654 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 655 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 656 | "dev": true 657 | }, 658 | "import-fresh": { 659 | "version": "3.0.0", 660 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", 661 | "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", 662 | "dev": true, 663 | "requires": { 664 | "parent-module": "1.0.0", 665 | "resolve-from": "4.0.0" 666 | } 667 | }, 668 | "imurmurhash": { 669 | "version": "0.1.4", 670 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 671 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 672 | "dev": true 673 | }, 674 | "inflight": { 675 | "version": "1.0.6", 676 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 677 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 678 | "dev": true, 679 | "requires": { 680 | "once": "1.4.0", 681 | "wrappy": "1.0.2" 682 | } 683 | }, 684 | "inherits": { 685 | "version": "2.0.3", 686 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 687 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 688 | "dev": true 689 | }, 690 | "inquirer": { 691 | "version": "6.2.1", 692 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", 693 | "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", 694 | "requires": { 695 | "ansi-escapes": "3.1.0", 696 | "chalk": "2.4.2", 697 | "cli-cursor": "2.1.0", 698 | "cli-width": "2.2.0", 699 | "external-editor": "3.0.3", 700 | "figures": "2.0.0", 701 | "lodash": "4.17.11", 702 | "mute-stream": "0.0.7", 703 | "run-async": "2.3.0", 704 | "rxjs": "6.3.3", 705 | "string-width": "2.1.1", 706 | "strip-ansi": "5.0.0", 707 | "through": "2.3.8" 708 | } 709 | }, 710 | "is-arrayish": { 711 | "version": "0.2.1", 712 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", 713 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", 714 | "dev": true 715 | }, 716 | "is-builtin-module": { 717 | "version": "1.0.0", 718 | "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", 719 | "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", 720 | "dev": true, 721 | "requires": { 722 | "builtin-modules": "1.1.1" 723 | } 724 | }, 725 | "is-callable": { 726 | "version": "1.1.4", 727 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", 728 | "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", 729 | "dev": true 730 | }, 731 | "is-date-object": { 732 | "version": "1.0.1", 733 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", 734 | "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", 735 | "dev": true 736 | }, 737 | "is-fullwidth-code-point": { 738 | "version": "2.0.0", 739 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 740 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" 741 | }, 742 | "is-promise": { 743 | "version": "2.1.0", 744 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", 745 | "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" 746 | }, 747 | "is-regex": { 748 | "version": "1.0.4", 749 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", 750 | "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", 751 | "dev": true, 752 | "requires": { 753 | "has": "1.0.3" 754 | } 755 | }, 756 | "is-symbol": { 757 | "version": "1.0.2", 758 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", 759 | "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", 760 | "dev": true, 761 | "requires": { 762 | "has-symbols": "1.0.0" 763 | } 764 | }, 765 | "isarray": { 766 | "version": "1.0.0", 767 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 768 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", 769 | "dev": true 770 | }, 771 | "isexe": { 772 | "version": "2.0.0", 773 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 774 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 775 | "dev": true 776 | }, 777 | "js-tokens": { 778 | "version": "4.0.0", 779 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 780 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 781 | "dev": true 782 | }, 783 | "js-yaml": { 784 | "version": "3.12.1", 785 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", 786 | "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", 787 | "dev": true, 788 | "requires": { 789 | "argparse": "1.0.10", 790 | "esprima": "4.0.1" 791 | } 792 | }, 793 | "json-schema-traverse": { 794 | "version": "0.4.1", 795 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 796 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 797 | "dev": true 798 | }, 799 | "json-stable-stringify-without-jsonify": { 800 | "version": "1.0.1", 801 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 802 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 803 | "dev": true 804 | }, 805 | "jsonfile": { 806 | "version": "4.0.0", 807 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", 808 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", 809 | "requires": { 810 | "graceful-fs": "4.1.15" 811 | } 812 | }, 813 | "levn": { 814 | "version": "0.3.0", 815 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 816 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 817 | "dev": true, 818 | "requires": { 819 | "prelude-ls": "1.1.2", 820 | "type-check": "0.3.2" 821 | } 822 | }, 823 | "load-json-file": { 824 | "version": "2.0.0", 825 | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", 826 | "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", 827 | "dev": true, 828 | "requires": { 829 | "graceful-fs": "4.1.15", 830 | "parse-json": "2.2.0", 831 | "pify": "2.3.0", 832 | "strip-bom": "3.0.0" 833 | } 834 | }, 835 | "locate-path": { 836 | "version": "2.0.0", 837 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", 838 | "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", 839 | "dev": true, 840 | "requires": { 841 | "p-locate": "2.0.0", 842 | "path-exists": "3.0.0" 843 | }, 844 | "dependencies": { 845 | "path-exists": { 846 | "version": "3.0.0", 847 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", 848 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", 849 | "dev": true 850 | } 851 | } 852 | }, 853 | "lodash": { 854 | "version": "4.17.11", 855 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", 856 | "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" 857 | }, 858 | "mimic-fn": { 859 | "version": "1.2.0", 860 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", 861 | "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" 862 | }, 863 | "minimatch": { 864 | "version": "3.0.4", 865 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 866 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 867 | "dev": true, 868 | "requires": { 869 | "brace-expansion": "1.1.11" 870 | } 871 | }, 872 | "minimist": { 873 | "version": "1.2.0", 874 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", 875 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" 876 | }, 877 | "mkdirp": { 878 | "version": "0.5.1", 879 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 880 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 881 | "dev": true, 882 | "requires": { 883 | "minimist": "0.0.8" 884 | }, 885 | "dependencies": { 886 | "minimist": { 887 | "version": "0.0.8", 888 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 889 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", 890 | "dev": true 891 | } 892 | } 893 | }, 894 | "ms": { 895 | "version": "2.1.1", 896 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 897 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", 898 | "dev": true 899 | }, 900 | "mute-stream": { 901 | "version": "0.0.7", 902 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", 903 | "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" 904 | }, 905 | "natural-compare": { 906 | "version": "1.4.0", 907 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 908 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 909 | "dev": true 910 | }, 911 | "nice-try": { 912 | "version": "1.0.5", 913 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 914 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 915 | "dev": true 916 | }, 917 | "normalize-package-data": { 918 | "version": "2.4.0", 919 | "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", 920 | "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", 921 | "dev": true, 922 | "requires": { 923 | "hosted-git-info": "2.7.1", 924 | "is-builtin-module": "1.0.0", 925 | "semver": "5.6.0", 926 | "validate-npm-package-license": "3.0.4" 927 | } 928 | }, 929 | "object-assign": { 930 | "version": "4.1.1", 931 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 932 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 933 | "dev": true 934 | }, 935 | "object-keys": { 936 | "version": "1.0.12", 937 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", 938 | "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", 939 | "dev": true 940 | }, 941 | "object.assign": { 942 | "version": "4.1.0", 943 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", 944 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", 945 | "dev": true, 946 | "requires": { 947 | "define-properties": "1.1.3", 948 | "function-bind": "1.1.1", 949 | "has-symbols": "1.0.0", 950 | "object-keys": "1.0.12" 951 | } 952 | }, 953 | "object.entries": { 954 | "version": "1.1.0", 955 | "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", 956 | "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", 957 | "dev": true, 958 | "requires": { 959 | "define-properties": "1.1.3", 960 | "es-abstract": "1.13.0", 961 | "function-bind": "1.1.1", 962 | "has": "1.0.3" 963 | } 964 | }, 965 | "once": { 966 | "version": "1.4.0", 967 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 968 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 969 | "dev": true, 970 | "requires": { 971 | "wrappy": "1.0.2" 972 | } 973 | }, 974 | "onetime": { 975 | "version": "2.0.1", 976 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", 977 | "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", 978 | "requires": { 979 | "mimic-fn": "1.2.0" 980 | } 981 | }, 982 | "optionator": { 983 | "version": "0.8.2", 984 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", 985 | "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", 986 | "dev": true, 987 | "requires": { 988 | "deep-is": "0.1.3", 989 | "fast-levenshtein": "2.0.6", 990 | "levn": "0.3.0", 991 | "prelude-ls": "1.1.2", 992 | "type-check": "0.3.2", 993 | "wordwrap": "1.0.0" 994 | } 995 | }, 996 | "os-tmpdir": { 997 | "version": "1.0.2", 998 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 999 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" 1000 | }, 1001 | "p-limit": { 1002 | "version": "1.3.0", 1003 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", 1004 | "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", 1005 | "dev": true, 1006 | "requires": { 1007 | "p-try": "1.0.0" 1008 | } 1009 | }, 1010 | "p-locate": { 1011 | "version": "2.0.0", 1012 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", 1013 | "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", 1014 | "dev": true, 1015 | "requires": { 1016 | "p-limit": "1.3.0" 1017 | } 1018 | }, 1019 | "p-try": { 1020 | "version": "1.0.0", 1021 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", 1022 | "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", 1023 | "dev": true 1024 | }, 1025 | "parent-module": { 1026 | "version": "1.0.0", 1027 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", 1028 | "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", 1029 | "dev": true, 1030 | "requires": { 1031 | "callsites": "3.0.0" 1032 | } 1033 | }, 1034 | "parse-json": { 1035 | "version": "2.2.0", 1036 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", 1037 | "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", 1038 | "dev": true, 1039 | "requires": { 1040 | "error-ex": "1.3.2" 1041 | } 1042 | }, 1043 | "path-exists": { 1044 | "version": "2.1.0", 1045 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", 1046 | "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", 1047 | "dev": true, 1048 | "requires": { 1049 | "pinkie-promise": "2.0.1" 1050 | } 1051 | }, 1052 | "path-is-absolute": { 1053 | "version": "1.0.1", 1054 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1055 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1056 | "dev": true 1057 | }, 1058 | "path-is-inside": { 1059 | "version": "1.0.2", 1060 | "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", 1061 | "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", 1062 | "dev": true 1063 | }, 1064 | "path-key": { 1065 | "version": "2.0.1", 1066 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 1067 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 1068 | "dev": true 1069 | }, 1070 | "path-parse": { 1071 | "version": "1.0.6", 1072 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", 1073 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", 1074 | "dev": true 1075 | }, 1076 | "path-type": { 1077 | "version": "2.0.0", 1078 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", 1079 | "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", 1080 | "dev": true, 1081 | "requires": { 1082 | "pify": "2.3.0" 1083 | } 1084 | }, 1085 | "pify": { 1086 | "version": "2.3.0", 1087 | "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", 1088 | "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", 1089 | "dev": true 1090 | }, 1091 | "pinkie": { 1092 | "version": "2.0.4", 1093 | "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", 1094 | "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", 1095 | "dev": true 1096 | }, 1097 | "pinkie-promise": { 1098 | "version": "2.0.1", 1099 | "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", 1100 | "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", 1101 | "dev": true, 1102 | "requires": { 1103 | "pinkie": "2.0.4" 1104 | } 1105 | }, 1106 | "pkg-dir": { 1107 | "version": "1.0.0", 1108 | "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", 1109 | "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", 1110 | "dev": true, 1111 | "requires": { 1112 | "find-up": "1.1.2" 1113 | } 1114 | }, 1115 | "pluralize": { 1116 | "version": "7.0.0", 1117 | "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", 1118 | "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", 1119 | "dev": true 1120 | }, 1121 | "prelude-ls": { 1122 | "version": "1.1.2", 1123 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 1124 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 1125 | "dev": true 1126 | }, 1127 | "progress": { 1128 | "version": "2.0.3", 1129 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 1130 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 1131 | "dev": true 1132 | }, 1133 | "punycode": { 1134 | "version": "2.1.1", 1135 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1136 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 1137 | "dev": true 1138 | }, 1139 | "read-pkg": { 1140 | "version": "2.0.0", 1141 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", 1142 | "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", 1143 | "dev": true, 1144 | "requires": { 1145 | "load-json-file": "2.0.0", 1146 | "normalize-package-data": "2.4.0", 1147 | "path-type": "2.0.0" 1148 | } 1149 | }, 1150 | "read-pkg-up": { 1151 | "version": "2.0.0", 1152 | "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", 1153 | "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", 1154 | "dev": true, 1155 | "requires": { 1156 | "find-up": "2.1.0", 1157 | "read-pkg": "2.0.0" 1158 | }, 1159 | "dependencies": { 1160 | "find-up": { 1161 | "version": "2.1.0", 1162 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", 1163 | "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", 1164 | "dev": true, 1165 | "requires": { 1166 | "locate-path": "2.0.0" 1167 | } 1168 | } 1169 | } 1170 | }, 1171 | "regexpp": { 1172 | "version": "2.0.1", 1173 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", 1174 | "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", 1175 | "dev": true 1176 | }, 1177 | "resolve": { 1178 | "version": "1.9.0", 1179 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", 1180 | "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", 1181 | "dev": true, 1182 | "requires": { 1183 | "path-parse": "1.0.6" 1184 | } 1185 | }, 1186 | "resolve-from": { 1187 | "version": "4.0.0", 1188 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1189 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1190 | "dev": true 1191 | }, 1192 | "restore-cursor": { 1193 | "version": "2.0.0", 1194 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", 1195 | "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", 1196 | "requires": { 1197 | "onetime": "2.0.1", 1198 | "signal-exit": "3.0.2" 1199 | } 1200 | }, 1201 | "rimraf": { 1202 | "version": "2.6.3", 1203 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 1204 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 1205 | "dev": true, 1206 | "requires": { 1207 | "glob": "7.1.3" 1208 | } 1209 | }, 1210 | "run-async": { 1211 | "version": "2.3.0", 1212 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", 1213 | "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", 1214 | "requires": { 1215 | "is-promise": "2.1.0" 1216 | } 1217 | }, 1218 | "rxjs": { 1219 | "version": "6.3.3", 1220 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", 1221 | "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", 1222 | "requires": { 1223 | "tslib": "1.9.3" 1224 | } 1225 | }, 1226 | "safer-buffer": { 1227 | "version": "2.1.2", 1228 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1229 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1230 | }, 1231 | "semver": { 1232 | "version": "5.6.0", 1233 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", 1234 | "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", 1235 | "dev": true 1236 | }, 1237 | "shebang-command": { 1238 | "version": "1.2.0", 1239 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 1240 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 1241 | "dev": true, 1242 | "requires": { 1243 | "shebang-regex": "1.0.0" 1244 | } 1245 | }, 1246 | "shebang-regex": { 1247 | "version": "1.0.0", 1248 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 1249 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 1250 | "dev": true 1251 | }, 1252 | "signal-exit": { 1253 | "version": "3.0.2", 1254 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 1255 | "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" 1256 | }, 1257 | "slice-ansi": { 1258 | "version": "2.0.0", 1259 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz", 1260 | "integrity": "sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ==", 1261 | "dev": true, 1262 | "requires": { 1263 | "ansi-styles": "3.2.1", 1264 | "astral-regex": "1.0.0", 1265 | "is-fullwidth-code-point": "2.0.0" 1266 | } 1267 | }, 1268 | "spdx-correct": { 1269 | "version": "3.1.0", 1270 | "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", 1271 | "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", 1272 | "dev": true, 1273 | "requires": { 1274 | "spdx-expression-parse": "3.0.0", 1275 | "spdx-license-ids": "3.0.3" 1276 | } 1277 | }, 1278 | "spdx-exceptions": { 1279 | "version": "2.2.0", 1280 | "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", 1281 | "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", 1282 | "dev": true 1283 | }, 1284 | "spdx-expression-parse": { 1285 | "version": "3.0.0", 1286 | "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", 1287 | "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", 1288 | "dev": true, 1289 | "requires": { 1290 | "spdx-exceptions": "2.2.0", 1291 | "spdx-license-ids": "3.0.3" 1292 | } 1293 | }, 1294 | "spdx-license-ids": { 1295 | "version": "3.0.3", 1296 | "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", 1297 | "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", 1298 | "dev": true 1299 | }, 1300 | "sprintf-js": { 1301 | "version": "1.0.3", 1302 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1303 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1304 | "dev": true 1305 | }, 1306 | "string-width": { 1307 | "version": "2.1.1", 1308 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", 1309 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", 1310 | "requires": { 1311 | "is-fullwidth-code-point": "2.0.0", 1312 | "strip-ansi": "4.0.0" 1313 | }, 1314 | "dependencies": { 1315 | "strip-ansi": { 1316 | "version": "4.0.0", 1317 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 1318 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 1319 | "requires": { 1320 | "ansi-regex": "3.0.0" 1321 | } 1322 | } 1323 | } 1324 | }, 1325 | "strip-ansi": { 1326 | "version": "5.0.0", 1327 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", 1328 | "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", 1329 | "requires": { 1330 | "ansi-regex": "4.0.0" 1331 | }, 1332 | "dependencies": { 1333 | "ansi-regex": { 1334 | "version": "4.0.0", 1335 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", 1336 | "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==" 1337 | } 1338 | } 1339 | }, 1340 | "strip-bom": { 1341 | "version": "3.0.0", 1342 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", 1343 | "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", 1344 | "dev": true 1345 | }, 1346 | "strip-json-comments": { 1347 | "version": "2.0.1", 1348 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1349 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 1350 | "dev": true 1351 | }, 1352 | "supports-color": { 1353 | "version": "5.5.0", 1354 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1355 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1356 | "requires": { 1357 | "has-flag": "3.0.0" 1358 | } 1359 | }, 1360 | "table": { 1361 | "version": "5.2.1", 1362 | "resolved": "https://registry.npmjs.org/table/-/table-5.2.1.tgz", 1363 | "integrity": "sha512-qmhNs2GEHNqY5fd2Mo+8N1r2sw/rvTAAvBZTaTx+Y7PHLypqyrxr1MdIu0pLw6Xvl/Gi4ONu/sdceP8vvUjkyA==", 1364 | "dev": true, 1365 | "requires": { 1366 | "ajv": "6.7.0", 1367 | "lodash": "4.17.11", 1368 | "slice-ansi": "2.0.0", 1369 | "string-width": "2.1.1" 1370 | } 1371 | }, 1372 | "text-table": { 1373 | "version": "0.2.0", 1374 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 1375 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 1376 | "dev": true 1377 | }, 1378 | "through": { 1379 | "version": "2.3.8", 1380 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1381 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" 1382 | }, 1383 | "tmp": { 1384 | "version": "0.0.33", 1385 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", 1386 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", 1387 | "requires": { 1388 | "os-tmpdir": "1.0.2" 1389 | } 1390 | }, 1391 | "tslib": { 1392 | "version": "1.9.3", 1393 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", 1394 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" 1395 | }, 1396 | "type-check": { 1397 | "version": "0.3.2", 1398 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 1399 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 1400 | "dev": true, 1401 | "requires": { 1402 | "prelude-ls": "1.1.2" 1403 | } 1404 | }, 1405 | "universalify": { 1406 | "version": "0.1.2", 1407 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 1408 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" 1409 | }, 1410 | "uri-js": { 1411 | "version": "4.2.2", 1412 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 1413 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 1414 | "dev": true, 1415 | "requires": { 1416 | "punycode": "2.1.1" 1417 | } 1418 | }, 1419 | "validate-npm-package-license": { 1420 | "version": "3.0.4", 1421 | "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", 1422 | "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", 1423 | "dev": true, 1424 | "requires": { 1425 | "spdx-correct": "3.1.0", 1426 | "spdx-expression-parse": "3.0.0" 1427 | } 1428 | }, 1429 | "which": { 1430 | "version": "1.3.1", 1431 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1432 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1433 | "dev": true, 1434 | "requires": { 1435 | "isexe": "2.0.0" 1436 | } 1437 | }, 1438 | "wordwrap": { 1439 | "version": "1.0.0", 1440 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", 1441 | "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", 1442 | "dev": true 1443 | }, 1444 | "wrappy": { 1445 | "version": "1.0.2", 1446 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1447 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1448 | "dev": true 1449 | }, 1450 | "write": { 1451 | "version": "0.2.1", 1452 | "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", 1453 | "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", 1454 | "dev": true, 1455 | "requires": { 1456 | "mkdirp": "0.5.1" 1457 | } 1458 | } 1459 | } 1460 | } 1461 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-js-project", 3 | "version": "1.0.0", 4 | "description": "Set up a JavaScript project by running one command.", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node ./bin/create-js-project.js", 8 | "build-docs": "node ./docs_gen/genDocs.js", 9 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .js --config .eslintrc.json", 10 | "lint-fix": "node ./node_modules/eslint/bin/eslint . --ext .js --fix --config .eslintrc.json" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/Chalarangelo/create-js-project.git" 15 | }, 16 | "keywords": [ 17 | "javascript", 18 | "project", 19 | "builder" 20 | ], 21 | "author": "Angelos Chalaris (chalarangelo@gmail.com)", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/Chalarangelo/create-js-project/issues" 25 | }, 26 | "homepage": "https://github.com/Chalarangelo/create-js-project#readme", 27 | "dependencies": { 28 | "chalk": "^2.4.2", 29 | "fs-extra": "^7.0.1", 30 | "inquirer": "^6.2.1", 31 | "minimist": "^1.2.0" 32 | }, 33 | "bin": { 34 | "create-js-project": "./bin/create-js-project.js" 35 | }, 36 | "preferGlobal": true, 37 | "devDependencies": { 38 | "eslint": "^5.12.0", 39 | "eslint-config-airbnb-base": "^13.1.0", 40 | "eslint-plugin-import": "^2.14.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /templates/browser-plain/files/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A JavaScript project 5 | 6 | 7 | 8 | 9 |

    A JavaScript project

    10 |
    11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/browser-plain/files/src/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function counter() { 4 | let seconds = 0; 5 | setInterval(() => { 6 | seconds += 1; 7 | document.getElementById('app').innerHTML = `

    You have been here for ${seconds} seconds.

    `; 8 | }, 1000); 9 | } 10 | 11 | counter(); 12 | -------------------------------------------------------------------------------- /templates/browser-plain/files/src/style.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/browser-plain/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "A basic template for projects that need to run in the browser.", 3 | "name": "Browser", 4 | "category": "browser", 5 | "devDependencies": [ 6 | "parcel-bundler", 7 | "eslint", 8 | "eslint-config-airbnb-base", 9 | "eslint-plugin-import" 10 | ], 11 | "main": "./dist/index.js", 12 | "scripts": { 13 | "start": "node ./node_modules/parcel-bundler/bin/cli serve ./src/index.html --port 8080", 14 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.html --out-dir ./dist/", 15 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .js --fix" 16 | }, 17 | "eslintrc": { 18 | "extends": "airbnb-base", 19 | "env": { 20 | "browser": true, 21 | "es6": true, 22 | "worker": true 23 | }, 24 | "parserOptions": { 25 | "ecmaVersion": 10, 26 | "sourceType": "script" 27 | } 28 | }, 29 | "eslintignore": [ 30 | "/dist", 31 | "/node_modules" 32 | ], 33 | "postInstall": [ 34 | "npm run build" 35 | ] 36 | } -------------------------------------------------------------------------------- /templates/express-fullstack/files/src/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | 4 | const app = express(); 5 | 6 | app.use(express.static(path.join(__dirname, 'public'))); 7 | 8 | module.exports = app; -------------------------------------------------------------------------------- /templates/express-fullstack/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/express-fullstack/files/src/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A JavaScript project 5 | 6 | 7 | 8 | 9 |

    A JavaScript project

    10 |
    11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/express-fullstack/files/src/public/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function counter() { 4 | let seconds = 0; 5 | setInterval(() => { 6 | seconds += 1; 7 | document.getElementById('app').innerHTML = `

    You have been here for ${seconds} seconds.

    `; 8 | }, 1000); 9 | } 10 | 11 | counter(); 12 | -------------------------------------------------------------------------------- /templates/express-fullstack/files/src/public/style.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/express-fullstack/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "A template for projects that run in the browser, powered by Express.", 3 | "name": "Express Static Server", 4 | "category": "node", 5 | "dependencies": [ 6 | "express" 7 | ], 8 | "devDependencies": [ 9 | "parcel-bundler", 10 | "eslint", 11 | "eslint-config-airbnb-base", 12 | "eslint-plugin-import", 13 | "nodemon", 14 | "npm-run-all" 15 | ], 16 | "main": "./dist/index.js", 17 | "scripts": { 18 | "dev:watch-backend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node --out-dir ./dist/", 19 | "dev:watch-frontend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/public/index.html --out-dir ./dist/public/", 20 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 21 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch-backend dev:watch-frontend dev:hot-reload", 22 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 23 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .js --fix" 24 | }, 25 | "eslintrc": { 26 | "extends": "airbnb-base", 27 | "env": { 28 | "browser": true, 29 | "node": true, 30 | "es6": true, 31 | "worker": true 32 | }, 33 | "parserOptions": { 34 | "ecmaVersion": 10, 35 | "sourceType": "module" 36 | }, 37 | "rules": { 38 | "no-unused-vars": "warn", 39 | "class-methods-use-this": "warn" 40 | } 41 | }, 42 | "eslintignore": [ 43 | "/dist", 44 | "/node_modules" 45 | ], 46 | "postInstall": [ 47 | "npm run build" 48 | ] 49 | } -------------------------------------------------------------------------------- /templates/express-plain/files/src/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | 3 | const html = ` 4 | 5 | 6 | A JavaScript project 7 | 8 | 9 | 10 |

    A JavaScript project

    11 | 12 | `; 13 | 14 | const app = express(); 15 | 16 | app.get('/', (req, res) => { 17 | res.set('Content-Type', 'text/html'); 18 | res.status(200).send(html); 19 | }); 20 | 21 | module.exports = app; -------------------------------------------------------------------------------- /templates/express-plain/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/express-plain/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "A basic template for an HTTP server, powered by Express.", 3 | "name": "Express HTTP Server", 4 | "category": "node", 5 | "dependencies": [ 6 | "express" 7 | ], 8 | "devDependencies": [ 9 | "parcel-bundler", 10 | "eslint", 11 | "eslint-config-airbnb-base", 12 | "eslint-plugin-import", 13 | "nodemon", 14 | "npm-run-all" 15 | ], 16 | "main": "./dist/index.js", 17 | "scripts": { 18 | "dev:watch": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node", 19 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 20 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch dev:hot-reload", 21 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 22 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .js --fix" 23 | }, 24 | "eslintrc": { 25 | "extends": "airbnb-base", 26 | "env": { 27 | "node": true, 28 | "es6": true 29 | }, 30 | "parserOptions": { 31 | "ecmaVersion": 10, 32 | "sourceType": "module" 33 | } 34 | }, 35 | "eslintignore": [ 36 | "/dist", 37 | "/node_modules" 38 | ], 39 | "postInstall": [ 40 | "npm run build" 41 | ] 42 | } -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | 4 | const app = express(); 5 | 6 | app.use(express.static(path.join(__dirname, 'public'))); 7 | 8 | module.exports = app; -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/public/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | padding: 20px; 4 | width: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/public/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | 4 | class App extends Component { 5 | constructor(props) { 6 | super(props); 7 | } 8 | render() { 9 | const { value, onIncrement, onDecrement } = this.props; 10 | return ( 11 |
    12 |

    A React app

    13 |

    14 | Clicked: {value} times 15 | {' '} 16 | 19 | {' '} 20 |

    23 |
    24 | ); 25 | } 26 | } 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/public/counter.js: -------------------------------------------------------------------------------- 1 | export default (state = 0, action) => { 2 | switch (action.type) { 3 | case 'INCREMENT': 4 | return state + 1; 5 | case 'DECREMENT': 6 | return state - 1; 7 | default: 8 | return state; 9 | } 10 | } -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/public/index.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A React app 5 | 6 | 7 | 8 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/express-react-redux/files/src/public/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { createStore } from 'redux'; 4 | import './index.css'; 5 | import App from './App'; 6 | import counter from './counter'; 7 | 8 | const store = createStore(counter); 9 | 10 | const render = () => ReactDOM.render( 11 | store.dispatch({ type: 'INCREMENT' })} 14 | onDecrement={() => store.dispatch({ type: 'DECREMENT' })} 15 | />, 16 | document.getElementById('root') 17 | ); 18 | 19 | render(); 20 | store.subscribe(render); 21 | -------------------------------------------------------------------------------- /templates/express-react-redux/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "An advanced template for projects based on React and Redux, powered by Express.", 3 | "name": "Express + React + Redux", 4 | "category": "node", 5 | "dependencies": [ 6 | "react", 7 | "react-dom", 8 | "express", 9 | "redux", 10 | "react-redux" 11 | ], 12 | "devDependencies": [ 13 | "parcel-bundler", 14 | "eslint", 15 | "eslint-config-airbnb-base", 16 | "eslint-plugin-import", 17 | "nodemon", 18 | "npm-run-all" 19 | ], 20 | "main": "./dist/index.js", 21 | "scripts": { 22 | "dev:watch-backend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node --out-dir ./dist/", 23 | "dev:watch-frontend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/public/index.html --out-dir ./dist/public/", 24 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 25 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch-backend dev:watch-frontend dev:hot-reload", 26 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 27 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .jsx,.js --fix" 28 | }, 29 | "eslintrc": { 30 | "extends": "airbnb-base", 31 | "env": { 32 | "browser": true, 33 | "node": true, 34 | "es6": true, 35 | "worker": true 36 | }, 37 | "parserOptions": { 38 | "ecmaVersion": 10, 39 | "sourceType": "module", 40 | "ecmaFeatures": { 41 | "jsx": true 42 | } 43 | }, 44 | "rules": { 45 | "no-unused-vars": "warn", 46 | "class-methods-use-this": "warn" 47 | } 48 | }, 49 | "eslintignore": [ 50 | "/dist", 51 | "/node_modules" 52 | ], 53 | "postInstall": [ 54 | "npm run build" 55 | ] 56 | } -------------------------------------------------------------------------------- /templates/express-react/files/src/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | 4 | const app = express(); 5 | 6 | app.use(express.static(path.join(__dirname, 'public'))); 7 | 8 | module.exports = app; -------------------------------------------------------------------------------- /templates/express-react/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/express-react/files/src/public/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | padding: 20px; 4 | width: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /templates/express-react/files/src/public/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
    8 |

    A React app

    9 |

    Edit src/App.js, save and reload.

    10 |
    11 | ); 12 | } 13 | } 14 | 15 | export default App; 16 | -------------------------------------------------------------------------------- /templates/express-react/files/src/public/index.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/express-react/files/src/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A React app 5 | 6 | 7 | 8 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/express-react/files/src/public/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /templates/express-react/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "An advanced template for projects based on React, powered by Express.", 3 | "name": "Express + React", 4 | "category": "node", 5 | "dependencies": [ 6 | "react", 7 | "react-dom", 8 | "express" 9 | ], 10 | "devDependencies": [ 11 | "parcel-bundler", 12 | "eslint", 13 | "eslint-config-airbnb-base", 14 | "eslint-plugin-import", 15 | "nodemon", 16 | "npm-run-all" 17 | ], 18 | "main": "./dist/index.js", 19 | "scripts": { 20 | "dev:watch-backend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node --out-dir ./dist/", 21 | "dev:watch-frontend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/public/index.html --out-dir ./dist/public/", 22 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 23 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch-backend dev:watch-frontend dev:hot-reload", 24 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 25 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .jsx,.js --fix" 26 | }, 27 | "eslintrc": { 28 | "extends": "airbnb-base", 29 | "env": { 30 | "browser": true, 31 | "node": true, 32 | "es6": true, 33 | "worker": true 34 | }, 35 | "parserOptions": { 36 | "ecmaVersion": 10, 37 | "sourceType": "module", 38 | "ecmaFeatures": { 39 | "jsx": true 40 | } 41 | }, 42 | "rules": { 43 | "no-unused-vars": "warn", 44 | "class-methods-use-this": "warn" 45 | } 46 | }, 47 | "eslintignore": [ 48 | "/dist", 49 | "/node_modules" 50 | ], 51 | "postInstall": [ 52 | "npm run build" 53 | ] 54 | } -------------------------------------------------------------------------------- /templates/node-fullstack/files/src/app.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | 5 | const mimeTypes = { 6 | '.html': 'text/html', 7 | '.js': 'text/javascript', 8 | '.css': 'text/css', 9 | '.json': 'application/json', 10 | '.png': 'image/png', 11 | '.jpg': 'image/jpg', 12 | '.gif': 'image/gif', 13 | '.wav': 'audio/wav', 14 | '.mp4': 'video/mp4', 15 | '.woff': 'application/font-woff', 16 | '.ttf': 'application/font-ttf', 17 | '.eot': 'application/vnd.ms-fontobject', 18 | '.otf': 'application/font-otf', 19 | '.svg': 'application/image/svg+xml', 20 | }; 21 | 22 | const app = http.createServer((request, response) => { 23 | let filePath = path.join(__dirname, 'public', request.url); 24 | if (filePath === path.join(__dirname, 'public', '/')) filePath = path.join(__dirname, 'public', 'index.html'); 25 | 26 | const extname = String(path.extname(filePath)).toLowerCase(); 27 | const contentType = mimeTypes[extname] || 'application/octet-stream'; 28 | 29 | fs.readFile(filePath, (error, content) => { 30 | if (error) { 31 | response.writeHead(500); 32 | response.end(`Sorry, check with the site admin for error: ${error.code} ..\n`); 33 | response.end(); 34 | } else { 35 | response.writeHead(200, { 'Content-Type': contentType }); 36 | response.end(content, 'utf-8'); 37 | } 38 | }); 39 | }); 40 | 41 | module.exports = app; -------------------------------------------------------------------------------- /templates/node-fullstack/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/node-fullstack/files/src/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A JavaScript project 5 | 6 | 7 | 8 | 9 |

    A JavaScript project

    10 |
    11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/node-fullstack/files/src/public/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function counter() { 4 | let seconds = 0; 5 | setInterval(() => { 6 | seconds += 1; 7 | document.getElementById('app').innerHTML = `

    You have been here for ${seconds} seconds.

    `; 8 | }, 1000); 9 | } 10 | 11 | counter(); 12 | -------------------------------------------------------------------------------- /templates/node-fullstack/files/src/public/style.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/node-fullstack/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "A template for projects that run in the browser, powered by Node.js.", 3 | "name": "Node.js Static Server", 4 | "category": "node", 5 | "devDependencies": [ 6 | "parcel-bundler", 7 | "eslint", 8 | "eslint-config-airbnb-base", 9 | "eslint-plugin-import", 10 | "nodemon", 11 | "npm-run-all" 12 | ], 13 | "main": "./dist/index.js", 14 | "scripts": { 15 | "dev:watch-backend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node --out-dir ./dist/", 16 | "dev:watch-frontend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/public/index.html --out-dir ./dist/public/", 17 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 18 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch-backend dev:watch-frontend dev:hot-reload", 19 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 20 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .js --fix" 21 | }, 22 | "eslintrc": { 23 | "extends": "airbnb-base", 24 | "env": { 25 | "browser": true, 26 | "node": true, 27 | "es6": true, 28 | "worker": true 29 | }, 30 | "parserOptions": { 31 | "ecmaVersion": 10, 32 | "sourceType": "module" 33 | }, 34 | "rules": { 35 | "no-unused-vars": "warn", 36 | "class-methods-use-this": "warn" 37 | } 38 | }, 39 | "eslintignore": [ 40 | "/dist", 41 | "/node_modules" 42 | ], 43 | "postInstall": [ 44 | "npm run build" 45 | ] 46 | } -------------------------------------------------------------------------------- /templates/node-plain/files/src/app.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | 3 | const html = ` 4 | 5 | 6 | A JavaScript project 7 | 8 | 9 | 10 |

    A JavaScript project

    11 | 12 | `; 13 | 14 | const app = new http.Server(); 15 | 16 | app.on('request', (req, res) => { 17 | res.writeHead(200, { 'Content-Type': 'text/html' }); 18 | res.write(html); 19 | res.end('\n'); 20 | }); 21 | 22 | module.exports = app; -------------------------------------------------------------------------------- /templates/node-plain/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/node-plain/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "A basic template for an HTTP server, powered by Node.js.", 3 | "name": "Node.js HTTP Server", 4 | "category": "node", 5 | "devDependencies": [ 6 | "parcel-bundler", 7 | "eslint", 8 | "eslint-config-airbnb-base", 9 | "eslint-plugin-import", 10 | "nodemon", 11 | "npm-run-all" 12 | ], 13 | "main": "./dist/index.js", 14 | "scripts": { 15 | "dev:watch": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node --out-dir ./dist/", 16 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 17 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch dev:hot-reload", 18 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 19 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .js --fix" 20 | }, 21 | "eslintrc": { 22 | "extends": "airbnb-base", 23 | "env": { 24 | "node": true, 25 | "es6": true 26 | }, 27 | "parserOptions": { 28 | "ecmaVersion": 10, 29 | "sourceType": "module" 30 | } 31 | }, 32 | "eslintignore": [ 33 | "/dist", 34 | "/node_modules" 35 | ], 36 | "postInstall": [ 37 | "npm run build" 38 | ] 39 | } -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/app.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | 5 | const mimeTypes = { 6 | '.html': 'text/html', 7 | '.js': 'text/javascript', 8 | '.css': 'text/css', 9 | '.json': 'application/json', 10 | '.png': 'image/png', 11 | '.jpg': 'image/jpg', 12 | '.gif': 'image/gif', 13 | '.wav': 'audio/wav', 14 | '.mp4': 'video/mp4', 15 | '.woff': 'application/font-woff', 16 | '.ttf': 'application/font-ttf', 17 | '.eot': 'application/vnd.ms-fontobject', 18 | '.otf': 'application/font-otf', 19 | '.svg': 'application/image/svg+xml', 20 | }; 21 | 22 | const app = http.createServer((request, response) => { 23 | let filePath = path.join(__dirname, 'public', request.url); 24 | if (filePath === path.join(__dirname, 'public', '/')) filePath = path.join(__dirname, 'public', 'index.html'); 25 | 26 | const extname = String(path.extname(filePath)).toLowerCase(); 27 | const contentType = mimeTypes[extname] || 'application/octet-stream'; 28 | 29 | fs.readFile(filePath, (error, content) => { 30 | if (error) { 31 | response.writeHead(500); 32 | response.end(`Sorry, check with the site admin for error: ${error.code} ..\n`); 33 | response.end(); 34 | } else { 35 | response.writeHead(200, { 'Content-Type': contentType }); 36 | response.end(content, 'utf-8'); 37 | } 38 | }); 39 | }); 40 | 41 | module.exports = app; -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/public/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | padding: 20px; 4 | width: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/public/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | 4 | class App extends Component { 5 | constructor(props) { 6 | super(props); 7 | } 8 | render() { 9 | const { value, onIncrement, onDecrement } = this.props; 10 | return ( 11 |
    12 |

    A React app

    13 |

    14 | Clicked: {value} times 15 | {' '} 16 | 19 | {' '} 20 |

    23 |
    24 | ); 25 | } 26 | } 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/public/counter.js: -------------------------------------------------------------------------------- 1 | export default (state = 0, action) => { 2 | switch (action.type) { 3 | case 'INCREMENT': 4 | return state + 1; 5 | case 'DECREMENT': 6 | return state - 1; 7 | default: 8 | return state; 9 | } 10 | } -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/public/index.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A React app 5 | 6 | 7 | 8 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/node-react-redux/files/src/public/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { createStore } from 'redux'; 4 | import './index.css'; 5 | import App from './App'; 6 | import counter from './counter'; 7 | 8 | const store = createStore(counter); 9 | 10 | const render = () => ReactDOM.render( 11 | store.dispatch({ type: 'INCREMENT' })} 14 | onDecrement={() => store.dispatch({ type: 'DECREMENT' })} 15 | />, 16 | document.getElementById('root') 17 | ); 18 | 19 | render(); 20 | store.subscribe(render); 21 | -------------------------------------------------------------------------------- /templates/node-react-redux/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "An advanced template for projects based on React and Redux, powered by Node.js.", 3 | "name": "Node.js + React + Redux", 4 | "category": "node", 5 | "dependencies": [ 6 | "react", 7 | "react-dom", 8 | "redux", 9 | "react-redux" 10 | ], 11 | "devDependencies": [ 12 | "parcel-bundler", 13 | "eslint", 14 | "eslint-config-airbnb-base", 15 | "eslint-plugin-import", 16 | "nodemon", 17 | "npm-run-all" 18 | ], 19 | "main": "./dist/index.js", 20 | "scripts": { 21 | "dev:watch-backend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node --out-dir ./dist/", 22 | "dev:watch-frontend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/public/index.html --out-dir ./dist/public/", 23 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 24 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch-backend dev:watch-frontend dev:hot-reload", 25 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 26 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .jsx,.js --fix" 27 | }, 28 | "eslintrc": { 29 | "extends": "airbnb-base", 30 | "env": { 31 | "browser": true, 32 | "node": true, 33 | "es6": true, 34 | "worker": true 35 | }, 36 | "parserOptions": { 37 | "ecmaVersion": 10, 38 | "sourceType": "module", 39 | "ecmaFeatures": { 40 | "jsx": true 41 | } 42 | }, 43 | "rules": { 44 | "no-unused-vars": "warn", 45 | "class-methods-use-this": "warn" 46 | } 47 | }, 48 | "eslintignore": [ 49 | "/dist", 50 | "/node_modules" 51 | ], 52 | "postInstall": [ 53 | "npm run build" 54 | ] 55 | } -------------------------------------------------------------------------------- /templates/node-react/files/src/app.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | 5 | const mimeTypes = { 6 | '.html': 'text/html', 7 | '.js': 'text/javascript', 8 | '.css': 'text/css', 9 | '.json': 'application/json', 10 | '.png': 'image/png', 11 | '.jpg': 'image/jpg', 12 | '.gif': 'image/gif', 13 | '.wav': 'audio/wav', 14 | '.mp4': 'video/mp4', 15 | '.woff': 'application/font-woff', 16 | '.ttf': 'application/font-ttf', 17 | '.eot': 'application/vnd.ms-fontobject', 18 | '.otf': 'application/font-otf', 19 | '.svg': 'application/image/svg+xml', 20 | }; 21 | 22 | const app = http.createServer((request, response) => { 23 | let filePath = path.join(__dirname, 'public', request.url); 24 | if (filePath === path.join(__dirname, 'public', '/')) filePath = path.join(__dirname, 'public', 'index.html'); 25 | 26 | const extname = String(path.extname(filePath)).toLowerCase(); 27 | const contentType = mimeTypes[extname] || 'application/octet-stream'; 28 | 29 | fs.readFile(filePath, (error, content) => { 30 | if (error) { 31 | response.writeHead(500); 32 | response.end(`Sorry, check with the site admin for error: ${error.code} ..\n`); 33 | response.end(); 34 | } else { 35 | response.writeHead(200, { 'Content-Type': contentType }); 36 | response.end(content, 'utf-8'); 37 | } 38 | }); 39 | }); 40 | 41 | module.exports = app; -------------------------------------------------------------------------------- /templates/node-react/files/src/index.js: -------------------------------------------------------------------------------- 1 | const app = require('./app'); 2 | 3 | const port = '8888'; 4 | 5 | app.listen(port, () => { 6 | console.log(`Server is listening on port ${port}...`); 7 | }); -------------------------------------------------------------------------------- /templates/node-react/files/src/public/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | padding: 20px; 4 | width: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /templates/node-react/files/src/public/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
    8 |

    A React app

    9 |

    Edit src/App.js, save and reload.

    10 |
    11 | ); 12 | } 13 | } 14 | 15 | export default App; 16 | -------------------------------------------------------------------------------- /templates/node-react/files/src/public/index.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/node-react/files/src/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A React app 5 | 6 | 7 | 8 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/node-react/files/src/public/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /templates/node-react/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "An advanced template for projects based on React, powered by Node.js.", 3 | "name": "Node.js + React", 4 | "category": "node", 5 | "dependencies": [ 6 | "react", 7 | "react-dom" 8 | ], 9 | "devDependencies": [ 10 | "parcel-bundler", 11 | "eslint", 12 | "eslint-config-airbnb-base", 13 | "eslint-plugin-import", 14 | "nodemon", 15 | "npm-run-all" 16 | ], 17 | "main": "./dist/index.js", 18 | "scripts": { 19 | "dev:watch-backend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/index.js --target node --out-dir ./dist/", 20 | "dev:watch-frontend": "node ./node_modules/parcel-bundler/bin/cli watch ./src/public/index.html --out-dir ./dist/public/", 21 | "dev:hot-reload": "node ./node_modules/nodemon/bin/nodemon --watch ./dist/ ./dist/index.js", 22 | "start": "node ./node_modules/npm-run-all/bin/npm-run-all -p -r dev:watch-backend dev:watch-frontend dev:hot-reload", 23 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.js --target node --out-dir ./dist/", 24 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .jsx,.js --fix" 25 | }, 26 | "eslintrc": { 27 | "extends": "airbnb-base", 28 | "env": { 29 | "browser": true, 30 | "node": true, 31 | "es6": true, 32 | "worker": true 33 | }, 34 | "parserOptions": { 35 | "ecmaVersion": 10, 36 | "sourceType": "module", 37 | "ecmaFeatures": { 38 | "jsx": true 39 | } 40 | }, 41 | "rules": { 42 | "no-unused-vars": "warn", 43 | "class-methods-use-this": "warn" 44 | } 45 | }, 46 | "eslintignore": [ 47 | "/dist", 48 | "/node_modules" 49 | ], 50 | "postInstall": [ 51 | "npm run build" 52 | ] 53 | } -------------------------------------------------------------------------------- /templates/react-plain/files/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | padding: 20px; 4 | width: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /templates/react-plain/files/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | 4 | class App extends Component { 5 | render() { 6 | return ( 7 |
    8 |

    A React app

    9 |

    Edit src/App.js, save and reload.

    10 |
    11 | ); 12 | } 13 | } 14 | 15 | export default App; 16 | -------------------------------------------------------------------------------- /templates/react-plain/files/src/index.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/react-plain/files/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A React app 5 | 6 | 7 | 8 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/react-plain/files/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /templates/react-plain/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "A basic template for projects based on React.", 3 | "name": "React", 4 | "category": "react", 5 | "dependencies": [ 6 | "react", 7 | "react-dom" 8 | ], 9 | "devDependencies": [ 10 | "parcel-bundler", 11 | "eslint", 12 | "eslint-config-airbnb-base", 13 | "eslint-plugin-import", 14 | "eslint-plugin-jsx-a11y", 15 | "eslint-plugin-react" 16 | ], 17 | "main": "./dist/index.js", 18 | "scripts": { 19 | "start": "node ./node_modules/parcel-bundler/bin/cli serve ./src/index.html --port 8080", 20 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.html --out-dir ./dist/", 21 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .jsx,.js --fix" 22 | }, 23 | "eslintrc": { 24 | "extends": "airbnb-base", 25 | "env": { 26 | "browser": true, 27 | "es6": true, 28 | "worker": true 29 | }, 30 | "parserOptions": { 31 | "ecmaVersion": 10, 32 | "sourceType": "module", 33 | "ecmaFeatures": { 34 | "jsx": true 35 | } 36 | }, 37 | "rules": { 38 | "no-unused-vars": "warn", 39 | "class-methods-use-this": "warn" 40 | } 41 | }, 42 | "eslintignore": [ 43 | "/dist", 44 | "/node_modules" 45 | ], 46 | "postInstall": [ 47 | "npm run build" 48 | ] 49 | } -------------------------------------------------------------------------------- /templates/react-redux/files/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | padding: 20px; 4 | width: 100%; 5 | } 6 | -------------------------------------------------------------------------------- /templates/react-redux/files/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './App.css'; 3 | 4 | class App extends Component { 5 | constructor(props) { 6 | super(props); 7 | } 8 | render() { 9 | const { value, onIncrement, onDecrement } = this.props; 10 | return ( 11 |
    12 |

    A React app

    13 |

    14 | Clicked: {value} times 15 | {' '} 16 | 19 | {' '} 20 |

    23 |
    24 | ); 25 | } 26 | } 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /templates/react-redux/files/src/counter.js: -------------------------------------------------------------------------------- 1 | export default (state = 0, action) => { 2 | switch (action.type) { 3 | case 'INCREMENT': 4 | return state + 1; 5 | case 'DECREMENT': 6 | return state - 1; 7 | default: 8 | return state; 9 | } 10 | } -------------------------------------------------------------------------------- /templates/react-redux/files/src/index.css: -------------------------------------------------------------------------------- 1 | /* Opinionated CSS defaults based on: 2 | ! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css 3 | */ 4 | 5 | html { 6 | line-height: 1.2; 7 | -webkit-text-size-adjust: 100%; 8 | } 9 | 10 | html, * { 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif; 12 | } 13 | 14 | body { 15 | margin: 0; 16 | } 17 | 18 | h1 { 19 | font-size: 2em; 20 | margin: 0.67em 0; 21 | } 22 | 23 | hr { 24 | box-sizing: content-box; 25 | height: 0; 26 | overflow: visible; 27 | } 28 | 29 | pre { 30 | font-family: monospace, monospace; 31 | font-size: 1em; 32 | } 33 | 34 | b, strong { 35 | font-weight: bolder; 36 | } 37 | 38 | code, kbd, samp { 39 | font-family: monospace, monospace; 40 | font-size: 1em; 41 | } 42 | 43 | small { 44 | font-size: 80%; 45 | } 46 | 47 | sub, sup { 48 | font-size: 75%; 49 | line-height: 0; 50 | position: relative; 51 | vertical-align: baseline; 52 | } 53 | 54 | sub { 55 | bottom: -0.25em; 56 | } 57 | 58 | sup { 59 | top: -0.5em; 60 | } 61 | 62 | button, input, optgroup, select, textarea { 63 | font-family: inherit; 64 | font-size: 100%; 65 | line-height: 1.15; 66 | margin: 0; 67 | } 68 | 69 | button, select { 70 | text-transform: none; 71 | } 72 | 73 | button, [type="button"], [type="reset"], [type="submit"] { 74 | -webkit-appearance: button; 75 | } 76 | 77 | button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { 78 | border-style: none; 79 | padding: 0; 80 | } 81 | 82 | button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { 83 | outline: 1px dotted ButtonText; 84 | } 85 | 86 | fieldset { 87 | padding: 0.35em 0.75em 0.625em; 88 | } 89 | 90 | legend { 91 | padding: 0; 92 | } 93 | 94 | progress { 95 | vertical-align: baseline; 96 | } 97 | 98 | [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { 99 | height: auto; 100 | } 101 | 102 | [type="search"] { 103 | -webkit-appearance: textfield; 104 | outline-offset: -2px; 105 | } 106 | 107 | [type="search"]::-webkit-search-decoration { 108 | -webkit-appearance: none; 109 | } 110 | 111 | ::-webkit-file-upload-button { 112 | -webkit-appearance: button; 113 | font: inherit; 114 | } 115 | 116 | [hidden] { 117 | display: none; 118 | } 119 | -------------------------------------------------------------------------------- /templates/react-redux/files/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A React app 5 | 6 | 7 | 8 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/react-redux/files/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { createStore } from 'redux'; 4 | import './index.css'; 5 | import App from './App'; 6 | import counter from './counter'; 7 | 8 | const store = createStore(counter); 9 | 10 | const render = () => ReactDOM.render( 11 | store.dispatch({ type: 'INCREMENT' })} 14 | onDecrement={() => store.dispatch({ type: 'DECREMENT' })} 15 | />, 16 | document.getElementById('root') 17 | ); 18 | 19 | render(); 20 | store.subscribe(render); 21 | -------------------------------------------------------------------------------- /templates/react-redux/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta:description": "A template for projects based on React and Redux.", 3 | "name": "React + Redux", 4 | "category": "react", 5 | "dependencies": [ 6 | "react", 7 | "react-dom", 8 | "redux", 9 | "react-redux" 10 | ], 11 | "devDependencies": [ 12 | "parcel-bundler", 13 | "eslint", 14 | "eslint-config-airbnb-base", 15 | "eslint-plugin-import", 16 | "eslint-plugin-jsx-a11y", 17 | "eslint-plugin-react" 18 | ], 19 | "main": "./dist/index.js", 20 | "scripts": { 21 | "start": "node ./node_modules/parcel-bundler/bin/cli serve ./src/index.html --port 8080", 22 | "build": "node ./node_modules/parcel-bundler/bin/cli build ./src/index.html --out-dir ./dist/", 23 | "lint": "node ./node_modules/eslint/bin/eslint . --ext .jsx,.js --fix" 24 | }, 25 | "eslintrc": { 26 | "extends": "airbnb-base", 27 | "env": { 28 | "browser": true, 29 | "es6": true, 30 | "worker": true 31 | }, 32 | "parserOptions": { 33 | "ecmaVersion": 10, 34 | "sourceType": "module", 35 | "ecmaFeatures": { 36 | "jsx": true 37 | } 38 | }, 39 | "rules": { 40 | "no-unused-vars": "warn", 41 | "class-methods-use-this": "warn" 42 | } 43 | }, 44 | "eslintignore": [ 45 | "/dist", 46 | "/node_modules" 47 | ], 48 | "postInstall": [ 49 | "npm run build" 50 | ] 51 | } --------------------------------------------------------------------------------