Gathering detailed insights and metrics for generator-quality-vue3-plugin
Gathering detailed insights and metrics for generator-quality-vue3-plugin
Yeoman generator to create a Vue3 plugin with eslint, prettier, commitlint, husky, babel and other tools.
npm install generator-quality-vue3-plugin
Typescript
Module System
Node Version
NPM Version
JavaScript (98.35%)
TypeScript (0.98%)
Shell (0.67%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
2,395
Last Day
1
Last Week
4
Last Month
14
Last Year
1,991
MIT License
65 Commits
1 Watchers
2 Branches
1 Contributors
Updated on Mar 26, 2024
Latest Version
1.0.3
Package Id
generator-quality-vue3-plugin@1.0.3
Unpacked Size
78.45 kB
Size
18.92 kB
File Count
55
NPM Version
10.1.0
Node Version
20.9.0
Published on
Apr 04, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
300%
4
Compared to previous week
Last Month
-44%
14
Compared to previous month
Last Year
392.8%
1,991
Compared to previous year
28
Yeoman generator to create a Vue3 plugin with eslint, prettier, commitlint, husky, babel and other tools.
This generator was created using generator-esmodules-generator version 0.1.1
The generator-quality-vue3-plugin
provides a structure to create a Vue3 plugin similar to that used in the: @cljmenez/vue-localstorage-reactive. The structure created by this generator includes:
Example of a Vue3 plugin generated by generator-quality-vue3-plugin
:
This generator uses rollup to create the dist folder. The packages published by this generator are exported using the following structure:
package.json
1"main": "./dist/cjs/index.cjs", 2"types": "./dist/types/index.d.ts", 3"exports": { 4 "types": "./dist/types/index.d.ts", 5 "import": "./dist/esm/index.mjs", 6 "require": "./dist/cjs/index.cjs" 7}, 8"files": [ 9 "dist" 10]
First, install Yeoman and generator-quality-vue3-plugin using npm (we assume you have pre-installed node.js).
1npm install -g yo 2npm install -g generator-quality-vue3-plugin
Then generate your new project:
1yo quality-vue3-plugin
The folders created by this generator are:
__tests__
: Contains the tests.
.husky
: Contains the scripts used by husky.
coverage
: Contains the test coverage.
dist
: Includes three folders:
cjs
: Source code transpiled to es5 (index.cjs).esm
: Source code transpiled to es6 (index.mjs).types
: Declaration file (index.d.ts).src
: Contains the source code. It includes the files and folders
globals
: Contains the files to extends @vue/runtime-core
. The functions $getGreeting and $greet are added in globalProperties for this generator when it creates the default plugin:
gretting
: Example folder. Contains the functions $getGreeting and $greet.
installer
: Contains the class used to install the plugin (class that contains the install method).
main.js
: Exports the function createInstaller used to create the installer object that will be used to install the plugin in Vue3.
Example:
The main.js file also it is the entrypoint used by rollup to generate the es5 and es6 folders (see rollup.config.js or rollup.config.mjs)
index.ts
: Exports the globals/index.js content and the createInstaller. It is the entrypoint used by rollup to generate the types folder (see rollup.config.js or rollup.config.mjs)
The configuration files included are:
Eslint: .eslintignore
(the files and directories ignored by eslint) and .eslintrc.json
(configuration used by eslint).
Git: .gitignore
(the files and directories ignored by git).
Lint-staged: .lintstagedrc.json
(configuration used by lint-staged).
Prettier: .prettierignore
(the files and directories ignored by prettier) and .prettierrc.json
(configuration used by prettier).
Babel: babel.config.json
(configuration used by babel):
The env.buildCommonjs
contains the configuration used to transpile the source code to es5. It is used into rollup.config.js
and rollup.config.mjs
.
The env.buildESmodules
contains the configuration used to transpile the source code to es6. It is used into rollup.config.js
and rollup.config.mjs
.
If the package.json, generated by this generator, contains the field type:commonjs
will be included the env.test
property in babel.config.json. That property is used by jest to transpile the source code to es5 before to run the tests.
Commitlint: commitlint.config.js
(configuration used by commitlint).
Jest: jest.config.js
(configuration used by jest).
Rollup: rollup.config.js
and rollup.config.mjs
(configuration used by rollup).
TypeScript: tsconfig.json
(configuration used by TypeScript compiler).
When you selects the true value, the following scripts ubicated in the package.json are executed:
init
documentation:create
test
build
If you selects the false value, you must run npm run init
obligatory.
The more important scripts added into the package.json created by this generator are:
"init"
: Runs the commands necessary to initialize the package, for example init:husky
."documentation:create"
: Creates documentation using readme-md-generator."format"
: Checks the format using prettier."format:fix"
: Fixes the format using prettier."format:build-stage"
and "format:build-stage:fix"
: similar to "format"
and "format:fix"
. They used when the npm run build
is called."lint"
: static code analysis using eslint."lint:fix"
: Fixes the code using eslint."lint:build-stage"
and "lint:build-stage:fix"
: similar to "lint"
and "lint:fix"
. They are used when the npm run build
is called."build:bundle"
: Bundles the files into src folder using rollup. It is used when the npm run build
is called."build:tsc"
: Generates .d.ts files using the TypeScript compilator. It is used when the npm run build
is called."build"
: Generates the dist folder that contains the cjs folder (source code transpiled to es5), the esm folder (source code transpiled to es6), and types folder (it contains the declaration files)."prepublishOnly"
: Used before publishing your package using npm publish
. Runs npm run build
."test"
: Runs the tests using jest."commitlint"
: Runs commitlint. It is used into .husky/commit-msg file. It is called by the commit-msg hook. See git hook."lint-staged"
: Runs lint-staged. It is used into .husky/pre-commit file. It is called by the pre-commit hook. See git hook."quality-check"
: Runs npm run format && npm run lint && npm run test
. It is used into .husky/pre-push file. It is called by the pre-push hook See git hook.👤 Cristopher Jiménez
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2023 Cristopher Jiménez.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator
No vulnerabilities found.
No security vulnerabilities found.