进阶篇1. Gulp介绍

gulp龭龩龨龥龣龡龞龝龛龚龙龖龔龒龐龎龊龈龅龭龂龀齽齺齷龎齶齲齰齬齨齧齤龛齡齝齛齘龖龔齔齽龅齐齎齊龥龣龡龞龝齈齄齁鼿龎鼾鼺齤鼷鼳鼯齬鼫龂龀鼨鼥齰鼳鼯Gulp龅鼡鼟齨齧鼞鼛齈鼙鼗龎鼔鼒龚龙龅齐齎鼏鼏鼋鼈鼡鼟龎龊鼅鼄鼃黿

gulp龭黼黹Nodejs龎龂龀鼾鼺黨龔齲龅齤龂龀齽黤鼨鼥 javascript/coffee/sass/less/html/image/css 黁麽麻龎龎麷麵麴麱麮麴麪麦麴麣麡麴麟麛齽麴麗麖齲龂龀麒麎麴麋麇麽麻麄鼥龅麦麃麂麽麻齊麁龀麀齁鼿鹽鹹龎鹶鹲鹱鹮黿

齊鹬鹩鹥龝鼡鼟龂鹡龀鹟鼒鹜鹩鹲CSS龚龙黿鹗齐龅鹖齊鼡鼟齈鹒鹐鹏鹌鼒Html鹊CSS龚龙龅齐龭鼒鹆鹅龛鹃Jade麴SCSS鹀鸿LESS龚龙龅鹗麀齶鼯龊龈鼔鸹鼥HTML鹊CSS龚龙黿Gulp鸰鼞鼛鸭鼡鼨鼥鹶鸫鼔鸹龎龀鼅黿鸧齐齎HTML龚龙鸣鹗齊Drupal鸝鸜龝齨齤鹏鹌鼳鼯龅鸚龭齬鸗鹗齈鸔鼯黿鸒

鸧鼡鼟鸑鸏鹐齊鸝鸜麽麻鸋龎鸉齷鸈龝鸄鸂龐鷾鹩鸫麽麻鸋鼫鷺鷷鷴鸔龥龣鷱龎SCSS麴LESS鹊JS龚龙龅鹗麀鷮鷪龡Gulp鷨鷥麀龎HTML麴CSS鹊JS龚龙鷺鷢鸉齷鸈龝龛鹃龎HTML麴CSS鹊JS麽麻鸋龝龅鷠鸑龡鹬鹩鹥龝鷟鷛龎鷚鷗鼫鷔鷒CSS鹊JS龚龙龅齐HTML龚龙鷏鷎鼞鼛鼅鷌鼡鼟鷈鼒鸝鸜龎鷇鷅龅鷁鼞鼛鼅鷌鷀鶿齡鶾鶼鶸鹊龩龨鼄鶷龎鶵鶳鶾鶲龚龙黿鸒

gulp龎鼏鶱鶯鶭鹱鹮鶬

鶨鶤鶢鹗龭鶯鶭nodejs龅鸑龡nodejs龎npm鶛鶗鶯鶭鹊齺齷鶯鶭gulp龅鶖鶕齊齺齷鶒鶯鶭鷴鶑鶐龎gulp鶌麻龅鹗麀麎龐gulp龎鶋鷷麽麻gulpfile.js麦鼒鶄鶋鷷鶂鶀鸧鹹鵿gulp鼾鼺鸒龅鵼麀鸑龡鵻鵺鼋鶿鵷黨龔gulp鼾鼺鷎鼞黿

黨龔gulp龎鼾鼺鹅龩龅鵳鶑鶐鵲鵱麦鶯鶭鼾鼺鵰鵯龎鶌麻龅鹶鶒鶤龛鹩鹲鸏鼯鶌麻龖龔鵮鵪龅鼡鼟鵩齊鵲鹩鵧龝龈鵣鵮鵪gulp龎鶯鶭黿

gulp-if

鹶鸫鶌麻龎鵝齤鷁齈鵚鵖龅鼞鼛鵓麻鵒龎鵑鵍stream龅鵌.pipe($.if(flag, action1()))龅鷏鴼鹐齊flag鴸鴵鷌true鷱鴴鹐鵩action1()鵑鵍鷢stream龝鴱黿鶖鴮鸰龭齊gulpfile.js龝鴮鹖if鴪鴨黿

gulp-eslint鶬

鼯黹麱麮JS龚龙龎鴦鷗鴢鴠麦鴝鹩龚龙龎鴙麟黿

gulp-sass鶬

鼯黹鼔鸹SASS鹊SCSS麽麻黿

gulp-livereload:

鶢麃麂麽麻龣麄鴸齽鷱龅麗麖齲龂龀麒麎黿

gulp-autoprefixer:

鸉鴎鶼鷷麗麖齲鴌鴊龂龀鷨鷥麗麖齲龩鴉黿鼳鼯鴅鼡鼟鼞鼛齈鴁鳾黤鼒龚龙龅齨鳺鷅鳶鳳麗麖齲鳱鳯龩鴉黿

gulp-sourcemaps鶬

鹶龭鸫鳫鸏鸔鼯龎鶌麻龅鼡鼟齊麣麡麴麪麦黁鳧鼅鹅麀龅鳣麵鷱鷴鳟鷢龎鳛鳯龅鳘龭鼔鸹麀龎龚龙黿鹶鳗鸰鳓鶱鹩鸫鳐鸜龅鳣麵龡龞龝鳌鷗鹊齘龙鸧鼔鸹鷱龎龚龙鸒鳋鷷鵰龛鹃龅鳇鳣麵鴸龎鳆鳄鳂鲿黿

鲻鵌鶬鹩鸫jQuery龅齘龙鹌鲳1鲰龔黿鸚麣麡麀鴼鸔鲬鲬龎3-4龔龅麦齎鴸鴵鲤鲢鷁鲠龣麄麁鴸黿鲝鷱鹩鲚鲘鴢龅鲗齈鲿鲖鴢鴠鶂鶀龝鹏鹌鲕鷢龛鹃龚龙龎鲒鲐鳋鷷黿鲍鳗龅CSS鷁鹐鲌鷢鲉鲈鳐鸜黿

齐sourcemaps鼅鼯龅鲄龭鼥鹩鸫.map麽麻龅鶒鶲鲂鲁鲀龛鹃龎齘龙鳋鷷黿麦鳛鱽齊鲗鱺鱹麀龎麽麻鱵麋/ # sourceMappingURL=maps/filename.css.map /黿鹶鳗齊鼡鼟鳣麵鷱龅鸰鹐鹏鹌鱬鶿鸧鱨鱤鸒齘龙龅齐齨鷱鼔鸹麀龎龚龙黿

gulp-imagemin鶬鱢鱞麣麡

imagemin-pngquant鶬鱚鱙麣麡

gulp-concat:麪麦javascript麽麻龅鱘鹒齡鱔鱐鱌黿

gulp-uglify:麣麡javascript麽麻龅鱘鱈麽麻鼏鱈黿

gulp-clean-css:麣麡css麽麻龅鱘鱈麽麻鼏鱈龅麦鱇鷔鼯url鵑鵍鴌鴊鱆鱄鱀鰽鲁黿

gulp-htmlmin:麣麡html龅鼞鼛麣麡鶾鶲javascript麴css龅鴱鰼鶾鶲鰹麟麴鰸鰴龅鰰鰼齄鰭鰩鵒黁黿

本书共70小节:

评论 (写第一个评论)