2017年12月29日

postcss gulp 安装使用

摘要: 备注: 测试使用的是gulp 进行的编译 1. 项目初始化 npm init mkdir src touch app.css body{ display: flex; } 2. 安装(gulp 、gulp-postcss 以及几个依赖) npm install -g gulp-cli npm ins 阅读全文

posted @ 2017-12-29 10:30 荣锋亮 阅读(778) 评论(0) 推荐(0) 编辑

webpack 图片资源处理

摘要: 备注: css 引用图片资源 1. 安装loader yarn add file-loader --dev 2. 配置 const path = require("path"); const extracttextplugin = require("extract-text-webpack-plug 阅读全文

posted @ 2017-12-29 10:29 荣锋亮 阅读(211) 评论(0) 推荐(0) 编辑

webpack libray 参考例子

摘要: 备注: 使用webpack 进行模块导出,方便进行通信 1. 项目初始化 ├── main.js ├── package.json ├── show.js ├── webpack.config.js └── yarn.lock 2. 代码说明 main.js const shortid = requ 阅读全文

posted @ 2017-12-29 10:17 荣锋亮 阅读(308) 评论(0) 推荐(0) 编辑

webpack css loader 使用

摘要: 备注: 接上面的项目 1. 添加css main.css #app { text-align:center; } main.js require("./main.css"); const shortid = require("shortid"); const demo = require("./sh 阅读全文

posted @ 2017-12-29 10:16 荣锋亮 阅读(1445) 评论(0) 推荐(0) 编辑

webpack extract-text-webpack-plugin

摘要: 备注: 提炼上面引用的css 1. 插件配置 const path = require("path"); const extracttextplugin = require("extract-text-webpack-plugin"); module.exports = { entry:"./mai 阅读全文

posted @ 2017-12-29 10:16 荣锋亮 阅读(676) 评论(0) 推荐(0) 编辑

webpack 简单使用

摘要: 备注: 使用yarn 结合npm 模块进行简单项目开发 1. 安装 yarn init yarn add webpack --dev yarn global add live-server 2. 添加shoritd 依赖模块 yarn add shoritd 3. 项目结构 ├── index.ht 阅读全文

posted @ 2017-12-29 10:15 荣锋亮 阅读(188) 评论(0) 推荐(0) 编辑

导航