-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move cli to standalone package
- Loading branch information
Showing
50 changed files
with
6,232 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": ["@nuxt/eslint-config"], | ||
"rules": { | ||
"no-extra-semi": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- run: pnpm lint | ||
- run: pnpm build | ||
- run: pnpm test:dist | ||
# - run: pnpm vitest --coverage && rm -rf coverage/tmp | ||
# - uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
.vscode | ||
.nuxt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
telemetry.enabled=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"vueIndentScriptAndStyle": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) Nuxt Team | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# nuxi-ng | ||
|
||
💫 Next Generation CLI Experience for [Nuxt](https://nuxt.com/). | ||
|
||
### 🌐 Global | ||
|
||
Elegant and powerful `nuxt` command accessible immediately from everywhere. To bootstrap, init, develop, extend build and deploy Nuxt project. | ||
|
||
### 🧩 Modular | ||
|
||
New architucture allows composing CLI sub-commands and features from various sources, making Nuxt CLI as extendable and hackable as Nuxt itself! | ||
|
||
### 🤖 Automated | ||
|
||
Bootstraping a project, adding a new module or dependency, upgrading Nuxt, changing configuration, creating a template are one command away! | ||
|
||
### 💫 Elegant | ||
|
||
With better core integration, experience an informative and fancier CLI than ever! | ||
|
||
### 🔌 Programmatic | ||
|
||
Exposing Programmatic API interface, allows interacting with CLI using Devtools and Web Browser. | ||
|
||
### ⚡️ Rapid Development | ||
|
||
With independent versioning and self-upgrade support, we can deliver new updates even faster and work on new ideas. | ||
|
||
## Usage | ||
|
||
### Install Globally (recommended) | ||
|
||
```bash | ||
npm i -g nuxi-ng | ||
``` | ||
|
||
You can now use `nuxt` command to start your projects in development mode: | ||
|
||
```bash | ||
nuxt dev | ||
``` | ||
|
||
### Add to the Project | ||
|
||
Install the new CLI dependency: | ||
|
||
```bash | ||
# pnpm | ||
pnpm add -D nuxi-ng | ||
|
||
# yarn | ||
yarn add -D nuxi-ng | ||
|
||
# npm | ||
npm i -D nuxi-ng | ||
``` | ||
|
||
Change scripts: | ||
|
||
```json | ||
{ | ||
"scripts": { | ||
"dev": "nuxi-ng dev", | ||
"start": "nuxi-ng start", | ||
"build": "nuxi-ng build", | ||
"generate": "nuxi-ng generate" | ||
} | ||
} | ||
``` | ||
|
||
## License | ||
|
||
MIT |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"name": "nuxi-ng", | ||
"version": "0.3.5", | ||
"repository": "nuxt/nuxt", | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
".": "./dist/index.mjs", | ||
"./cli": "./bin/nuxi.mjs" | ||
}, | ||
"types": "./dist/index.d.ts", | ||
"bin": { | ||
"nuxi": "./bin/nuxi.mjs", | ||
"nuxi-ng": "./bin/nuxi.mjs", | ||
"nuxt": "./bin/nuxi.mjs", | ||
"nuxt-cli": "./bin/nuxi.mjs" | ||
}, | ||
"files": [ | ||
"bin", | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "unbuild", | ||
"build:stub": "unbuild --stub", | ||
"dev": "nuxi-ng dev ./playground", | ||
"lint": "eslint . && prettier --check src", | ||
"lint:fix": "eslint --fix . && prettier --write src", | ||
"prepack": "unbuild", | ||
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags", | ||
"test": "pnpm build && pnpm test:dist", | ||
"test:dist": "node ./bin/nuxi.mjs info" | ||
}, | ||
"devDependencies": { | ||
"@nuxt/eslint-config": "^0.1.1", | ||
"@nuxt/kit": "^3.5.3", | ||
"@nuxt/schema": "^3.5.3", | ||
"@types/clear": "^0.1.2", | ||
"@types/flat": "^5.0.2", | ||
"@types/http-proxy": "^1.17.11", | ||
"@types/mri": "^1.1.1", | ||
"@types/node": "^20.3.1", | ||
"@types/semver": "^7.5.0", | ||
"boxen": "^7.1.0", | ||
"c12": "^1.4.1", | ||
"changelogen": "^0.5.3", | ||
"chokidar": "^3.5.3", | ||
"clear": "^0.1.0", | ||
"clipboardy": "^3.0.0", | ||
"colorette": "^2.0.20", | ||
"consola": "^3.1.0", | ||
"deep-object-diff": "^1.1.9", | ||
"destr": "^2.0.0", | ||
"eslint": "^8.43.0", | ||
"execa": "^7.1.1", | ||
"flat": "^5.0.2", | ||
"fuse.js": "^6.6.2", | ||
"get-port-please": "^3.0.1", | ||
"giget": "^1.1.2", | ||
"h3": "^1.6.6", | ||
"http-proxy": "^1.18.1", | ||
"jiti": "^1.18.2", | ||
"listhen": "^1.0.4", | ||
"magicast": "^0.2.9", | ||
"mlly": "^1.3.0", | ||
"mri": "^1.2.0", | ||
"nuxt": "^3.5.3", | ||
"nypm": "^0.2.1", | ||
"ofetch": "^1.1.0", | ||
"pathe": "^1.1.1", | ||
"perfect-debounce": "^1.0.0", | ||
"pkg-types": "^1.0.3", | ||
"prettier": "^2.8.8", | ||
"scule": "^1.0.0", | ||
"semver": "^7.5.2", | ||
"unbuild": "^1.2.1" | ||
}, | ||
"optionalDependencies": { | ||
"fsevents": "~2.3.2" | ||
}, | ||
"packageManager": "pnpm@8.3.1", | ||
"engines": { | ||
"node": "^14.18.0 || >=16.10.0" | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.