diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1fc71a265..580edb296 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -63,6 +63,6 @@ jobs:
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
echo "//registry.yarnpkg.com/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
- yarn release || true
+ yarn release
env:
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
diff --git a/.gitignore b/.gitignore
index 98dfa2053..b4cdf5e1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,5 @@ sw.js
cache
.vercel_build_output
.output
-package-lock.json
\ No newline at end of file
+package-lock.json
+npm/modules.json
diff --git a/README.md b/README.md
index 20452bdb9..b92567bd4 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,8 @@ Metadata of nuxt modules are maintained in [yml](https://en.wikipedia.org/wiki/Y
Compiled JSON data is available from following CDNs:
-- **jsdelivr:**: https://cdn.jsdelivr.net/npm/@nuxt/modules@latest/dist/modules.json
-- **unpkg:** https://unpkg.com/@nuxt/modules@latest/dist/modules.json
+- **jsdelivr:**: https://cdn.jsdelivr.net/npm/@nuxt/modules@latest/modules.json
+- **unpkg:** https://unpkg.com/@nuxt/modules@latest/modules.json
### Using npm package
@@ -81,7 +81,7 @@ To sync with a branch different than `master`, suffix the repo with `#repo-branc
yarn sync
```
-### Generate `dist/module.json`
+### Generate `npm/modules.json`
```sh
yarn build
@@ -90,7 +90,6 @@ yarn build
## Website development
- Clone repository
-- Change working directory to website using `cd website`
- Install website depenedencies using `npx yarn install`
Start development:
@@ -103,19 +102,6 @@ Then visit http://localhost:3000
In the development, the npm downloads and GitHub stars will be mocked unless setting `USE_NUXT_API` variable.
-### Production build
-
-
-```sh
-yarn build
-```
-
-Start the production website:
-
-```sh
-yarn start
-```
-
## License
[MIT](./LICENSE) - Made by Nuxt Team
diff --git a/lib/categories.json b/npm/categories.json
similarity index 100%
rename from lib/categories.json
rename to npm/categories.json
diff --git a/npm/package.json b/npm/package.json
new file mode 100644
index 000000000..700f608ab
--- /dev/null
+++ b/npm/package.json
@@ -0,0 +1,6 @@
+{
+ "name": "@nuxt/modules",
+ "version": "0.5.0",
+ "license": "MIT",
+ "main": "./modules.json"
+}
diff --git a/package.json b/package.json
index 25b362ac8..9cdc766ea 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,15 @@
{
- "name": "@nuxt/modules",
- "version": "0.5.0",
- "license": "MIT",
- "main": "dist/modules.json",
- "files": [
- "dist"
+ "private": true,
+ "workspaces": [
+ "npm",
+ "website"
],
"scripts": {
- "build": "yarn sync && yarn cli build",
+ "build": "yarn cli build",
"cli": "jiti ./scripts/cli",
+ "dev": "cd website && yarn dev",
"lint": "eslint --ext .vue,.ts .",
- "release": "yarn cli version && npm publish",
+ "release": "yarn cli version && cd npm && npm publish",
"sync": "yarn cli sync",
"test": "yarn lint && yarn sync"
},
diff --git a/scripts/modules.ts b/scripts/modules.ts
index b8968b4ec..7515de790 100644
--- a/scripts/modules.ts
+++ b/scripts/modules.ts
@@ -4,7 +4,7 @@ import * as yml from 'js-yaml'
import { globby } from 'globby'
import defu from 'defu'
import { $fetch } from 'ohmyfetch'
-import categories from '../lib/categories.json'
+import categories from '../npm/categories.json'
import { fetchGithubPkg, modulesDir, distDir, distFile } from './utils'
export async function sync (name, repo?: string, isNew: boolean = false) {
diff --git a/scripts/utils.ts b/scripts/utils.ts
index fadb3ee18..287f67e51 100644
--- a/scripts/utils.ts
+++ b/scripts/utils.ts
@@ -2,7 +2,7 @@ import { resolve } from 'path'
import { $fetch } from 'ohmyfetch'
export const rootDir = resolve(__dirname, '..')
export const modulesDir = resolve(rootDir, 'modules')
-export const distDir = resolve(rootDir, 'dist')
+export const distDir = resolve(rootDir, 'npm')
export const distFile = resolve(distDir, 'modules.json')
export function fetchPKG (name) {
diff --git a/scripts/version.ts b/scripts/version.ts
index b6cae0b1e..ba428b8d6 100644
--- a/scripts/version.ts
+++ b/scripts/version.ts
@@ -7,7 +7,7 @@ import { build } from './modules'
export async function version () {
await build()
- const pkgFile = path.resolve(rootDir, 'package.json')
+ const pkgFile = path.resolve(rootDir, 'npm/package.json')
const pkg = JSON.parse(await fsp.readFile(pkgFile, 'utf8'))
const hash = hasha(await fsp.readFile(distFile, 'utf8')).substr(0, 6)
diff --git a/website/components/TheSearch.vue b/website/components/TheSearch.vue
index 854ad495f..cf4143299 100644
--- a/website/components/TheSearch.vue
+++ b/website/components/TheSearch.vue
@@ -10,23 +10,22 @@