GithubHelp home page GithubHelp logo

yingfengchen / vue-typescript-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonzhangiter/vue-typescript-template

0.0 2.0 0.0 1.16 MB

:zap: A simple TypeScript CLI for scaffolding Vue.js projects.

License: MIT License

Shell 0.68% JavaScript 91.01% HTML 0.67% Vue 5.17% TypeScript 2.47%

vue-typescript-template's Introduction

Vue-TypeScript-Template

A simple TypeScript CLI for scaffolding Vue.js projects.

Installation

Prerequisites: Node.js (>=4.x, 6.x preferred), npm version 3+ and Git.

$ npm install -g vue-cli

Usage

vue init SimonZhangITer/vue-typescript-template <project-name>

Example:

$ vue init SimonZhangITer/vue-typescript-template my-project

The above command pulls the template from here, prompts for some information, and generates the project at ./my-project/.

Demo

i wrote a vue-typescript-demo project for practice, it recorded how I configured it and how to use vue.js with typescript

In Addition

vuex

add vuex option at initialization time, it will create src/store folder, and it had configed, like this:

src
├──store
   ├──actions.ts
   ├──mutations.ts
   ├──getters.ts
   ├──types.ts

vue-class-component

add vue-class-componet by default, and vue perfect support for it, it will make your code more flat and beautiful, you will like it.

What's Included

  • npm run dev: first-in-class development experience.

    • Webpack + vue-loader for single file Vue components.
    • State preserving hot-reload
    • State preserving compilation error overlay
    • Lint-on-save with ESLint
    • Source maps
  • npm run build: Production ready build.

    • JavaScript minified with UglifyJS v3.
    • HTML minified with html-minifier.
    • CSS across all components extracted into a single file and minified with cssnano.
    • Static assets compiled with version hashes for efficient long-term caching, and an auto-generated production index.html with proper URLs to these generated assets.
    • Use npm run build --reportto build with bundle size analytics.
  • npm run unit: Unit tests run in JSDOM with Jest, or in PhantomJS with Karma + Mocha + karma-webpack.

    • Supports ES2015+ in test files.
    • Easy mocking.
  • npm run e2e: End-to-end tests with Nightwatch.

    • Run tests in multiple browsers in parallel.
    • Works with one command out of the box:
      • Selenium and chromedriver dependencies automatically handled.
      • Automatically spawns the Selenium server.

vue-typescript-template's People

Contributors

yyx990803 avatar linusborg avatar chrisvfritz avatar zigomir avatar sudo-suhas avatar simonzhangiter avatar robwierzbowski avatar posva avatar myst729 avatar hootlex avatar panjiachen avatar gucong3000 avatar exarus avatar pksunkara avatar pespantelis avatar limichange avatar danielpe05 avatar afontcu avatar bernhardreiter avatar funkylover avatar toilal avatar aladdin-add avatar zzhjerry avatar anubhav7495 avatar wayneharris avatar sidkwok avatar mgenware avatar markussorg avatar anvaka avatar aspectis avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.