A simple setup to build vue application in typescript with vue-typed.
-
This is a project template for vue-cli. Please install first if you don't have it yet.
$ npm install -g vue-cli
-
Execute command bellow, which is
my-project
is the name of your project. vue-cli will creates a folder with this name for your new project.$ vue init vue-typed/vue-typed-boilerplate my-project
-
Just go ahead and build!
$ cd my-project $ npm install $ npm start
-
npm run start
ornpm start
: webpack + vue + vue-typed with proper config for source maps & hot-reload. -
npm run build
: a production build withHTML
/CSS
/JS
minification. Generated files will be located underdist
folder.
You'll put all your app code under src
folder where the entry point file is index.ts
(already created by this boilerplate).
This boilerplate created 3 example application files for you:
-
index.html
: main page -
src\index.ts
: app entry point -
src\container.ts
: example component
For detailed explanation on how things work, consult the docs for vue-typed.
You can fork this repo to create your own boilerplate, and use it with vue-cli
:
vue init username/repo my-project