]> git.ipfire.org Git - thirdparty/foundation/foundation-emails.git/commitdiff
Add deploy script to generate ZIP file download
authorGeoff Kimball <geoff@zurb.com>
Tue, 22 Mar 2016 05:37:59 +0000 (22:37 -0700)
committerGeoff Kimball <geoff@zurb.com>
Tue, 22 Mar 2016 05:37:59 +0000 (22:37 -0700)
.gitignore
gulpfile.js
package.json

index ec1e098cbb66cb973b3dba2ddcadd6d2b229e103..d6caeb0f1e16baf501b960e3d1958a4dde6f65a9 100644 (file)
@@ -8,3 +8,5 @@ _build/
 inky
 *.swp
 .templates
+.download
+foundation-emails.zip
index c9862384d41d7a3a6745794bfac59e674176d55e..25a835ab165c421a6789f3af2fe211da0b7f50c7 100644 (file)
@@ -161,6 +161,25 @@ gulp.task('templates', function() {
     .pipe(gulp.dest('.templates'));
 });
 
+gulp.task('download:build', ['sass:foundation', 'templates'], function() {
+  gulp.src('test/visual/_template.html', { base: 'test/visual' })
+    .pipe($.injectString.replace('<%= contents %>', ''))
+    .pipe($.rename('index.html'))
+    .pipe(gulp.dest('.download'));
+
+  gulp.src('.templates/*.html')
+    .pipe(gulp.dest('.download/templates'));
+
+  return gulp.src('_build/assets/css/foundation.css')
+    .pipe(gulp.dest('.download/css'));
+});
+
+gulp.task('download', ['download:build'], function(done) {
+  gulp.src('.download/**/*')
+    .pipe($.zip('foundation-emails.zip'))
+    .pipe(gulp.dest('.'));
+});
+
 function inliner(css) {
   var css = fs.readFileSync(css).toString();
   var mqCss = siphon(css);
index 0ec65d2bd5a730f15aa0f969724cb9c411ed8c84..701c376a992e49995b0872cb03ca548b7bbfdd2c 100644 (file)
@@ -31,6 +31,7 @@
     "gulp-load-plugins": "^1.0.0-rc.1",
     "gulp-prettify": "^0.4.0",
     "gulp-prompt": "^0.1.2",
+    "gulp-rename": "^1.2.2",
     "gulp-rsync": "0.0.5",
     "gulp-sass": "^2.1.0",
     "gulp-sass-lint": "^1.1.1",