上一页 1 ··· 8 9 10 11 12 13 14 下一页

2021年3月5日

摘要: 1、安装gulp yarn add gulp 2、在根目录下新建gulpfile文件,作为gulp入口 3、安装转换插件 yarn add gulp-sass --dev//sass只转换主文件,带有下划线的文件会被认为是主文件的依赖文件,不会去转换 4、基本使用 const {src,dest} 阅读全文
posted @ 2021-03-05 16:38 phantom_yy 阅读(83) 评论(0) 推荐(0)
 
摘要: 1、基本用法 //载入src和dist方法 const { src,dest } = require('gulp'); //通过src创建读取流 //pipe:导出 //dist:写入流 //读取流路径:src/*.css //写入流路径:dist exports.default = () => { 阅读全文
posted @ 2021-03-05 14:00 phantom_yy 阅读(163) 评论(0) 推荐(0)

2021年3月4日

摘要: 构建过程:读取文件,将文件转换,再写入到另外一个位置 三个核心概念:读取流(输入) 转换流(加工) 写入流(输出) const fs = require('fs'); const { Transform } = require('stream'); exports.default = () =>{ 阅读全文
posted @ 2021-03-04 15:14 phantom_yy 阅读(119) 评论(0) 推荐(0)
 
摘要: 异步任务的三种方式 通常情况下我们没有办法明确知道这个调用是否完成的,都是通过在函数内部通过回调或者是事件的方式去通知外部,这个函数调用已经完成。 在gulp的异步中也会存在这个问题。 1、使用回调函数 exports.callback = done => { console.log('callba 阅读全文
posted @ 2021-03-04 14:02 phantom_yy 阅读(198) 评论(0) 推荐(0)

2021年3月3日

摘要: (1)同步标记任务失败 //标记失败任务 module.exports = grunt => { grunt.registerTask('bad',()=>{ console.log('bad working~'); return false; }); grunt.registerTask('foo 阅读全文
posted @ 2021-03-03 18:11 phantom_yy 阅读(204) 评论(0) 推荐(0)
 
摘要: (1)创建一个 package.json yarn init --yes // --yes 跳过会话,直接通过默认值生成 package.json // yarn init --yes # 简写 -y (2)添加Grunt模块 yarn add grunt (3)添加gruntfile文件 code 阅读全文
posted @ 2021-03-03 18:09 phantom_yy 阅读(255) 评论(0) 推荐(0)
 
摘要: 1、通过serise、parallel这两个API组合任务 serise:串行任务 parallel:并行任务 const {series,parallel} = require('gulp'); const task1 = done =>{ setTimeout(()=>{ console.log 阅读全文
posted @ 2021-03-03 18:04 phantom_yy 阅读(94) 评论(0) 推荐(0)
 
摘要: gulp默认异步任务,没有同步任务 1、构建package.json yarn init --yes 2、安装gulp模块,安装gulp的同时会自动安装cli模块 yarn add gulp --dev 3、创建gulpfile.js文件,gulp的入口文件 code gulpfile.js 4、构 阅读全文
posted @ 2021-03-03 17:31 phantom_yy 阅读(106) 评论(0) 推荐(0)
 
摘要: 1、grunt的基本使用 (1)创建一个 package.json yarn init --yes // --yes 跳过会话,直接通过默认值生成 package.json // yarn init --yes # 简写 -y (2)添加Grunt模块 yarn add grunt (3)添加gru 阅读全文
posted @ 2021-03-03 16:19 phantom_yy 阅读(212) 评论(0) 推荐(0)
 
摘要: 转自微信公众号软考集中营 工具1:PDCA循环 Plan(计划):制定目标与计划 Do(执行):任务展开,组织实施 Check(检查):对过程中的关键点和最终结果进行检查 Action(处理):纠正偏差,对成功过进行标准化,并确定新的目标,制定下一轮计划 工具2:SWOT分析法 Strengths( 阅读全文
posted @ 2021-03-03 14:30 phantom_yy 阅读(393) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 下一页