It is recommended to use jsx to develop components, If you want to develop with .vue
do change with pacckage.json:
"scripts": {
- "prepublishOnly": "npm run build",
+ "prepublishOnly": "npm run build:vite",
},
-
π» Vue suport >=3.2.0
-
βοΈ Project init with vite -
π¦ Support cjs & esm
-
π you can write componet with .vue or .tsx
-
πͺ Github Actions support (Auto CI on pull_request / Auto Release on push tag / Auto Deploy on push & pull_request)
-
π Build npm package with tsup
-
Build-in vitepress
npm run docs
-
π Built-in Vue3 dev environment
playground folder
start -->
npm run dev
-
π Use browserslistrc
-
πͺ Build styles with sass && postcss (postcss-nested/ autoprefixer / cssnano)
-
π Stylelint that helps you avoid errors and enforce conventions in your styles.
-
π Mono repo with npm
-
π TypeScript, of course
-
π Unit Testing with Vitest
-
π Storybook for building UI components and pages
-
π§ ESLint statically analyzes your code to quickly find problems.
-
β Husky & lint-staged
-
β Commitlint that helps your team adhering to a commit convention
-
π₯³ MIT License
replace my-custom-vue3-package
with your package name
Project
βββ __tests__ # Unit Testing
βββ babel.config.js # babel config
βββ package.json
βββ playground # dev environment folder (can use source code)
β βββ index.html
β βββ package.json
β βββ public
β βββ src
β βββ tsconfig.json
β βββ vite-env.d.ts
β βββ vite.config.ts
βββ postcss.config.js # build styles with postcss
βββ global.d.ts # global componet type declaration (TIPS: Manual maintenance is required)
βββ src # Package source code
β βββ index.ts # Package source entry
β βββ stories # storybook for building UI components and pages
β βββ styles # styles for Package
β βββ types.ts # ts type declaration for Package
βββ tsconfig.json # ts config
βββ tsup.config.ts # build package with tsup
// main.ts
import InstallPlugin from 'my-custom-vue3-package';
app.use(InstallPlugin());
// tsconfig.json
{
"compilerOptions": {
"types": [
"my-custom-vue3-package/global"
]
}
}
- update project setting
settings -> actions -> General
-
then copy npm token, add to github project settings
- project -> settings -> secrets -> actions -> create new token with name:NPM_TOKEN
-
then copy netlify token, add to github project settings
- project -> settings -> secrets -> actions -> create new token with name:NETLIFY_TOKEN
-
create a site on netlify
-
copy the site_id from your netlify site settings, add it to github project settings
- project -> settings -> secrets -> actions -> create new token with name:NETLIFY_SITE_ID
-
Stop Build from Build settings of site
-
run
npx vercel
in project root folder -
open .vercel/project.json
-
copy orgId & projectId, add it to github project settings
- project -> settings -> secrets -> actions -> create new token with name:VERCEL_ORG_ID & VERCEL_PROJECT_ID
-
create vercel token, add it to github project settings
- project -> settings -> secrets -> actions -> create new token with name:VERCEL_TOKEN
-
change project build setting