/vue3-embedded-library-template

A library template for using an embedded Vue 3 app within your web apps

Primary LanguageTypeScript

vue3-embedded-library-template



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.


Project Setup

  1. Clone this repo (ideally with degit)
npx degit AndrewBastin/vue3-embedded-library-template <name_for_your_project>
  1. Update the package.json entries (like name, version) to the values you want.
  2. Search for // TODO: and make the changes that maybe required there.


Things provided by this template

  1. This templates provides 3 scripts: build, lint and lintfix.
    • build can build the library and emit the final output into the dist folder.
    • lint uses ESLint and Prettier to verify formatting and simple code related mistakes (look into .prettierrc.cjs and .eslintrc.cjs)
    • lintfix also runs lint but, when it encounters auto-fixable issues, it will update the files and update it.
  2. You can create a public folder on the root of the repo to store assets that should be directly copied to dist.
  3. TypeScript support is present and can be configured in tsconfig.json)


Recommended IDE Setup

NOTE: These extensions are already included in the .vscode folder as Workspace Extension Recommendations.




happy hacking! ❤️