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 ...
随机推荐
- jQuery使用(十二):工具方法之type()之类型判断
type()的使用 类型判断方法之is...() 实现原理可以参考我的另一篇js源码剖析博客: 类型和原生函数及类型转换(二:终结js类型判断) $.type( undefined ) === &qu ...
- 第四节:跨域请求的解决方案和WebApi特有的处理方式
一. 简介 前言: 跨域问题发生在Javascript发起Ajax调用,其根本原因是因为浏览器对于这种请求,所给予的权限是较低的,通常只允许调用本域中的资源, 除非目标服务器明确地告知它允许跨域调用. ...
- 小程序图片转Base64
在小程序中,有些业务要用到 图片的 base64 wx.chooseImage({ success: res => { wx.getFileSystemManager().readFile({ ...
- metasploit 教程之信息收集
信息收集 信息收集范围很大,可以从不同层面,不同维度进行信息收集. 系统补丁 我们知道目标机器缺少什么补丁就意味着存在与其对应的漏洞.我们可以利用这些漏洞来达到我们渗透攻击的目的. # 使用的模块 u ...
- KL散度
摘自: https://www.jianshu.com/p/43318a3dc715?from=timeline&isappinstalled=0 一.解决的问题 量化两种概率分布P和Q可以使 ...
- 2.10 while循环应用
while循环应用 1. 计算1~100的累积和(包含1和100) 参考代码如下: #encoding=utf-8 i = 1 sum = 0 while i <= 100: sum = sum ...
- MySQL学习5 - 数据类型二.md
一 字符类型 二 枚举类型和集合类型 一 字符类型 #官网:https://dev.mysql.com/doc/refman/5.7/en/char.html #注意:char和varchar括号内的 ...
- ASP.NET Web API系列教程(目录)(转)
注:微软随ASP.NET MVC 4一起还发布了一个框架,叫做ASP.NET Web API.这是一个用来在.NET平台上建立HTTP服务的Web API框架,是微软的又一项令人振奋的技术.目前,国内 ...
- Lua中的一些库(2)
[前言] 在<Lua中的一些库(1)>这篇文章中,总结了一部分Lua中的库函数,一篇文章肯定是总结不完的,所以,就来一个<Lua中的一些库(2)>.希望大家能忍住.来吧. 操作 ...
- python学习之numpy.ewaxis
当多维数组的某一列时返回的是一个行向量 >>> X = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) >> ...