vue-cli 脚手架 Command Line Interface
mac
sudo npm install -g nrm
sudo npm config -g set unsafe-perm
sudo npm install webpack@3.0.0 -g
sudo npm install --global webpack-cli
sudo npm install --global vue-cli
vue-cli 脚手架 Command Line Interface
使用管理员身份运行 "命令行提示符"
1. npm install --global webpack
2. npm install --global webpack-cli // 参考
npm install -g vue-cli // 全局安装 脚手架,如果安装不了就使用: 3. npm install --global vue-cli
4. vue init webpack my-vue // 生成项目 工程文件夹 npm run dev 启动项目

简写 "rc" ----的意思是----- runtime control
build -------- 不是构建项目,而是暴露的 webpack 的配置
config/index.js -------- 可能会根据需要修改
webpack.base.conf.js // 可以修改项目入口文件 main.js
5. autoOpenBrowser: true, // 启动项目后自动打开浏览器
.babelrc -------- babel 的配置 - (多个预设插件包的集合)预设包 presets - 插件包 plugins
"env" ---- 已加入规范的语法
"stage-2" ---- 草案语法
"plugins" ---- 社区语法
eslint* -------- 语法检查
.eslintignore -------- 对指定文件或文件夹下的指定文件不做检查
*.js
*.vue
.eslintrc.js
// 关闭检查 0、开启检查 1警告级别,开启检查2错误级别
// /* eslint-disable no-new */ // 告诉编译器下面这行是正确的
rules:{
'indent': "off",
no-unused-vars: 0
}
...
index.html -------- 网站首页
<div id="app">
</div>
main.js
import Vue from 'vue'
import App from "./App.vue"
new Vue({
el: "#app",
components: {APP},
template: "<App/>"
})
组件: 实现某功能模块的所有资源的集合
App.vue 通常称为“一个组件”
<template>
<div>
{{myVueData}}
<MyComponent/>
</div>
</template>
-----------------------------------------------------------------
<script>
import MyComponent from "./components/MyComponent.vue" // 1. 引入组件
export default {
name: "App",
conponents: {
MyComponent // 2. 必须注册组件,才能使用
}
data(){ // 只能使用函数的方式来配置 data
return {
myVueData: "Hello World!"
}
}
}
</script>
-----------------------------------------------------------------
<style scoped> // 设置 scoped 表示 该样式只在当前组件生效,而不影响其他部分
</style>
项目发包 serve dist
vue-cli 脚手架 Command Line Interface的更多相关文章
- Spring-boot在windows上安装CLI(Command Line Interface)的步骤!
首先去下载安装包,我这里整了一个zip包,一个tar包,下载地址:https://github.com/zhangyawei117/Spring-boot-CLI.git 下载完了之后,把zip包解压 ...
- Install the AWS Command Line Interface on Linux
Install the AWS Command Line Interface on Linux You can install the AWS Command Line Interface and i ...
- 13. Vue CLI脚手架
一. Vue CLI 介绍 1. 什么是Vue CLI? Vue CLI 是一个基于 Vue.js 进行快速开发的完整系统.Vue CLI 致力于将 Vue 生态中的工具基础标准化.它确保了各种构建工 ...
- MySQL 5.6 Warning: Using a password on the command line interface can be insecure
MySQL 5.6 在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be inse ...
- MySQL 5.6 警告信息 command line interface can be insecure 修复
在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be insecure. 注: ...
- atprogram.exe : Atmel Studio Command Line Interface
C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atprogram.exe No command specified.Atmel Studio Co ...
- Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: [Warning] Using a password on the command line interface can be insecure.
在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local ...
- Warning: Using a password on the command line interface can be insecure.
[root@qttc ~]# /usr/local/mysql/bin/mysqldump -uroot -proot db > bak.sqlWarning: Using a passwor ...
- mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure.
-------------------------------------------------------------------------------- mysql 备份报错mysqldump ...
随机推荐
- python GUI 之 tkinter
写一个 登陆窗口来学习 tkinter ,还剩下一些问题 代码暂时如下 import tkinter as tk import webbrowser import pickle from tkinte ...
- js值类型转换(boolean/String/number),js运算符,if条件,循环结构,函数,三种弹出框
js值类型转换 number | string | boolean boolean类型转换 num = 0; var b1 = Boolean(num); console.log(b1) 转化为数字类 ...
- HTTP中application/x-www-form-urlencoded字符说明
一.概述 在学习ajax的时候,如果用post请求,需要设置如下代码. ajax.setRequestHeader("content-type","application ...
- Vue2.0的三种常用传值方式、父传子、子传父、非父子组件传值
参考链接:https://blog.csdn.net/lander_xiong/article/details/79018737
- 【easy】110. Balanced Binary Tree判断二叉树是否平衡
判断二叉树是否平衡 a height-balanced binary tree is defined as a binary tree in which the depth of the two su ...
- An overview of network penetration testing
1. an SQLi vulnerability will allow you to do the following query the database using select statem ...
- MySQL视图,函数,触发器,存储过程
1. 视图 视图是一个虚拟表,它的本质是根据SQL语句获取动态的数据集,并为其命名,用户使用时只需使用[名称]即可获取结果集,可以将该结果集当做表来使用. 使用视图我们可以把查询过程中的临时表摘出来, ...
- 小程序 -- ui布局
Flex布局 相对定位和绝对定位 弹性盒模型 display flex-direction flex-wrap :nowrap(不换行)/ wrap(换行,第一行在上方)/ wrap-reverse ...
- Spring Boot MongoDB 查询操作 (BasicQuery ,BSON)
MongoDB 查询有四种方式:Query,TextQuery,BasicQuery 和 Bson ,网上太多关于 Query 的查询方式,本文只记录 BasicQuery和Bson 的方式,Basi ...
- js属性对象的hasOwnProperty方法
Object的hasOwnProperty()方法返回一个布尔值,判断对象是否包含特定的自身(非继承)属性. 判断自身属性是否存在 var o = new Object(); o.prop = 'ex ...