@ucla-library/component-library-nuxt-module 1.0.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.
- package/LICENSE +13 -0
- package/README.md +80 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +6 -0
- package/dist/module.d.ts +6 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +25 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +4 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/types.d.mts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
© 2014–2022 UC Regents, Creative Commons Attribution 4.0
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Get your module up and running quickly.
|
|
3
|
+
|
|
4
|
+
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
+
- Name: My Module
|
|
6
|
+
- Package name: my-module
|
|
7
|
+
- Description: My new Nuxt module
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# Nuxt Module
|
|
11
|
+
|
|
12
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
15
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
+
|
|
17
|
+
My new Nuxt module for doing amazing things.
|
|
18
|
+
|
|
19
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
+
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
21
|
+
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
<!-- Highlight some of the features your module provide here -->
|
|
26
|
+
|
|
27
|
+
- ⛰ Auto import vue component library
|
|
28
|
+
|
|
29
|
+
## Quick Setup
|
|
30
|
+
|
|
31
|
+
Install the module to your Nuxt application with one command:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx nuxi module add @apps-monorepo-poc/nuxt-module
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
That's it! You can now use Nuxt Module in your Nuxt app ✨
|
|
38
|
+
|
|
39
|
+
## Contribution
|
|
40
|
+
|
|
41
|
+
<details>
|
|
42
|
+
<summary>Local development</summary>
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
|
|
46
|
+
# Install dependencies
|
|
47
|
+
pnpm install
|
|
48
|
+
|
|
49
|
+
# Generate type stubs
|
|
50
|
+
pnpm run dev:prepare
|
|
51
|
+
|
|
52
|
+
# Develop with the playground
|
|
53
|
+
pnpm run dev
|
|
54
|
+
|
|
55
|
+
# Build the playground
|
|
56
|
+
pnpm run dev:build
|
|
57
|
+
|
|
58
|
+
# Run ESLint
|
|
59
|
+
pnpm run lint
|
|
60
|
+
|
|
61
|
+
# Run Vitest
|
|
62
|
+
pnpm run test
|
|
63
|
+
pnpm run test:watch
|
|
64
|
+
|
|
65
|
+
# Release new version (Github action handles this)
|
|
66
|
+
pnpm relaase && pnpm publish
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
</details>
|
|
70
|
+
|
|
71
|
+
<!-- Badges -->
|
|
72
|
+
|
|
73
|
+
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
74
|
+
[npm-version-href]: https://npmjs.com/package/my-module
|
|
75
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
76
|
+
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
77
|
+
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
+
[license-href]: https://npmjs.com/package/my-module
|
|
79
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
80
|
+
[nuxt-href]: https://nuxt.com
|
package/dist/module.cjs
ADDED
package/dist/module.d.ts
ADDED
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineNuxtModule, useLogger, addComponent } from '@nuxt/kit';
|
|
2
|
+
import * as VueComponentLibrary from '@ucla-library-monorepo/ucla-library-website-components';
|
|
3
|
+
|
|
4
|
+
const module = defineNuxtModule({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "@ucla-library/component-library-nuxt-module",
|
|
7
|
+
configKey: "uclaLibraryWebsiteComponents"
|
|
8
|
+
},
|
|
9
|
+
// Default configuration options of the Nuxt module
|
|
10
|
+
defaults: {},
|
|
11
|
+
setup(_options, _nuxt) {
|
|
12
|
+
const logger = useLogger("@ucla-library/component-library-nuxt-module");
|
|
13
|
+
_nuxt.options.css.push("@ucla-library-monorepo/ucla-library-website-components/style.css");
|
|
14
|
+
Object.keys(VueComponentLibrary).forEach((component) => {
|
|
15
|
+
logger.info(`Adding component: ${component}`);
|
|
16
|
+
addComponent({
|
|
17
|
+
filePath: "@ucla-library-monorepo/ucla-library-website-components",
|
|
18
|
+
name: component,
|
|
19
|
+
export: component
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export { module as default };
|
package/dist/types.d.mts
ADDED
package/dist/types.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ucla-library/component-library-nuxt-module",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "Nuxt module to enable autoimports",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/UCLALibrary/ucla-library-website-components",
|
|
11
|
+
"directory": "packages/component-library-nuxt-module"
|
|
12
|
+
},
|
|
13
|
+
"author": "UCLA Library Application Team",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/types.d.ts",
|
|
19
|
+
"import": "./dist/module.mjs",
|
|
20
|
+
"require": "./dist/module.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"main": "./dist/module.cjs",
|
|
24
|
+
"types": "./dist/types.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"package.json"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@nuxt/kit": "^3.15.4"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@nuxt/devtools": "^1.7.0",
|
|
34
|
+
"@nuxt/eslint-config": "^0.7.6",
|
|
35
|
+
"@nuxt/module-builder": "^0.8.4",
|
|
36
|
+
"@nuxt/schema": "^3.15.4",
|
|
37
|
+
"@nuxt/test-utils": "^3.16.0",
|
|
38
|
+
"@types/node": "latest",
|
|
39
|
+
"changelogen": "^0.5.7",
|
|
40
|
+
"eslint": "^9.20.1",
|
|
41
|
+
"nuxt": "^3.15.4",
|
|
42
|
+
"typescript": "^5.7.3",
|
|
43
|
+
"vitest": "^3.0.6",
|
|
44
|
+
"vue-tsc": "^2.1.6",
|
|
45
|
+
"@ucla-library-monorepo/ucla-library-website-components": "^1.1.1"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@ucla-library-monorepo/ucla-library-website-components": "^1.1.1"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"pnpm": "^9.12.1"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"dev": "nuxi dev playground",
|
|
55
|
+
"dev:build": "nuxi build playground",
|
|
56
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare && nuxi dev playground",
|
|
57
|
+
"build": "pnpm run dev:prepare",
|
|
58
|
+
"release": "semantic-release",
|
|
59
|
+
"lint": "eslint .",
|
|
60
|
+
"lint:fix": "eslint . --fix",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"test:watch": "vitest watch",
|
|
63
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
64
|
+
}
|
|
65
|
+
}
|