Last active
August 29, 2015 14:19
-
-
Save eiszfuchs/ebcf13eeaf642d9cd16a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require("gulp"); | |
| var debug = require("gulp-debug"); | |
| var request = require("request"); | |
| var source = require("vinyl-source-stream"); | |
| var streamify = require("gulp-streamify"); | |
| var prepend = require("gulp-header"); | |
| var uglify = require("gulp-uglify"); | |
| var sources = { | |
| "d3.js": "https://raw.githubusercontent.com/mbostock/d3/master/d3.js", | |
| "draggabilly.js": "http://draggabilly.desandro.com/draggabilly.pkgd.js", | |
| "imagesloaded.js": "http://imagesloaded.desandro.com/imagesloaded.pkgd.js", | |
| "infinity.js": "http://airbnb.github.io/infinity/infinity.js", | |
| "jquery-1.js": "http://code.jquery.com/jquery-1.11.2.js", | |
| "jquery-2.js": "http://code.jquery.com/jquery-2.1.3.js", | |
| "masonry.js": "https://raw.githubusercontent.com/desandro/masonry/master/dist/masonry.pkgd.js", | |
| "moment.js": "http://momentjs.com/downloads/moment.js", | |
| "packery.js": "http://packery.metafizzy.co/packery.pkgd.js", | |
| "paper.js": "https://raw.githubusercontent.com/paperjs/paper.js/master/dist/paper-full.js", | |
| "phaser.js": "https://raw.githubusercontent.com/photonstorm/phaser/master/build/phaser.js", | |
| "pixi.js": "https://raw.githubusercontent.com/GoodBoyDigital/pixi.js/master/bin/pixi.dev.js", | |
| "sloth.js": "https://raw.githubusercontent.com/hakubo/Sloth/master/sloth.max.js", | |
| "stats.js": "https://raw.githubusercontent.com/mrdoob/stats.js/master/src/Stats.js", | |
| "underscore.js": "https://raw.githubusercontent.com/jashkenas/underscore/master/underscore.js", | |
| "waypoints.js": "https://raw.githubusercontent.com/imakewebthings/waypoints/master/lib/jquery.waypoints.js", | |
| }; | |
| gulp.task("default", function () { | |
| for (var name in sources) { | |
| var url = sources[name]; | |
| request(url) | |
| .pipe(source(name)) | |
| .pipe(debug({title: name + ":"})) | |
| .pipe(gulp.dest("dist/dev/")) | |
| .pipe(streamify(uglify())) | |
| .pipe(prepend("/* source: " + url + " */\n")) | |
| .pipe(gulp.dest("dist/")); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "dependencies": { | |
| "gulp": "^3.8.11", | |
| "gulp-debug": "^2.0.1", | |
| "gulp-header": "^1.2.2", | |
| "gulp-streamify": "0.0.5", | |
| "gulp-uglify": "^1.2.0", | |
| "request": "^2.55.0", | |
| "vinyl-source-stream": "^1.1.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment