gulp压缩整合css和js文件
个人感觉简单,粗暴,好用
傻瓜式操作:
1.首先安装node.js(查看版本node-v)
2. 全局安装gulp : npm install gulp -g
3. 新建文件夹,在当前文件夹下 npm init (会自动通过npm下载package.json)
4. 本地安装gulp npm install gulp --save-dev (相关配置自动保存package.json中)
5. 新建一个gulpfile.js文件 (文件结构如:)
6.
7. npm install gulp-concat --save-dev
gulp教程之gulp-concat (整合js文件--将多个文件合并为一个,减少http请求,加快访问速度) (将以下代码复制到gulpfile.js中)
var gulp = require('gulp'),
concat = require('gulp-concat');
gulp.task('testConcat', function () {
gulp.src('js/*.js') //要合并的所有js文件
.pipe(concat('all.js'))//合并后的文件名
.pipe(gulp.dest('dest/js')); //合并后存放的目录,如果没有目录会自动创建
});
8. npm install gulp-uglify --save-dev gulp教程之gulp-uglify (压缩js文件,减小文件体积) (将以下代码复制到gulpfile.js中)
var gulp = require('gulp'),
uglify = require('gulp-uglify');
gulp.task('jsmin', function () {
gulp.src('src/js/index.js')
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
});
9. npm install gulp-minify-css --save-dev
gulp教程之gulp-minify-css【gulp-clean-css】 (压缩整合css文件) (将以下代码复制到gulpfile.js中)
var gulp = require('gulp'),
cssmin = require('gulp-minify-css');
gulp.task('clean', function () {
gulp.src('css/*.css')
.pipe(cssmin())
.pipe(gulp.dest('dest'));
});
拿7,8,9任意一个举例如图所示:
<li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true"> <use xlink:href="#csdnc-thumbsup"></use> </svg><span class="name">点赞</span> <span class="count"></span> </a></li> <li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{"mod":"popu_824"}"><svg class="icon" aria-hidden="true"> <use xlink:href="#icon-csdnc-Collection-G"></use> </svg><span class="name">收藏</span></a></li> <li class="tool-item tool-active is-share"><a href="javascript:;"><svg class="icon" aria-hidden="true"> <use xlink:href="#icon-csdnc-fenxiang"></use> </svg>分享</a></li> <!--打赏开始--> <!--打赏结束--> <li class="tool-item tool-more"> <a> <svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg> </a> <ul class="more-box"> <li class="item"><a class="article-report">文章举报</a></li> </ul> </li> </ul> </div> </div> <div class="person-messagebox"> <div class="left-message"><a href="https://blog.csdn.net/dadaDaShiXiong"> <img src="https://profile.csdnimg.cn/C/D/6/3_dadadashixiong" class="avatar_pic" username="dadaDaShiXiong"> <img src="https://g.csdnimg.cn/static/user-reg-year/1x/2.png" class="user-years"> </a></div> <div class="middle-message"> <div class="title"><span class="tit"><a href="https://blog.csdn.net/dadaDaShiXiong" data-report-click="{"mod":"popu_379"}" target="_blank">dadaDaShiXiong</a></span> </div> <div class="text"><span>发布了48 篇原创文章</span> · <span>获赞 6</span> · <span>访问量 4万+</span></div> </div> <div class="right-message"> <a href="https://im.csdn.net/im/main.html?userName=dadaDaShiXiong" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信 </a> <a class="btn btn-sm bt-button personal-watch" data-report-click="{"mod":"popu_379"}">关注</a> </div> </div> </div> </article>
<script>
$("#blog_detail_zk_collection").click(function(){
window.csdn.articleCollection()
})
<div class="recommend-box"><div class="recommend-item-box type_blog clearfix" data-report-click="{"mod":"popu_614","dest":"https://blog.csdn.net/chen_enson_1/article/details/85159348","strategy":"BlogCommendFromMachineLearnPai2","index":"0"}">
<div class="content" style="width: 852px;">
<a href="https://blog.csdn.net/chen_enson_1/article/details/85159348" target="_blank" rel="noopener" title="新手教学 gulp 合并压缩js、css文件">
<h4 class="text-truncate oneline" style="width: 692px;">
新手教学 <em>gulp</em> 合并<em>压缩</em><em>js</em>、<em>css</em><em>文件</em> </h4>
<div class="info-box d-flex align-content-center">
<p class="date-and-readNum oneline">
<span class="date hover-show">12-21</span>
<span class="read-num hover-hide">
阅读数
69</span>
</p>
</div>
</a>
<p class="content" style="width: 852px;">
<a href="https://blog.csdn.net/chen_enson_1/article/details/85159348" target="_blank" rel="noopener" title="新手教学 gulp 合并压缩js、css文件">
<span class="desc oneline">文章目录打包压缩js、css文件如何运行打包压缩js、css文件先上代码,如下所示// 获取 gulpvar gulp = require('gulp');// 获取 uglify 模块(用于压缩 J...</span>
</a>
<span class="blog_title_box oneline ">
<span class="type-show type-show-blog type-show-after">博文</span>
<a target="_blank" rel="noopener" href="https://blog.csdn.net/chen_enson_1">来自: <span class="blog_title"> chen_enson的博客</span></a>
</span>
</p>
</div>
</div>
gulp 整合、压缩js、css代码
11-22 阅读数 538
gulp简单构建一个前端项目;var gulp = require('gulp'), rev = require('gulp-rev'), revReplace = require('gu... 博文 来自: cxf1992的博客
gulp-css gulp打包处理css
04-10 阅读数 1200
序到底有没有一个gulp-css的插件呢?答案是:yes。不过呢,我们打包css并不需要它。详细操作,请看下文!gulp基本安装安装有node.js+npm+git-bash的window x64系统... 博文 来自: loushengyue
gulp构建项目(七):gulp-uglify压缩js以及检查js语法错误
12-01 阅读数 2697
需求分析:将js文件压缩成一行,减少js文件的大小。压缩过程中如果遇到js语法错误,将会报错并且压缩会被终止。所以我们需要1、在开发环境下,编写js代码时,要监听并检查js文件的语法,避免语法错误导致... 博文 来自: 猿始森林
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_59" data-pid="59"><script type="text/javascript">
(function() {
var s = "_" + Math.random().toString(36).slice(2);
document.write('<div style="" id="' + s + '"></div>');
(window.slotbydup = window.slotbydup || []).push({
id: "u3491668",
container: s
});
})();
<div class="recommend-item-box recommend-box-ident recommend-download-box clearfix" data-report-view="{"mod":"popu_614","dest":"https://download.csdn.net/download/u011355079/5726971","strategy":"BlogCommendFromMachineLearnPai2","index":"4"}" data-report-click="{"mod":"popu_614","dest":"https://download.csdn.net/download/u011355079/5726971","strategy":"BlogCommendFromMachineLearnPai2","index":"4"}">
<a href="https://download.csdn.net/download/u011355079/5726971" rel="noopener" target="_blank">
<div class="content clearfix">
<div class="">
<h4 class="text-truncate oneline clearfix">
解压密码123 暴力破解密码 </h4>
<span class="data float-right">07-09</span>
</div>
<div class="desc oneline">
解压密码123 暴力破解密码 </div>
<span class="type-show type-show-download">下载</span>
</div>
</a>
</div>
gulp压缩合并js与css
11-27 阅读数 114
前言webpack是应用非常广泛的打包软件,但是,webpack侧重于用 依赖管理整个静态资源。假如没有依赖呢?查了一番资料,准备使用gulp一试。简介gulp是一个基于流式的任务处理工具,以defa... 博文 来自: weixin_33806300的博客
从入门到精通,Java学习路线导航(附学习资源)
09-16 阅读数 4万+
引言最近也有很多人来向我"请教",他们大都是一些刚入门的新手,还不了解这个行业,也不知道从何学起,开始的时候非常迷茫,实在是每天回复很多人也很麻烦,所以在这里统一作个回复吧。Java学习路线当然,这里... 博文 来自: java_sha的博客
gulp压缩js和css文件
02-15 阅读数 980
gulp的简介这里就不赘述了,最新对js和css压缩有用webpack的,但是研究了一下,好麻烦,最终转向gulp。下面开始正式的压缩步骤:总体概略是:安装nodejs -> 全局安装gulp ->新... 博文 来自: binbinyouli301的博客
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_60" data-pid="60"><iframe src="https://adaccount.csdn.net/#/preview/1119?m=bicyLEncptEpHtttDJbUmSnJpHciLiSSpvpiJiLXJJtbAoHXSAbQHLcctScpopHQJniiEWJDAontUiSmivbSppJpJUfvHcJQpSiQ&k=" frameborder="0" width="100%" height="75px" scrolling="no"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?d=2&k=&m=bicyLEncptEpHtttDJbUmSnJpHciLiSSpvpiJiLXJJtbAoHXSAbQHLcctScpopHQJniiEWJDAontUiSmivbSppJpJUfvHcJQpSiQ"></div></div>
Gulp前端自动化css/js压缩安装使用说明
08-25 阅读数 661
基于node环境,如未安装请自行安装Node安装说明:http://www.cnblogs.com/zhouyu2017/p/6485265.html(window)https://blog.csd... 博文 来自: 代码青春
利用gulp.js压缩css,js文件流程
06-17 阅读数 1319
看流程之前肯定得先了解一下gulp.js是干嘛的吧,附上官网,大家自己去看APIgulp.js下面就来说说怎么使用gulp.js,gulp.js是基于node来使用的,那么问题又来了,nodejs怎么... 博文 来自: 黑山老妖的博客
<div class="recommend-item-box blog-expert-recommend-box" style="display: block;">
<div class="d-flex">
<div class="blog-expert-recommend">
<div class="blog-expert">
<div class="blog-expert-flexbox" data-report-view="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/chen_enson_1" target="_blank"><img src="https://profile.csdnimg.cn/5/D/D/3_chen_enson_1" username="chen_enson_1" alt="梦想就是大神" title="梦想就是大神"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><span class="blog-expert-button-follow btn-red-follow" data-name="chen_enson_1" data-nick="梦想就是大神">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/chen_enson_1" target="_blank"><h5 class="oneline" title="梦想就是大神">梦想就是大神</h5></a></span> <p></p><p class="article-num" title="16篇文章"> 16篇文章</p><p class="article-num" title="排名:千里之外"> 排名:千里之外</p><p></p></div></div></div><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/cxf1992" target="_blank"><img src="https://profile.csdnimg.cn/9/B/6/3_cxf1992" username="cxf1992" alt="黑牛E" title="黑牛E"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><span class="blog-expert-button-follow btn-red-follow" data-name="cxf1992" data-nick="黑牛E">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/cxf1992" target="_blank"><h5 class="oneline" title="黑牛E">黑牛E</h5></a></span> <p></p><p class="article-num" title="10篇文章"> 10篇文章</p><p class="article-num" title="排名:千里之外"> 排名:千里之外</p><p></p></div></div></div><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/weixin_41424247" target="_blank"><img src="https://profile.csdnimg.cn/2/C/D/3_weixin_41424247" username="weixin_41424247" alt="娄笙悦" title="娄笙悦"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><span class="blog-expert-button-follow btn-red-follow" data-name="weixin_41424247" data-nick="娄笙悦">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/weixin_41424247" target="_blank"><h5 class="oneline" title="娄笙悦">娄笙悦</h5></a></span> <p></p><p class="article-num" title="70篇文章"> 70篇文章</p><p class="article-num" title="排名:千里之外"> 排名:千里之外</p><p></p></div></div></div><div class="blog-expert-item"><div class="blog-expert-info-box"><div class="blog-expert-img-box" data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/guang_s" target="_blank"><img src="https://profile.csdnimg.cn/1/B/6/3_guang_s" username="guang_s" alt="猿始森林" title="猿始森林"></a><span data-report-click="{"mod":"popu_710","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><span class="blog-expert-button-follow btn-red-follow" data-name="guang_s" data-nick="猿始森林">关注</span></span></div><div class="info"><span data-report-click="{"mod":"popu_709","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/82756514"}"><a href="https://blog.csdn.net/guang_s" target="_blank"><h5 class="oneline" title="猿始森林">猿始森林</h5></a></span> <p></p><p class="article-num" title="85篇文章"> 85篇文章</p><p class="article-num" title="排名:千里之外"> 排名:千里之外</p><p></p></div></div></div></div>
</div>
</div>
</div>
</div>
使用gulp压缩混淆js代码
12-04 阅读数 541
这里只针对js代码进行单个压缩操作,并去除console等,下一篇会加入对html以及css的压缩。配置如下:var gulp = require("gulp"),//gulp基础包 clean = ... 博文 来自: weixin_33895657的博客
gulpfile.js的css合并压缩,js合并压缩
01-11 阅读数 174
// 获取 gulpvar gulp = require('gulp');// 获取模块var uglify = require('gulp-uglify');var cleanCSS = req... 博文 来自: qq_32705087的博客
在项目中使用gulp压缩css和js
09-18 阅读数 2308
在TP中使用gulp一、安装gulp1. gulp使用npm安装,先安装npm(如果本机上已经安装了node环境,node中已包含npm,可直接使用)2. centos系统:yum install n... 博文 来自: imxyq的博客
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_61" data-pid="61"><iframe src="https://adaccount.csdn.net/#/preview/261?m=bbbcQEStSQAbHLtnicDJEiyHcALJibbQmtUiEHiiAXtcniLHDXJcnAbnpnSHEQJJSAbWbLEnSiDnSicJmSJDQySEbtpJcpUHbcvQ&k=" frameborder="0" width="100%" height="75px" scrolling="no"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?d=2&k=&m=bbbcQEStSQAbHLtnicDJEiyHcALJibbQmtUiEHiiAXtcniLHDXJcnAbnpnSHEQJJSAbWbLEnSiDnSicJmSJDQySEbtpJcpUHbcvQ"></div></div>
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
10-22 阅读数 11万+
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成)one 樱花树 动态生成樱花效... 博文 来自: 碎片
史上最全的mysql基础教程
10-28 阅读数 4万+
启动与停止启动mysql服务sudo /usr/local/mysql/support-files/mysql.server start停止mysql服务sudo /usr/local/mysql/s... 博文 来自: 智障小鲁班
gulp实现css文件js文件压缩.
07-23 阅读数 60
1.前面的安装环境转看上一篇html文件压缩方法.html文件压缩方法2.压缩后效果展示:(2) 下面是js文件压缩 以及 js语法转换方法.js文件压缩后效果展示:...... 博文 来自: azhou820567753的博客
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_62" data-pid="62"><iframe src="https://adaccount.csdn.net/#/preview/575?m=cQtvpSiHniptLntpAcncnptEypAELpAHcDpAAittEADncpinHAiLXtDHAJbSLEvyvHEQLWLEAttcUJLLAEUifminUyvnHicSAQtQ&k=" frameborder="0" width="100%" height="75px" scrolling="no"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?d=2&k=&m=cQtvpSiHniptLntpAcncnptEypAELpAHcDpAAittEADncpinHAiLXtDHAJbSLEvyvHEQLWLEAttcUJLLAEUifminUyvnHicSAQtQ"></div></div>
花了20分钟,给女朋友们写了一个web版群聊程序
11-28 阅读数 15万+
参考博客[1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example 博文
linux系列之常用运维命令整理笔录
11-02 阅读数 8万+
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢... 博文 来自: Nicky's blog
gulp自动化打包及静态文件自动添加版本号
03-14 阅读数 8
前端自动化打包发布已是一种常态,尤其在移动端,测试过程中静态资源的缓存是件很头疼的事情,有时候明明处理的bug测试还是存在,其实就是缓存惹的祸,手机不比pc浏览器,清理缓存还是有点麻烦的。所以自动化实... 博文 来自: weixin_34080951的博客
通俗易懂地给女朋友讲:线程池的内部原理
11-04 阅读数 3万+
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”... 博文 来自: 万猫学社
gulp压缩js报错
07-30 阅读数 1358
gulp压缩js报错,也许你需要用到babel今天在使用gulp 压缩js时,遇到了这样的错误:从网上找了找原因,有网友说: js不知道哪里用到了es6语法,为了解决压缩js报错抱着试一试的心态,... 博文 来自: qq_40039641的博客
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_63" data-pid="63"><iframe scrolling="no" style="width: 100%; height: 60px; border: 0px;"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=63&a=809&c=0&k=&d=1&t=3&u=f78cbcdec98c46698c1ab727174f33b0"></div></div>
技术人员要拿百万年薪,必须要经历这9个段位
08-24 阅读数 4万+
很多人都问,技术人员如何成长,每个阶段又是怎样的,如何才能走出当前的迷茫,实现自我的突破。所以我结合我自己10多年的从业经验,总结了技术人员成长的9个段位,希望对大家的职...... 博文 来自: Python之禅的专栏
使用gulp自动化打包合并前端静态资源(CSS、JS文件压缩、添加版本号)
02-02 阅读数 26
现在正在做的项目更新迭代比较频繁,会经常对前端代码打包部署,手动整合代码文件很麻烦并且浪费时间,所以决定使用gulp来代替手工完成这项工作。前端静态资源在发版更新时会面临客户端浏览器缓存的问题(可参考... 博文 来自: banjinjue0755的博客
我的 Input框 不可能这么可爱
09-03 阅读数 7万+
作者:陈大鱼头github: KRISACHAN<input /> 标签是我们日常开发中非常常见的替换元素了,但是最近在刷 whattwg 跟 MDN 的时候发现 跟 <input ... 博文 来自: 鱼头的Web海洋
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_64" data-pid="64"><iframe scrolling="no" style="width: 100%; height: 60px; border: 0px;"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=64&a=809&c=0&k=&d=1&t=3&u=fe2de25b52b94a8ca8b322a01b32f617"></div></div>
程序员必须掌握的核心算法有哪些?
12-26 阅读数 12万+
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,... 博文 来自: 帅地
基于node.js的gulp压缩 js css文件
03-21 阅读数 45
1、安装nodejs2、cmd下进入到nodejs目录3、全局下利用npm安装gulp 命令:npm install -g gulp4、项目中安装gulp包 命令:npm install gulp -... 博文 来自: a17603952050的博客
Gulp4.0入门第一课:合并压缩css/js
11-06 阅读数 24
全局安装gulp(为了使用gulp命令):$ npm install -g gulp项目目录下安装gulp:$ npm install -D gulp安装del和相应的gulp插件:$ npm ins... 博文 来自: 李炳良的技术博客
中国麻将:世界上最早的区块链项目
10-29 阅读数 8万+
中国麻将:世界上最早的区块链项目最近区块链这个玩意又被市场搞的很是火热,相信大部分人都不太清楚这玩意到底是怎么样的一个概念,它来了,它来了,它到底是啥~ 国家都开始发文支持了,下面是一个通俗易懂的例子... 博文 来自: gao_chun
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_65" data-pid="65"><iframe scrolling="no" style="width: 100%; height: 60px; border: 0px;"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=65&a=809&c=0&k=&d=1&t=3&u=b07082d877f543408dcd430ddf059df8"></div></div>
Linux文件操作高频使用命令
08-28 阅读数 6万+
文章目录0.新建操作:1.查看操作2.删除操作3.复制操作4.移动操作:5.重命名操作:6.解压压缩操作0.新建操作:mkdir abc #新建一个文件夹touch abc.sh #新建一个文件1.查... 博文 来自: 不能如期而至的专栏
gulp:更简单的自动化构建工具
04-22 阅读数 4
目前最流行的两种使用JavaScript开发的构建工具是Grunt和Gulp。为什么使用gulp?因为Gulp更简单。Grunt任务拥有大量的配置,会引用大量你实际上并不需要的对象属性,但是Gulp里... 博文 来自: weixin_34014277的博客
Gulp编译、合并、压缩
06-21 阅读数 7933
前段时间写过一篇文章介绍Gulp和Grunt的区别[Gulp和Grunt],有兴趣的可以看一下,这里简单介绍一下Gulp如何配置编译less文件,合并生成的css文件以及压缩css文件。一、准备工作需... 博文 来自: Martian
有哪些让程序员受益终生的建议
10-28 阅读数 10万+
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,... 博文 来自: 启舰
Ngrok: 超简单的内网穿透,了解一下 ?
10-31 阅读数 1万+
【1】什么是内网穿透?首先,我们生活中的网络从应用上可以分为内网和外网;内网就是你自己的网络环境,就你自己能访问,比如你本地测试进行的localhost;外网就不言而喻了,你看网页,视频等这些网址都是... 博文 来自: 小白一个
<div class="recommend-item-box recommend-recommend-box"><div id="kp_box_66" data-pid="66"><iframe src="https://adaccount.csdn.net/#/preview/857?m=ncfSvSHtAnDtSDpSyJHLLnSScftnAAcUHXXpbJbLiHbbbmbtivypSASHpSnEEQWEbSAbciLDpbJtUcLiyXbQbnivEHcSAAiQtLEQ&k=" frameborder="0" width="100%" height="75px" scrolling="no"></iframe><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?d=2&k=&m=ncfSvSHtAnDtSDpSyJHLLnSScftnAAcUHXXpbJbLiHbbbmbtivypSASHpSnEEQWEbSAbciLDpbJtUcLiyXbQbnivEHcSAAiQtLEQ"></div></div>
<div class="recommend-item-box type_hot_word">
<div class="content clearfix" style="width: 852px;">
<div class="float-left">
<span>
<a href="https://blog.csdn.net/yilovexing/article/details/80577510" target="_blank">
python</a>
</span>
<span>
<a href="https://blog.csdn.net/slwbcsdn/article/details/53458352" target="_blank">
json</a>
</span>
<span>
<a href="https://blog.csdn.net/csdnnews/article/details/83753246" target="_blank">
java</a>
</span>
<span>
<a href="https://blog.csdn.net/qq_35077512/article/details/88952519" target="_blank">
mysql</a>
</span>
<span>
<a href="https://blog.csdn.net/pdcfighting/article/details/80297499" target="_blank">
pycharm</a>
</span>
<span>
<a href="https://blog.csdn.net/sinyu890807/article/details/97142065" target="_blank">
android</a>
</span>
<span>
<a href="https://blog.csdn.net/gexiaoyizhimei/article/details/100122368" target="_blank">
linux</a>
</span>
<span>
<a href="https://download.csdn.net/download/xhg_gszs/10978826" target="_blank">
json格式</a>
</span>
<span>
<a href="https://www.csdn.net/gather_15/NtzaIgwsLWRvd25sb2Fk.html" target="_blank">
c#正态概率密度</a>
</span>
<span>
<a href="https://www.csdn.net/gather_1a/NtzaIgxsLWRvd25sb2Fk.html" target="_blank">
c#和数据库登陆界面设计</a>
</span>
<span>
<a href="https://www.csdn.net/gather_1c/NtzaIgysLWRvd25sb2Fk.html" target="_blank">
c# 高斯消去法</a>
</span>
<span>
<a href="https://www.csdn.net/gather_20/NtzaIgzsLWJsb2cO0O0O.html" target="_blank">
c# codedom</a>
</span>
<span>
<a href="https://www.csdn.net/gather_17/NtzaIg0sLWRvd25sb2Fk.html" target="_blank">
c#读取cad文件文本</a>
</span>
<span>
<a href="https://www.csdn.net/gather_18/NtzaIg1sLWRvd25sb2Fk.html" target="_blank">
c# 控制全局鼠标移动</a>
</span>
<span>
<a href="https://www.csdn.net/gather_10/NtzaIg2sLWRvd25sb2Fk.html" target="_blank">
c# temp 目录</a>
</span>
<span>
<a href="https://www.csdn.net/gather_1f/NtzaIg3sLWRvd25sb2Fk.html" target="_blank">
bytes初始化 c#</a>
</span>
<span>
<a href="https://www.csdn.net/gather_1d/NtzaIg4sLWRvd25sb2Fk.html" target="_blank">
c#显示无焦点窗口</a>
</span>
<span>
<a href="https://www.csdn.net/gather_15/NtzaIg5sLWRvd25sb2Fk.html" target="_blank">
c# 类是否继承指定接口</a>
</span>
</div>
</div>
</div>
<div class="recommend-loading-box">
<img src="https://csdnimg.cn/release/phoenix/images/feedLoading.gif">
</div>
<div class="recommend-end-box" style="display: block;">
<p class="text-center">没有更多推荐了,<a href="https://blog.csdn.net/" class="c-blue c-blue-hover c-blue-focus">返回首页</a></p>
</div>
</div>
<div class="template-box">
<span>©️2019 CSDN</span><span class="point"></span>
<span>皮肤主题: 编程工作室</span>
<span> 设计师:
CSDN官方博客 </span>
</div>
</main>
<aside class="blog_container_aside">
<!--主页引入-->
<div id="asideProfile" class="aside-box">
<!-- <h3 class="aside-title">个人资料</h3> -->
<div class="profile-intro d-flex">
<div class="avatar-box d-flex justify-content-center flex-column">
<a href="https://blog.csdn.net/dadaDaShiXiong" data-report-click="{"mod":"popu_379","dest":"https://blog.csdn.net/dadaDaShiXiong"}">
<img src="https://profile.csdnimg.cn/C/D/6/3_dadadashixiong" class="avatar_pic" username="dadaDaShiXiong">
<img src="https://g.csdnimg.cn/static/user-reg-year/1x/2.png" class="user-years">
</a>
</div>
<div class="user-info d-flex flex-column profile-intro-name-box">
<div>
<span class="name csdn-tracking-statistics tracking-click " style="display:block" data-report-click="{"mod":"popu_379","dest":"https://blog.csdn.net/dadaDaShiXiong"}" username="dadaDaShiXiong">
<a href="https://blog.csdn.net/dadaDaShiXiong" class="" id="uid" title="dadaDaShiXiong">
dadaDaShiXiong </a>
</span>
</div>
<div class="profile-intro-name-boxFooter">
<span class="personal-home-page" style="right:-96px;"><a target="_blank" href="https://me.csdn.net/dadaDaShiXiong">TA的个人主页 ></a></span>
</div>
</div>
</div>
<div class="data-info d-flex item-tiling">
<dl class="text-center" title="48">
<dt><a href="https://blog.csdn.net/dadadashixiong" data-report-query="t=1">原创</a></dt>
<dd><a href="https://blog.csdn.net/dadadashixiong" data-report-query="t=1"><span class="count">48</span></a></dd>
</dl>
<dl class="text-center" id="fanBox" title="1">
<dt>粉丝</dt>
<dd><span class="count" id="fan">1</span></dd>
</dl>
<dl class="text-center" title="6">
<dt>获赞</dt>
<dd><span class="count">6</span></dd>
</dl>
<dl class="text-center" title="0">
<dt>评论</dt>
<dd><span class="count">0</span></dd>
</dl>
<dl class="text-center" title="41530">
<dt>访问</dt>
<dd><span class="count">4万+</span></dd>
</dl>
</div>
<div class="grade-box clearfix">
<dl class="aside-box-footerClassify">
<dt>等级:</dt>
<dd>
<a href="https://blog.csdn.net/home/help.html#level" title="4级,点击查看等级说明" target="_blank">
<svg class="icon icon-level" aria-hidden="true">
<use xlink:href="#csdnc-bloglevel-4"></use>
</svg>
</a>
</dd>
</dl>
<dl title="34236">
<dt>周排名:</dt>
<dd>
<a class="grade-box-rankA" href="https://blog.csdn.net/rank/writing_rank" target="_blank">
3万+ </a>
</dd>
</dl>
<dl>
<dt>积分:</dt>
<dd title="890">
890 </dd>
</dl>
<dl title="96758">
<dt>总排名:</dt>
<dd>
<a class="grade-box-rankA" href="https://blog.csdn.net/rank/writing_rank_total" target="_blank">
9万+ </a>
</dd>
</dl>
</div>
<div class="aside-box-footer">
<div class="badge-box d-flex">
<div class="profile-medal">勋章:</div>
<div class="badge d-flex">
<div class="icon-badge" title="持之以恒">
<div class="mouse-box">
<img src="https://g.csdnimg.cn/static/user-medal/chizhiyiheng.png" alt="">
<div class="icon-arrow"></div>
</div>
<div class="grade-detail-box">
<div class="pos-box">
<div class="left-box d-flex justify-content-center align-items-center flex-column">
<img src="https://g.csdnimg.cn/static/user-medal/chizhiyiheng.png" alt="">
<p>持之以恒</p>
</div>
<div class="right-box">
授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累! </div>
</div>
</div>
</div>
<div class="icon-badge" title="勤写标兵Lv2">
<div class="mouse-box">
<img src="https://g.csdnimg.cn/static/user-medal/qixiebiaobing-2.png" alt="">
<div class="icon-arrow"></div>
</div>
<div class="grade-detail-box">
<div class="pos-box">
<div class="left-box d-flex justify-content-center align-items-center flex-column">
<img src="https://g.csdnimg.cn/static/user-medal/qixiebiaobing-2.png" alt="">
<p>勤写标兵Lv2</p>
</div>
<div class="right-box">
授予每个自然周发布4篇到6篇原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。 </div>
</div>
</div>
</div>
</div>
<script>
(function($) {
setTimeout(function() {
$('div.icon-badge.show-moment').removeClass('show-moment');
}, 5000);
})(window.jQuery)
</script>
</div>
</div>
<div class="profile-intro-name-boxOpration">
<div class="opt-letter-watch-box">
<a class="personal-watch bt-button" id="btnAttent" data-report-click="{"mod":"popu_379"}">关注</a>
</div>
<div class="opt-letter-watch-box">
<a class="bt-button btn-red-hollow personal-letter" href="https://im.csdn.net/im/main.html?userName=dadaDaShiXiong" target="_blank" rel="noopener">私信</a>
</div>
</div>
</div>
<h3 class="aside-title">最新文章</h3>
<div class="aside-content">
<ul class="inf_list clearfix">
<li class="clearfix">
<a data-report-click="{"mod":"popu_382","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/102903164"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/102903164" target="_blank">
(08)boot2.0整合es6.0增加更新修改删除操作 </a>
</li>
<li class="clearfix">
<a data-report-click="{"mod":"popu_382","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/102903154"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/102903154" target="_blank">
(07)boot2.0整合es6.0版本 </a>
</li>
<li class="clearfix">
<a data-report-click="{"mod":"popu_382","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/102891496"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/102891496" target="_blank">
(06)es增加、修改、删除、查询等基本操作 </a>
</li>
<li class="clearfix">
<a data-report-click="{"mod":"popu_382","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/102891317"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/102891317" target="_blank">
(05)es索引创建 </a>
</li>
<li class="clearfix">
<a data-report-click="{"mod":"popu_382","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/102891268"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/102891268" target="_blank">
(04)es基本概念 </a>
</li>
</ul>
</div>
分类专栏
归档
热门文章
-
<a data-report-click="{"mod":"popu_541","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/79813014"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/79813014"> vue2.0导航钩子beforeEach的使用(参考别人的,很简单) </a> <p class="read">阅读数 <span>7817</span></p> </li> <li> <a data-report-click="{"mod":"popu_541","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/78878247"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/78878247"> js中ajax请求的两种方式 </a> <p class="read">阅读数 <span>6999</span></p> </li> <li> <a data-report-click="{"mod":"popu_541","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/79978988"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/79978988"> 谷歌浏览器关闭跨域(跨域一直是前后端交互头疼问题,个人开发比较常用) </a> <p class="read">阅读数 <span>5427</span></p> </li> <li> <a data-report-click="{"mod":"popu_541","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/79796232"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/79796232"> 在vue+webpack项目中引入高德地图API </a> <p class="read">阅读数 <span>4344</span></p> </li> <li> <a data-report-click="{"mod":"popu_541","dest":"https://blog.csdn.net/dadaDaShiXiong/article/details/79795908"}" href="https://blog.csdn.net/dadaDaShiXiong/article/details/79795908"> 微信端返回关闭当前页的几种方法(微信公众号)(解决:关闭时有1s延迟会返回上一页面),返回上一级页面 </a> <p class="read">阅读数 <span>2748</span></p> </li> </ul> </div>
![](https://i-blog.csdnimg.cn/blog_migrate/aa0c2d6a231e5a30b28f1358b1a58771.png)
<div class="aside-box">
<div class="persion_article">
<div class="right_box footer_box csdn-tracking-statistics"> <div class="contact-box" id="footer-contact-box"><div class="img-box"><a href="https://edu.csdn.net" data-report-query="utm_source=csdn_footer" target="_blank"><img src="https://csdnimg.cn/pubfooter/images/edu-QR.png" alt="CSDN学院" style="padding: 6px;width: 98px;height: 98px;"></a><p class="app-text">CSDN学院</p></div><div class="img-box fr"><img style="padding: 6px;width: 98px;height: 98px;" src="https://csdnimg.cn/pubfooter/images/job-QR.png" alt="CSDN企业招聘"><p class="app-text">CSDN企业招聘</p></div></div> <div class="contact-info"> <p><svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.167 2h11.666C14.478 2 15 2.576 15 3.286v9.428c0 .71-.522 1.286-1.167 1.286H2.167C1.522 14 1 13.424 1 12.714V3.286C1 2.576 1.522 2 2.167 2zm-.164 3v1L8 10l6-4V5L8 9 2.003 5z" fill="#5c5c5c" fill-rule="evenodd"></path></svg><a href="mailto:webmaster@csdn.net" target="_blank"><span class="txt">kefu@csdn.net</span></a> <em class="width126"><svg t="1538013544186" width="17" height="17" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23556" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M902.60033922 650.96445566c-18.0718526-100.84369837-94.08399771-166.87723736-94.08399771-166.87723737 10.87530062-91.53186599-28.94715402-107.78733693-28.94715401-107.78733691C771.20003413 93.08221664 517.34798062 98.02553561 511.98620441 98.16348824 506.65661791 98.02553561 252.75857992 93.08221664 244.43541101 376.29988138c0 0-39.79946279 16.25547094-28.947154 107.78733691 0 0-75.98915247 66.03353901-94.0839977 166.87723737 0 0-9.63372291 170.35365477 86.84146124 20.85850523 0 0 21.70461757 56.79068296 61.50407954 107.78733692 0 0-71.1607951 23.19910867-65.11385185 83.46161052 0 0-2.43717093 67.16015592 151.93232126 62.56172014 0 0 108.5460788-8.0932473 141.10300432-52.14626271H526.33792324c32.57991817 44.05301539 141.10300431 52.1462627 141.10300431 52.14626271 154.3235077 4.59843579 151.95071457-62.56172013 151.95071457-62.56172014 6.00095876-60.26250183-65.11385185-83.46161053-65.11385185-83.46161052 39.77647014-50.99665395 61.4810877-107.78733693 61.4810877-107.78733692 96.45219231 149.49514952 86.84146124-20.85850523 86.84146125-20.85850523" p-id="23557" fill="#5c5c5c"></path></svg><a href="https://url.cn/5epoHIm?_type=wpa&qidian=true" class="qqcustomer_s" target="_blank"><span class="txt">QQ客服</span></a></em></p> <p><em class="width126"><svg t="1538012951761" width="17" height="17" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23083" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M466.4934485 880.02006511C264.6019863 859.18313878 107.13744214 688.54706608 107.13744214 481.14947309 107.13744214 259.68965394 286.68049114 80.14660493 508.14031029 80.14660493s401.00286817 179.54304901 401.00286814 401.00286816v1.67343191C908.30646249 737.58941724 715.26799489 943.85339507 477.28978337 943.85339507c-31.71423369 0-62.61874229-3.67075386-92.38963569-10.60739903 30.09478346-11.01226158 56.84270313-29.63593923 81.5933008-53.22593095z m-205.13036267-398.87059202a246.77722444 246.77722444 0 0 0 493.5544489 0 30.85052691 30.85052691 0 0 0-61.70105383 0 185.07617062 185.07617062 0 0 1-370.15234125 0 30.85052691 30.85052691 0 0 0-61.70105382 0z" p-id="23084" fill="#5c5c5c"></path></svg><a href="http://bbs.csdn.net/forums/Service" target="_blank"><span class="txt">客服论坛</span></a></em> <svg t="1538013874294" width="17" height="17" style="" viewBox="0 0 1194 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23784" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M1031.29689505 943.85339507h-863.70679012A71.98456279 71.98456279 0 0 1 95.60554212 871.86883228v-150.85178906c0-28.58329658 16.92325492-54.46750945 43.13135785-65.93861527l227.99160176-99.75813425c10.55341735-4.61543317 18.24580594-14.0082445 20.72896295-25.23643277l23.21211998-105.53417343a71.95757195 71.95757195 0 0 1 70.28414006-56.51881307h236.95255971c33.79252817 0 63.02360485 23.5090192 70.28414004 56.51881307l23.21211997 105.53417343c2.48315701 11.25517912 10.17554562 20.62099961 20.72896296 25.23643277l227.99160177 99.75813425a71.98456279 71.98456279 0 0 1 43.13135783 65.93861527v150.85178906A71.98456279 71.98456279 0 0 1 1031.26990421 943.85339507z m-431.85339506-143.94213475c143.94213474 0 143.94213474-48.34058941 143.94213474-107.96334876s-64.45411922-107.96334877-143.94213474-107.96334877c-79.51500637 0-143.94213474 48.34058941-143.94213475 107.96334877s0 107.96334877 143.94213475 107.96334876zM1103.254467 296.07330247v148.9894213a35.97878598 35.97878598 0 0 1-44.15700966 35.03410667l-143.94213473-33.57660146a36.0057768 36.0057768 0 0 1-27.80056231-35.03410668V296.1002933c-35.97878598-47.98970852-131.95820302-71.98456279-287.91126031-71.98456279S347.53801649 248.11058478 311.53223967 296.1002933v115.385829c0 16.73431906-11.52508749 31.25538946-27.80056233 35.03410668l-143.94213473 33.57660146A35.97878598 35.97878598 0 0 1 95.63253297 445.06272377V296.07330247C162.81272673 152.13116772 330.77670658 80.14660493 599.47049084 80.14660493s436.63077325 71.98456279 503.81096699 215.92669754z" p-id="23785" fill="#5c5c5c"></path></svg>400-660-0108 </p> <p style="text-align:center">工作时间 8:30-22:00</p> </div> <div class="bg-gray"> <div class="feed_copyright"> <p><a class="right-dotte" href="//www.csdn.net/company/index.html#about" target="_blank">关于我们</a><a href="//www.csdn.net/company/index.html#recruit" target="_blank" class="right-dotte">招聘</a><a href="//www.csdn.net/company/index.html#advertisement" target="_blank" class="right-dotte">广告服务</a> <a href="https://www.csdn.net/gather/A" target="_blank" class="footer_baidu"> 网站地图</a></p> <p class="fz12_baidu"><a href="http://beian.miit.gov.cn/publish/query/indexFirst.action" rel="noreferrer" target="_blank" class="ml14">京ICP备19004658号</a><a style="margin-left:5px;" href="https://csdnimg.cn/cdn/content-toolbar/csdn-ICP.png" target="_blank"> 经营性网站备案信息</a></p> <p class="fz12_baidu"><img style="vertical-align: middle;height:20px;width:20px;margin-bottom:3px;margin-right:5px" src="https://csdnimg.cn/pubfooter/images/gongan.png"><a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502030143" rel="noreferrer" target="_blank" class="ml14">公安备案号 11010502030143</a></p> <p class="fz12_baidu">©1999-2020 北京创新乐知网络技术有限公司 </p> </div> </div> <div class="allow-info-box"> <p> <em class="width126"><a href="http://www.cyberpolice.cn/" target="_blank"><span>网络110报警服务</span></a></em></p> <p><a href="http://www.bjjubao.org/" target="_blank"><span>北京互联网违法和不良信息举报中心</span></a></p> <p><a href="http://www.12377.cn/" target="_blank"><span>中国互联网举报中心</span></a><a href="https://download.csdn.net/index.php/tutelage/" target="_blank"><span style="margin-left:8px">家长监护</span></a><a href="https://blog.csdn.net/blogdevteam/article/details/90369522" target="_blank"><span style="margin-left:8px">版权申诉</span></a></p> </div> </div></div>
</div>
</div>