Skip to content

A OBE:WDS Vite/Vue TypeScript component package development kit with Tailwind CSS, VitePress and Vitest integrations

License

Notifications You must be signed in to change notification settings

obewds/vite-vue-ts-compo-pkg-starter

Repository files navigation

vite-vue-ts-compo-pkg-starter

The @obewds/vite-vue-ts-compo-pkg-starter modular design system component for Vue.js

GitHub package.json version   npm

Vue.js   TailwindCSS   TypeScript   NodeJS   Dependabot



Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Recommended IDE Setup

Type Support For .vue Imports in TS

Since TypeScript cannot handle type information for .vue imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in .vue imports (for example to get props validation when using manual h(...) calls), you can enable Volar's Take Over mode by following these steps:

  1. Run Extensions: Show Built-in Extensions from VS Code's command palette, look for TypeScript and JavaScript Language Features, then right click and select Disable (Workspace). By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
  2. Reload the VS Code window by running Developer: Reload Window from the command palette.

You can learn more about Take Over mode here.


Getting Started With This Starter

Once the repo is local, you can install dependencies with:

npm install

To initialize your repository's files specific to your new repo/component name (under the @obewds namespace), run:

npm run init:as -- your-repo-name

And to generate all of the files after changing the names to your repo/component name, use:

npm run publish:prep

Then you can launch Vite and the Workspace app and a separate local vite server for your docs with:

npm run dev
npm run docs:dev

And of course you can run tests with:

npm run test
npm run coverage

And last but not least, you can remove the init:as script used to init the template files for your @obewds namespaced repository name, using:

npm run delete:init:as

Don't forget to remove the npm scripts "init:as" and "delete:init:as" from your package.json file after running the delete:init:as command!

And after you've removed the npm scripts, it's safe to do a quick search of the repo files for the string InitContent and delete the file, and component import, and the component instance. And that will finish up clearing out all of the no longer needed content and files following the init:as process!

Lastly, delete this section and the Vite/Vue section above to prep this file for publishing to npm!



Documentation

Check out the official docs for this component for more details!

Or check out the CHANGELOG for the code base!



Installation

npm install @obewds/vite-vue-ts-compo-pkg-starter --save-dev


Uninstall

npm uninstall @obewds/vite-vue-ts-compo-pkg-starter

About

A OBE:WDS Vite/Vue TypeScript component package development kit with Tailwind CSS, VitePress and Vitest integrations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published