├── .eslintrc ├── .github └── workflows │ ├── nodejs.yml │ └── release.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── bin └── create-egg.js ├── package.json └── test └── index.test.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-egg" 3 | } 4 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | pull_request: 8 | branches: [ master ] 9 | 10 | jobs: 11 | Job: 12 | name: Node.js 13 | uses: node-modules/github-actions/.github/workflows/node-test.yml@master 14 | with: 15 | os: 'ubuntu-latest, windows-latest' 16 | version: '16, 18, 20' 17 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | branches: [ master ] 5 | 6 | jobs: 7 | release: 8 | name: Node.js 9 | uses: eggjs/github-actions/.github/workflows/node-release.yml@master 10 | secrets: 11 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 12 | GIT_TOKEN: ${{ secrets.GIT_TOKEN }} 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | logs/ 2 | npm-debug.log 3 | node_modules/ 4 | coverage/ 5 | .idea/ 6 | run/ 7 | .DS_Store 8 | *.swp 9 | 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [3.0.0](https://github.com/eggjs/create-egg/compare/v2.0.1...v3.0.0) (2023-11-28) 4 | 5 | 6 | ### ⚠ BREAKING CHANGES 7 | 8 | * drop Node.js < 16 support 9 | 10 | ### Features 11 | 12 | * use egg-init v3 ([#8](https://github.com/eggjs/create-egg/issues/8)) ([1709791](https://github.com/eggjs/create-egg/commit/1709791b14dd390692cf7047aaa52f1d6cefb268)) 13 | 14 | 2.0.1 / 2020-08-04 15 | ================== 16 | 17 | **fixes** 18 | * [[`7fd4d4b`](http://github.com/eggjs/create-egg/commit/7fd4d4bb0a5eccf47f2a5cc624cb4acff7431025)] - fix: npm publish files (#6) (TZ | 天猪 <>) 19 | 20 | 2.0.0 / 2020-08-04 21 | ================== 22 | 23 | **features** 24 | * [[`08e69e2`](http://github.com/eggjs/create-egg/commit/08e69e22dbe309af648d01c46882415ac4ee785a)] - feat: update egg-init@2 (#5) (TZ | 天猪 <>),fatal: No names found, cannot describe anything. 25 | 26 | **others** 27 | 28 | 29 | 1.0.0 / 2018-09-28 30 | ================== 31 | 32 | * feat: fist version (#1) 33 | * feat: init 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-present Alibaba Group Holding Limited and other contributors. 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-egg 2 | 3 | [![NPM version][npm-image]][npm-url] 4 | [![Node.js CI](https://github.com/eggjs/create-egg/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/create-egg/actions/workflows/nodejs.yml) 5 | [![Test coverage][codecov-image]][codecov-url] 6 | [![NPM download][download-image]][download-url] 7 | 8 | [npm-image]: https://img.shields.io/npm/v/create-egg.svg?style=flat-square 9 | [npm-url]: https://npmjs.org/package/create-egg 10 | [codecov-image]: https://codecov.io/gh/eggjs/create-egg/branch/master/graph/badge.svg 11 | [codecov-url]: https://codecov.io/gh/eggjs/create-egg 12 | [download-image]: https://img.shields.io/npm/dm/create-egg.svg?style=flat-square 13 | [download-url]: https://npmjs.org/package/create-egg 14 | 15 | Alias for [egg-init](https://github.com/eggjs/egg-init), so you could use `npm init egg showcase`. 16 | 17 | Thanks to `npm init` feature introduced at npm@6, see [npm-init](https://docs.npmjs.com/cli/init) for more details. 18 | 19 | ## Usage 20 | 21 | ```bash 22 | npm init egg showcase 23 | npm init egg showcase --type=simple 24 | ``` 25 | 26 | [MIT](LICENSE) 27 | 28 | 29 | 30 | ## Contributors 31 | 32 | |[
atian25](https://github.com/atian25)
|[
sinchang](https://github.com/sinchang)
|[
fengmk2](https://github.com/fengmk2)
|[
jasonjiicloud](https://github.com/jasonjiicloud)
| 33 | | :---: | :---: | :---: | :---: | 34 | 35 | 36 | This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Nov 28 2023 13:41:55 GMT+0800`. 37 | 38 | 39 | -------------------------------------------------------------------------------- /bin/create-egg.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('egg-init/bin/egg-init'); 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-egg", 3 | "version": "3.0.0", 4 | "description": "Alias for egg-init, so you could use `npm init egg showcase`.", 5 | "dependencies": { 6 | "egg-init": "3" 7 | }, 8 | "devDependencies": { 9 | "coffee": "^5.1.0", 10 | "egg-bin": "6", 11 | "eslint": "8", 12 | "eslint-config-egg": "13", 13 | "git-contributor": "^2.1.5" 14 | }, 15 | "bin": "./bin/create-egg.js", 16 | "engines": { 17 | "node": ">=16.0.0" 18 | }, 19 | "scripts": { 20 | "lint": "eslint .", 21 | "test": "npm run lint -- --fix && npm run test-local", 22 | "test-local": "egg-bin test", 23 | "cov": "egg-bin cov", 24 | "ci": "npm run lint && npm run cov", 25 | "contributor": "git-contributor" 26 | }, 27 | "eslintIgnore": [ 28 | "coverage", 29 | "dist" 30 | ], 31 | "repository": { 32 | "type": "git", 33 | "url": "git@github.com:eggjs/create-egg.git" 34 | }, 35 | "bug": { 36 | "url": "https://github.com/eggjs/egg/issues" 37 | }, 38 | "homepage": "https://github.com/eggjs/create-egg", 39 | "files": [ 40 | "bin" 41 | ], 42 | "author": "TZ ", 43 | "license": "MIT" 44 | } 45 | -------------------------------------------------------------------------------- /test/index.test.js: -------------------------------------------------------------------------------- 1 | const path = require('node:path'); 2 | const coffee = require('coffee'); 3 | 4 | describe('test/index.test.js', () => { 5 | const cli = path.join(__dirname, '../bin/create-egg.js'); 6 | 7 | it('should call egg-init', () => { 8 | return coffee.fork(cli, [ '--help' ]) 9 | // .debug() 10 | .expect('stdout', /init egg project from boilerplate/) 11 | .expect('code', 0) 12 | .end(); 13 | }); 14 | }); 15 | --------------------------------------------------------------------------------