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 ...
随机推荐
- IDEA破解
1. 官网下载 idea激活 进入 C:\Windows\System32\drivers\etc 编辑host文件 加入0.0.0.0 account.jetbrains.com 2.打开ID ...
- Sass学习第一天
Sass学习 网站学习地址: Sass中文网:https://www.sass.hk/docs/#t7-3 Airen的博客:https://www.w3cplus.com/preprocessor/ ...
- qsort()函数详解
一 写在开头1.1 本节内容学习C语言中的qsort()函数. 二 qsort()2.1 函数原型 void qsort( void *base, size_t nmemb, size_t size, ...
- Wndows下Apache+php+Mysql环境的搭建及其涉及的知识(转)
一.安装Apache 1. 在网上搜索以下3个文件,以及找一个地方新建一个文件夹 好吧,这里有下载链接:http://pan.baidu.com/s/1hr9IdSS 文件夹内有:apache,mys ...
- spring的纯注解的IOC配置
package config; import com.mchange.v2.c3p0.ComboPooledDataSource;import org.apache.commons.dbutils.Q ...
- ASP.NET Web API 之一 入门篇
一.基于RESTful标准的Web Api 原文讲解:https://www.cnblogs.com/lori/p/3555737.html 微软的web api是在vs2012上的mvc4项目绑定发 ...
- windows下实现定时重启Apache与MySQL方法
采用at命令添加计划任务.有关使用语法可以到window->“开始”->运行“cmd”->执行命令“at /”,这样界面中就会显示at命令的语法.下面我们讲解下如何让服务器定时启动a ...
- 【原创】算法基础之Anaconda(1)简介、安装、使用
Anaconda 2 官方:https://www.anaconda.com/ 一 简介 The Most Popular Python Data Science Platform Anaconda® ...
- 实现JWT刷新机制以及让过期时间更精确
借助accessToken和refreshToken实现 accessToken控制刷新间隔,refreshToken控制最长过期时间 Min过期时间 = refreshToken过期时间 ...
- TCP 的那些事儿
TCP是一个巨复杂的协议,因为他要解决很多问题,而这些问题又带出了很多子问题和阴暗面.所以学习TCP本身是个比较痛苦的过程,但对于学习的过程却能让人有很多收获.关于TCP这个协议的细节,我还是推荐你去 ...