Coder Social home page Coder Social logo

vuejs-model's Introduction

vuejs-model

构建新的Vue.js2项目

使用vue/cli 3.x

yarn global add @vue/cli

初始化项目

vue create 你的项目名

# 回车回车用yarn之类的选项了

安装常用包

# vue其实核心件:
yarn add vue-router vuex

# 前端全家福:
yarn add jquery bootstrap font-awesome popper.js vue-loader vue-html-loader vue-style-loader css-loader

# 验证、ajax请求、i18n翻译、cookies:
yarn add vee-validate vue-axios vue-i18n js-cookie

找回配置文件

因为vue-cli3改变了项目结构,之前的配置文件方式改变了,需要自己新建几个文件

新建 .env、 .env.local 文件

在项目中,也就是src中使用环境变量的话,必须以VUE_APP_开头。例如我们可以在main.js中直接输出:console.log(process.env.VUE_APP_SECRET)

新建 vue.config.js 文件

Project setup

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Customize configuration

See Configuration Reference.

vuejs-model's People

Contributors

liyingxuan 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.