Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple CLI for scaffolding Vue.js projects

License

NotificationsYou must be signed in to change notification settings

jrtkcoder/vue-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple CLI for scaffolding Vue.js projects.

Installation

Prerequisites:Node.js andGit.

$ npm install -g vue-cli

Usage

$ vue init webpack my-project$cd my-project$ npm install$ npm run dev

The above command pulls the template fromvuejs-templates/webpack, prompts for some information, and generates the project at.my-project/.

Official Templates

The purpose of official Vue project templates are to provide opinionated, battery-included development tooling setups so that users can get started with actual app code as fast as possible. However, these templates are un-opinionated in terms of how you structure your app code and what libraries you use in addition to Vue.js.

All official project templates are repos in thevuejs-templates organization. When a new template is added to the organization, you will be able to runvue init <template-name> <project-name> to use that template. You can also runvue list to see all available official templates.

Current available templates include:

  • browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.

  • browserify-simple - A simple Browserify + vueify setup for quick prototyping.

  • webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.

  • webpack-simple - A simple Webpack + vue-loader setup for quick prototyping.

Custom Templates

It's unlikely to make everyone happy with the official templates. You can simply fork an official template and then use it viavue-cli with:

vue init username/repo my-project

Whereusername/repo is the GitHub repo shorthand for your fork.

The shorthand repo notation is passed todownload-git-repo so you can also use things likebitbucket:username/repo for a Bitbucket repo andusername/repo#branch for tags or branches.

You can also create your own template from scratch:

  • A template repomust have atemplate directory that holds the template files.

  • All template files will be piped through Handlebars for simple templating -vue-cli will automatically infer the prompts based on{{}} interpolations found in the files.

  • A template repomay have ameta.json file that provides a schema for the prompts. The schema will be passed toprompt-for as options. Seeexample.

While developing your template you can test viavue-cli with:

vue init~/fs/path/to-custom-template my-project

About

Simple CLI for scaffolding Vue.js projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript98.7%
  • Other1.3%

[8]ページ先頭

©2009-2025 Movatter.jp