This template allows for writing projects that wants to embed a Vue app (hence packaging Vue with the library and not as a dependency) in their web projects.
- Clone this repo (ideally with degit)
npx degit AndrewBastin/vue3-embedded-library-template <name_for_your_project>
- Update the
package.json
entries (likename
,version
) to the values you want. - Search for
// TODO:
and make the changes that maybe required there.
- This templates provides 3 scripts:
build
,lint
andlintfix
.build
can build the library and emit the final output into thedist
folder.lint
uses ESLint and Prettier to verify formatting and simple code related mistakes (look into.prettierrc.cjs
and.eslintrc.cjs
)lintfix
also runslint
but, when it encounters auto-fixable issues, it will update the files and update it.
- You can create a
public
folder on the root of the repo to store assets that should be directly copied todist
. - TypeScript support is present and can be configured in
tsconfig.json
)
- VS Code + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
- VS Code ESLint Extension
NOTE: These extensions are already included in the .vscode
folder as Workspace Extension Recommendations.
happy hacking! ❤️