@nuxt/module-builder 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +27 -13
  2. package/dist/cli.d.ts +1 -0
  3. package/package.json +16 -15
package/README.md CHANGED
@@ -1,22 +1,24 @@
1
1
  # 📦 Nuxt Module Builder
2
2
 
3
- > Complete solution to build Nuxt Modules.
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+ [![License][license-src]][license-href]
5
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
6
+ <a href="https://volta.net/nuxt/module-builder?utm_source=nuxt_module_builder_readme"><img src="https://user-images.githubusercontent.com/904724/209143798-32345f6c-3cf8-4e06-9659-f4ace4a6acde.svg" alt="Volta board"></a>
7
+
8
+ > The complete solution to build and ship [Nuxt modules](https://nuxt.com/modules).
4
9
 
5
10
  ## Features
6
11
 
7
- - Unified build with [unjs/unbuild](https://github.com/unjs/unbuild)
8
12
  - Compatible with Nuxt 3 and Nuxt Kit
13
+ - Unified build with [unjs/unbuild](https://github.com/unjs/unbuild)
9
14
  - Automated build config using last module spec
10
15
  - Typescript and ESM support
11
16
  - Auto generated CommonJS stubs
12
17
  - Auto generated types and shims for `@nuxt/schema`
13
18
 
19
+ We recommend to checkout the [Nuxt modules author guide](https://nuxt.com/docs/guide/going-further/modules) before starting with the module-builder.
14
20
 
15
- ## Learn More
16
-
17
- Check the new [Guide for Nuxt Modules](https://v3.nuxtjs.org/docs/advanced/modules/) before starting with module-builder.
18
-
19
- ### Requirements
21
+ ## Requirements
20
22
 
21
23
  For a user to use a module generated from module-builder, it's recommended they have:
22
24
  - Node.js >= 14.x. _Latest Node LTS preferred_
@@ -24,19 +26,19 @@ For a user to use a module generated from module-builder, it's recommended they
24
26
 
25
27
  ## Quick start
26
28
 
27
- You can quickly get started with the pre-configured [module starter](https://github.com/nuxt/starter/tree/module):
29
+ Get started with our [module starter](https://github.com/nuxt/starter/tree/module):
28
30
 
29
31
  ```bash
30
- $ npx nuxi init -t module my-module
32
+ npx nuxi init -t module my-module
31
33
  ```
32
34
 
33
35
  ## Project structure
34
36
 
35
- Using module builder, requires a special project setup. You can check an example [here](./example).
37
+ The module builder requires a special project structur. You can checkout the [module template](https://github.com/nuxt/starter/tree/module).
36
38
 
37
39
  ### `src/module.ts`
38
40
 
39
- This is the entrypoint for module definition.
41
+ The entrypoint for module definition.
40
42
 
41
43
  A default export using `defineNuxtModule` and `ModuleOptions` type export is expected.
42
44
 
@@ -132,9 +134,21 @@ Module builder generates dist files in `dist/` directory:
132
134
 
133
135
  - Clone repository
134
136
  - Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js < 16.10)
135
- - Install dependencies using `yarn install`
136
- - Try building [example module](./example) using `yarn example:build`
137
+ - Install dependencies using `pnpm install`
138
+ - Try building [example module](./example) using `pnpm example:build`
137
139
 
138
140
  ## License
139
141
 
140
142
  [MIT](./LICENSE) - Made with 💚
143
+
144
+
145
+ <!-- Badges -->
146
+ [npm-version-src]: https://img.shields.io/npm/v/@nuxt/module-builder/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
147
+ [npm-version-href]: https://npmjs.com/package/@nuxt/module-builder
148
+
149
+ [npm-downloads-src]: https://img.shields.io/npm/dt/@nuxt/module-builder.svg?style=flat&colorA=18181B&colorB=28CF8D
150
+ [npm-downloads-href]: https://npmjs.com/package/@nuxt/module-builder
151
+
152
+ [license-src]: https://img.shields.io/github/license/nuxt/module-builder.svg?style=flat&colorA=18181B&colorB=28CF8D
153
+ [license-href]: https://github.com/nuxt/module-builder/blob/main/LICENSE
154
+
package/dist/cli.d.ts CHANGED
@@ -1 +1,2 @@
1
1
 
2
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/module-builder",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Complete solution to build Nuxt Modules",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,28 +20,29 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "build": "unbuild",
23
- "example:build": "yarn nuxt-module-build ./example",
23
+ "example:build": "pnpm nuxt-module-build ./example",
24
24
  "lint": "eslint --ext .ts,.js,.mjs .",
25
25
  "nuxt-module-build": "jiti ./src/cli.ts",
26
- "prepack": "yarn build",
27
- "release": "yarn test && standard-version && git push --follow-tags && npm publish",
28
- "test": "yarn lint"
26
+ "prepack": "pnpm build",
27
+ "release": "pnpm test && standard-version && git push --follow-tags && npm publish",
28
+ "test": "pnpm lint"
29
29
  },
30
30
  "dependencies": {
31
- "consola": "^2.15.3",
32
- "mlly": "^0.5.16",
31
+ "consola": "^3.0.1",
32
+ "mlly": "^1.2.0",
33
33
  "mri": "^1.2.0",
34
- "pathe": "^0.3.9",
35
- "unbuild": "^0.9.4"
34
+ "pathe": "^1.1.0",
35
+ "unbuild": "^1.2.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@nuxt/kit": "^3.0.0-rc.11",
39
- "@nuxt/schema": "^3.0.0-rc.11",
40
- "@nuxtjs/eslint-config-typescript": "^11.0.0",
38
+ "@nuxt/kit": "^3.4.0",
39
+ "@nuxt/schema": "^3.4.0",
40
+ "@nuxtjs/eslint-config-typescript": "^12.0.0",
41
41
  "@types/mri": "^1.1.1",
42
- "@types/node": "^18.11.0",
43
- "eslint": "^8.25.0",
44
- "jiti": "^1.16.0",
42
+ "@types/node": "^18.15.11",
43
+ "eslint": "^8.38.0",
44
+ "jiti": "^1.18.2",
45
+ "nuxt": "^3.4.0",
45
46
  "standard-version": "^9.5.0"
46
47
  }
47
48
  }