Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
gulpfileãES6ã«ç½®ãæããå¿ è¦ããããä½æ°ã«gulpã®æ å ±è¿½ã£ã¦ããã¨ã ããããv4.0ããªãªã¼ã¹ãããããªã®ã§ãã£ããã¨çºãã¦ã¿ãã gulpfileãES6ã§æ¸ãã¾ããæ¬æ¥ã®ç®çã ã£ããã®ä»¶ãv3.9ã§ãã§ã«å¯¾å¿ããã¦ããã 以ä¸ã®æ¡ä»¶ã§ããã°å©ç¨å¯è½ã®ããã ã£ãã gulp v3.9ä»¥ä¸ gulpfile.jsãgulpfile.babel.jsã¨ãã babel-core ãã¤ã³ã¹ãã¼ã«ããã㨠å é¨çã«ã¯babelã§å¤æãã¦ããããã ã ç¶ãã¦ãv4.0ã®CAHNGELOGãçºãã¦ã¿ãã gulp4.0ãã¤ã³ã¹ãã¼ã« cliã®å¤æ´ç¹--tasks-json 㨠--verify ãªãã·ã§ã³ã追å ããã¦ãã âtask-json ã¯ã¿ã¹ã¯ãjsonå½¢å¼ã§åºåããã âverify ã¯pluginsãpackage.jsonãåç §ãã¦ããããã§ãã¯ããã APIã®å¤æ´ç¹å¤§
https://github.com/maxogden/wzrd ã¯ã¢ã¯ã»ã¹ãã度ã«å¤æ´ãåãåºãã®ã ããwatchify ã¯å·®åã管çãã¦ãããã reactã¨ãç¡é§ã«å·¨å¤§ãªãã§ãrequire('react') ããã ãã§1.2ç§ãããå¾ ããªãã¨ãããªããªã£ã¦è¾ãã£ããããããåé¡ã解決ã§ããã ç°¡åãªä½¿ãæ¹ npm install -g watchify ããã ãã-v 㧠verboseã¿ãªãã¨åãã¦ãã®ãããããããªãã£ãã®ã§ä»ããã»ããããããã æã¢ããªã®ãã«ãã3.8ç§ãã0.3ç§ã«ãªã£ã¦æé« èªåã®ä½¿ãæ¹ ä¸æ¦ãã¹ã¦ãjsã«ãã¦åãåºãã gulp㧠src/**/* -> lib/**/*.js lib/index.js ãåºæºã«browserify ãã gulp-watchify ã使ã£ãã arda-starter-project ã§ã¯æ¯åº¦ã®ãã«ãã®é ããåé¡ã«ãª
With the ever-changing eco system of Node.js tools, a short version disclaimer. This article has been created using Gulp v3.8 Browserify Glob 5.0 Event Stream 3.3 Vinyl Source Stream 1.1 If something does not work when youâre using the same tutorial, please check if thereâs been a major update causing breaking changes. And please do inform me, I like keeping those tutorials updated when possible.
Saturday, May 02, 2015 03:51:00 PM JavaScript gulp gulp-rev JavaScriptã§ã¢ãã³ãªéçºãããã¨ããgulpã¨ãããã«ãã·ã¹ãã ã使ãã¨ãç°¡åã«ãã«ãéç¨ãèªååã§ãã¾ãã ããã«ãJavaScriptã§ã¢ããªã±ã¼ã·ã§ã³ãä½ã£ãã¨ããã©ã¤ãã©ãªã¯CDNãªã©ããåå¾ããã¨ãã¦ãèªåã§ä½ã£ãã¹ã¯ãªãããã¡ã¤ã«ã¯ï¼ã¤ã®ãã¡ã¤ã«ã«ã¾ã¨ãã¦ãããã¡ã¤ãºãããã¨ãããã¨ãgulpã®ã¿ã¹ã¯ã§æ¸ãã§ãããã ä¸è¬çã«JavaScriptãCSSãHTMLä¸ã«è¨è¿°ããã¨ãã以ä¸ã®ããã«ãã¾ãã <script type="text/javascript" src="/js/app.js"></script> <link rel="stylesheet" href="/css/app.css" type="text/css"> ãªãªã¼ã¹ããã®ã«
browserify ã® API ãå¤ãã£ãã®ã§ããã®è¨äºã®ã³ã¼ãã®ã¾ã¾ã§ã¯åãã¾ããï¼ gulp 㧠browserify ãããã¨ãããã ãã©ã è²ã ããã£ãã®ã§ã ã²ã¨ã¾ãã¾ã¨ãã¦ããããã ç»å ´äººç© gulp ã¡ãã ããã³ãã¨ã³ãã®ãã«ãã¨ã³ã¸ã³ã grunt ã馬鹿ã«ãã¦ãã browserify ã¡ãã CommonJS ã¹ã¿ã¤ã«ã® require ãããã³ãã¨ã³ãã§ã使ããããã«ãã npm ã¢ã¸ã¥ã¼ã«ã 調åã«ä¹ã£ã¦ããã© webpack ããã«ãªãã vinyl ã¡ãã npm å ¨è¬ã§ä½¿ããªãã¸ã§ã¯ãã®ååãã¢ãããæããã 俺ããã£ãç¥ã£ãã gulp ã®ä»çµã¿ ãããã gulp ã£ã¦ã確ãã« grunt ããçãæ¸ãããã©ã å ·ä½çã«ãªã«ãã¦ãã®ãããããããã¼ãï¼ ã£ã¦æã£ãã®ã§ã ã¾ãããã®çãã³ã¼ãããèãã¦ããããã var gulp = require(
ãã©ã°ã¤ã³éçºã«é¢ãã詳細ãªæ å ±ã¯gulpã®å ¬å¼ããã¥ã¡ã³ããåç §ã®ãã¨ãã¾ããéçºãããã©ã°ã¤ã³ãå ¬éããå ´åã¯gulpå ¬å¼ã«ãããã©ã°ã¤ã³éçºã¬ã¤ãã©ã¤ã³ã¯å¿ èªï¼MUST readã¨æ¸ããã¦ããï¼ãREADMEè¦ç´ãè¦ã¦ããã¨ããã ï¼2014/2/9追è¨ï¼ãã©ã°ã¤ã³éçºã¬ã¤ãã©ã¤ã³ã®æ¥æ¬èªè¨³ãå ¬éï¼ ãªããgulpãã©ã°ã¤ã³ã¯node.jsããã±ã¼ã¸ã®ä¸ç¨®ãªã®ã§ãå ¬éããéã®æé ãpackage.jsonã®è¨è¿°æ¹æ³ãªã©ã¯node.jsã®ããã¥ã¡ã³ããåç §ã®ãã¨ã gulpãã©ã°ã¤ã³ã®å®æ ï¼i.e. pipeã«æ¸¡ããã®ï¼ã¯node.jsã®Stream.Transformã®ãµãã¯ã©ã¹ Stream.Transformã¨ã¯ãã¹ããªã¼ã ããã®å ¥åãåãåããå å·¥ããã¹ããªã¼ã ã«åºåãããã® Stream.Transformã®ãµãã¯ã©ã¹ãç´æ¥ä½ã£ã¦å®è£ ãã¦ãè¯ãããgulpãã©ã°ã¤ã³ã§ã¯Str
è¿½è¨ config.js ã¯å¸¸ã«èªåçæããããã®ã ã¨æã£ã¦ãã¾ãããããã®èªèã¯èª¤ãã ã£ãããã§ãã ãã®ãããjspm_packages ä¸ã§ã¯ãªããpublic ãã£ã¬ã¯ããªã«è¨ç½®ããããã«ãã¾ããã ã¯ããã« ã¼ã㯠Web ã®æè¡ã大好ãã ã¯ããã« HTML æ¸ãã¦ãã©ã¦ã¶ã§è¦ãã表示ããã¦æåããã®ãä»ã§ãè¦ãã¦ãã ãããªèª¿åã§ããã°ã©ãã³ã°ã®ä»äºã«ã¤ãã¦ããã£ã¨ãããã¸ããæ¸ãã¦ããã©ã æè¿ã®éçºãããã©ããã¼ãã¨å¤ããªãã§ããã AltJS ã ã¼ãReact + JSX ã ã¼ããããã¡ã¤ã ã¼ãä¾åã®è§£æ±ºã ã¼ï¼ ãã¡ãããå¿ è¦ãªãã¨ã ããã¤ã±ã¦ãã®ãããããã©ãéçºä¸ã«æ¯å watch ããã®ãããã©ãã...ãã¨æã£ã¦ããã æä¸ä¸» jspm ä¼ç¤¾ã®äººããªã«ããªãç´¹ä»ãã¦ãã jspmã ãã«ããã¼ã«ã¨ãã®ãéçºå ¨ä½ããã¬ã¤ã§æ¥½ã«ãªãã¾ãï¼ãã£ã¦ããã®ã好ããªã®ã§ã試
ç¸å¤ãããä»äºã§ã¯ãã¶ã¤ã³ããã¤ã¤JavaScriptæ¸ãã¦ããã ã¿ã¹ã¯ã©ã³ãã¼ã¨ãã¦Grunt.jsã使ã£ã¦ããããã©ãã使ããã¡ã«æ®µã ä¸æºãã§ã¦ãããé ãã£ãããè¨è¿°ãåé·ã«ãªããã¡ã§ã¤ããã£ãã®ã§æè¿ã«ãªã£ã¦gulpã«ä¹ãæããã gulpã¯è¯ããã¿ã¹ã¯ã¯èªåçã«ä¸¦åã«å®è¡ããããã¤ã¹ããªã¼ã ã§å¦çãããã®ã§éãããã¿ã¹ã¯ã®è¨è¿°ãã¹ããªã¼ã ãã¼ã¹ã®æ¸ãæ¹ã®ãããã§Grunt.jsã«æ¯ã¹ãã¨ã ãã¶çããªãã ãã ããããã«ããgulpãã¡ãã£ã¨è©¦ããã ãã®æ¥æ¬èªã®è¨äºãããã¥ã¡ã³ããã¿ã¦ã¦ãå®éã®ããã¸ã§ã¯ãã§ä½¿ããã¬ãã«ã¾ã§ã®ç¥èãå¾ãããå¦ç¿ã«ä¸æ¥ããã£ãã ãã®è¨äºã§ã¯ãgulpãã¾ã¨ãã«ä½¿ããããã«ãªãã¾ã§ã«å¿ è¦ãªç¥èãæ¸ãã å°å ¥ã¨HelloWorld ã¾ãã¯å°å ¥ãnpmããgulpãã¤ã³ã¹ãã¼ã«ããã $ npm install gulp -g $ gulp -v [gu
ä½çªç ããããããªããã©ãgulpã使ã£ã¦ã¿ããä¸ã è¯ãã£ãã®ã§ã¾ã¨ãã¦ã¿ã¾ãã gulp.jsã¨ã¯ gulp.js ã¯ããã³ãã¨ã³ãç¨ã®ã¿ã¹ã¯ã©ã³ãã¼ã£ã¦ãã¤ã§ãã åãã¿ã¹ã¯ã©ã³ãã¼ã®ç«¶åã« Grunt ãããã¾ãããå¾çºã ããã£ã¦ã¹ããªã¼ã ãé§ä½¿ãã¦å¯èªæ§ã®è¯ãè¨å®ãã¡ã¤ã«ãæ¸ãã¾ãã Gruntã§ã§ãããã¨ã¯å¤§ä½gulpã§ãã§ããã®ã§ãã©ã¡ãã使ã£ããè¯ããã¯å¥½ã¿ã®åé¡ããç¥ãã¾ããã ãã®è¨äºã§ã¯sassã®ã³ã³ãã¤ã«ãããã¿ã¹ã¯ã¨ãé¢é£ãã¦ãã³ãã¼ãã¬ãã£ãã¯ã¹ãèªåã§ä»ä¸ããã¨ããã¾ã§ç´¹ä»ãã¾ãã gulpã®ã¤ã³ã¹ãã¼ã« npmã³ãã³ãã§ãµã¯ãã¨å ¥ãã¾ãã $ npm install -g gulp ããã§gulpã³ãã³ãã使ããããã«ãªãã¾ããã gulpã§sassã®ã³ã³ãã¤ã«ããã gulpã§sassãã³ã³ãã¤ã«ããã®ã«ããã¡ãã®ãã©ã°ã¤ã³ã使ãã¾ãã gulp-ruby-
ãã®ããã¥ã¡ã³ãã¯ãgulpfileã®åå©ç¨æ§/ã¡ã³ããã³ã¹æ§ãé«ãããã¨ãç®çã¨ãããéå ¬å¼ãªã¹ã¿ã¤ã«ã¬ã¤ãã§ãã æ´æ°æ å ± 2014/10/05 - ãã¼ã¸ã§ã³çªå·ã¤ãã¾ããã 2014/10/04 - ãã¿ã¹ã¯è¾æ¸ããããããã¿ã¹ã¯ã®å ±æãã«ã以åã®å 容ã¯gulpfilesã¨ãã¦å¥ããã¥ã¡ã³ãã«ã ã¯ããã« gulpfileã¯gulp.jsã®ã¿ã¹ã¯ãå®ç¾©ãããã¡ã¤ã«ã§ããã¹ã¯ãªãããã¡ã¤ã«ãªã®ã§èªç±ã«æ¸ããåé¢ãããã¸ã§ã¯ãã大ãããªãã¨ãæ¸å¼ãçµ±ä¸ãåé¡ã«ãªãã¾ãããããªæããã®ã¹ã¿ã¤ã«ã¬ã¤ããå½¹ã«ç«ã¤ã§ãããã対象ã¨ãªãã®ã¯æ¬¡ã®ãããªã±ã¼ã¹ã§ãã gulp.js ã«æ £ãã¦æ¥ã¦ãåå©ç¨æ§ã®ããã¿ã¹ã¯ãæ¸ããã ãã¼ã ã§éç¨ããå¿ è¦ããããæ¸å¼ãçµ±ä¸ããã ã¹ã¿ã¤ã«ã¬ã¤ãã¨ãã¦ãä¸è¨ãåèã«ãã¦ãã¾ããã¾ããããã§è¿°ã¹ãªã JavaScript / CoffeeScript ã®è¨èªã¨
Gruntfile.js ã¯å¸¸ã é·ãããã¨æã£ã¦ãã¾ãããè¤æ°ãã¡ã¤ã«ã«åå²ããããé·ããã®ã¯é·ãã§ãã æè¿ãå¾çºã® gulp ã¨ãããã®ãè¦ã¤ãã¦ä½¿ã£ã¦ã¿ã¦ãã¾ãããããæãã§ãã è¨å®ãã¡ã¤ã«ãçãæ¸ããä¸ã«ãéãã§ãã å æ¥ Grunt å ¥éã®è¨äºãWeb ãã¶ã¤ãã¼ããåã Grunt ã使ã£ã ã³ã¼ãã£ã³ã°ä½æ¥ã®å¹çåãã¯ããã®ä¸æ©ããèªãã§ãä¾ã® Gruntfile.js ã¨åçã®å 容ã gulp ã§æ¸ãããã©ããªãããªã¨æã£ã¦æ¸ãã¦ã¿ã¾ããã ãµã³ãã«ãã¡ã¤ã«å«ããããã¸ã§ã¯ãå ¨ä½ gulpfile.js ã ã 67 è¡ãã 29 è¡ã«ãç´åæ¸ã§ããã¾ããçããªã£ãã ãã§ã¯ãªããå¦çã®æµãããããããããªã£ã¦ããã¨æãã¾ãã var gulp = require('gulp'); var concat = require('gulp-concat'); var prefix
var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var browserSync = require('browser-sync'); var rimraf = require('rimraf'); var runSequence = require('run-sequence'); gulp.task('jshint', function () { return gulp.src('src/scripts/**/*.js') .pipe($.jshint()) .pipe($.jshint.reporter('jshint-stylish')); }); gulp.task('image', function () { return gulp.src('src/images/**/*') .pipe($
gulpãã©ã°ã¤ã³ã®éçºè åãããã¥ã¡ã³ãã®ä¸ã§ãMUST Readã¨ãªã£ã¦ããã¬ã¤ãã©ã¤ã³ãæ¥æ¬èªã«ç¿»è¨³ãã¾ããããªãªã¸ãã«ã®ææ¸ã¯ãã¡ãGuidelinesã§ãã 権å©è ã®è¨±å¯ãå¾ã¦ç¿»è¨³ï¼å ¬éãã¾ãããªãªã¸ãã«ã¨åãã©ã¤ã»ã³ã¹CC0ã§ããã¾ããæ«å°¾ã«ç¿»è¨³ã®æ´æ°è¨é²ãæ²è¼ãã¦ããã¾ãã誤訳ãªã©ããã°ã³ã¡ã³ãæ¬ã§ææãã¦ãã ããããããããé¡ããã¾ãã ã¬ã¤ãã©ã¤ã³ ãã®ã¬ã¤ãã©ã¤ã³ã¯å¼·å¶ã§ã¯ããã¾ããããå ¨ã¦ã®ãã©ã°ã¤ã³éçºè ãå¾ããã å¼·ã 奨å±ãã¾ãã質ã®æªããã©ã°ã¤ã³ãªã©èª°ã使ããããªãã§ããããã¾ããã®ã¬ã¤ãã©ã¤ã³ã¯éçºè ãgulpã¨ç¸æ§ã®ãããã©ã°ã¤ã³ãæ¸ãæå©ãã«ãªãã¯ãã§ãã Writing a Plugin > ã¬ã¤ãã©ã¤ã³ æ¢åã®nodeã¢ã¸ã¥ã¼ã«ã使ã£ã¦å®¹æã«åºæ¥ããã¨ããã©ã°ã¤ã³åãã¹ãã§ãªã ã©ããã³ã°ã§ããããã¨ãã£ã¦å ¨é¨ã©ããã³ã°ãã¦ãã¾ãã¨ãã¨ã³ã·ã¹ãã ã«ç¡
@yosuke_furukawaãããtweetãã¦ãããµã¤ãããã©ã¼ãã³ã¹ã«é¢é£ãã Gruntã¨gulp.js ã®ã¿ã¹ã¯ä¸è¦§ã§ãã確ãã«ããã¾ã¨ããªã®ã§ãã¡ã¢ãã¦ããã¾ãã Gruntã¨Gulpã«ã¯ãç»åã®æé©åãHTML/CSS/JavaScriptãã¡ã¤ã«ã®çµå & å§ç¸®ãããã¿ã¹ã¯ãããã®ã§ãã¾ããã¡ãããã¼ã¹ã©ã¤ã³ã¨ãã¦å©ç¨ããããã 1) ç»åãã¡ã¤ã«ã®å§ç¸® & æé©å webãã¼ã¸ã¯å¹³å1.5MBã§ç»åãã¡ã¤ã«ãå¤ããå ãããã¢ãã¤ã«ã§160KBã®ç»åãã¡ã¤ã«ã追å ããã¨ç´å¸°çã12%æªåãããã¨ããEtsyã®ãã¼ã¿ãããã Grunt grunt-contrib-imagemin grunt-imageoptim (OSXã®ã¿ï¼ äºã¤ã®ã¿ã¹ã¯ã®ã©ã¡ããé¸ã¶ãã¯ããã¡ãã®æ¯è¼è¡¨ ã§ç¢ºèªãã¦ãã ããã Gulp gulp-imagemin 3/4/2014æç¹ã§ã¯Image
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}