Vue.js development environment Quick build tutorial

Vue.js is now very popular in the backend, front end, WeChat, and mobile terminal, today Simple Simulation Vue.js Quick installation;

1. Install NPM

NPM is Node.js package management tool, installation process address: https://docs.npmjs.com/cli/install

Estimated to be very slow, we can use Taobao NPM mirror download Installation: https://npm.taobao.org/

## Install NPM ## sudo npm install -g cnpm –registry = https: //
   2. Mounting Vue 

Vue.js开发环境快速搭建教程 ## Global Install Vue-CLI ## sudo npm install -g Vue-cli

 3. Create a VUE template   
## Create a new project based on “WebPack” template SUDO VUE INIT WebPack My-Project? Project Name project name? Project Description Project Name Description? Author Author ED? USE ESLINT To LINT Your Code? Do you need an ESLIST syntax check? Setup Unit tests with karma + mocha? Do you need a unit test? Setup E2E Tests WiTH nightwatch? YES requires E2E test

Vue.js开发环境快速搭建教程

4. Mounting Vue dependencies

## Download Dependencies ## SDUO NPM Install
   Multiple dependent packs under the project path ... 

Vue.js开发环境快速搭建教程 5. Operating items

## Run VUE ## sudo npm run dev

 This command can be found in Package.json in the project ...   
“Scripts”: {“dev”: “Node Build / Dev -server.js “,” build “:” Node Build / Build.js “,” E2E “:” Node Test / E2E / Runner.js “,” Test “:” NPM Run E2E “},


At the same time, it can also be found on the VUE official website … http://Vuejs.org.cn/guide/installation.html# command line tool

Vue.js开发环境快速搭建教程

MY-Project Eason $ Sudo NPM Run Devpassword:> btbu.edu_project@1.0.0 dev / users / easy build / dev-server.jslistening at http: // localhost: 8080webpack built afe85d235050b4bfe7d7 in 3096msHash: afe85d235050b4bfe7d7Version: webpack 1.13.2Time: 3096ms Asset Size Chunks Chunk Names app.js 1.06 MB 0 [emitted] appindex.html 249 bytes [emitted] Child html-webpack-plugin for “index.html”: Asset Size Chunks Chunk Names Index.html 21.5 KB 0WebPack: Bundle Is No. Valid.

Note: The following result can occur when running, because NPM INSTALL Decrelation is not fully installed, need to execute Sudo NPM Install
   Node Build / dev-server.jsmodule.js: 341 throw Err; ^ error: Cannot Find Module 'Express 'at function.module._resolvefilename (Module.js: 339: 15) at function.Module._load (Module.js: 290: 25) At Module.Require (Module.js: 367: 17) At Require (Internal / Module) . 
(/users/eason/my-project/build/dev-server.js:2:15AT module._compile (Module.js: 413: 34) at Object.Module._extensionsions..js (Module.js: 422: 10) at module.low (Module.js: 357: 32) at function.Module. _Load (Module.js: 314: 12) at function.Module.Runmain (Module.js: 447: 10) NPM Err! Darwin 14.5.0npm Err! Argv “/ usr / local / bin / node” / usr / local / bin / npm “” run “” dev “npm err! node v5.6.0npm err! npm v3.6.0npm err! code elifecycle

run successfully listening at 8080 Port .. listening at http: // localhost: 8080
 Last browser input http: // localhost: 8080 / See the following interface Description Installation success   
Supplement Two Sublime Text Supports VUE Plugin

1.Package Control Install https://packagecontrol.io/installation#st3
2. Using pretTIFY
 in Sublime Text In, press CTRL + SHIFT + P to call up the command panel;  Enter install to call up the install package option and enter;  Enter Pretty, select HTML-CSS-JS Pretti in the listFY will be installed after returning 
PS: not very simple, do it, try

This article has been organized to the “Vue.js Front End Component Learning Tutorial”, welcome to learn to read. With regard to the tutorial of the Vue.js component, please click on the Topic Vue.js Component Learning Tutorial for learning.

The above is all the content of this article, I hope to help everyone, I hope everyone will support Tumi Cloud.
                    
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment