]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Allow paths to be passed to the --output flag of the customizer
authorGeoff Kimball <geoff@zurb.com>
Wed, 16 Mar 2016 22:04:07 +0000 (15:04 -0700)
committerGeoff Kimball <geoff@zurb.com>
Wed, 16 Mar 2016 22:04:07 +0000 (15:04 -0700)
gulp/customizer.js

index 91d4fc3afa7bcc680bc9fb76255cabf2d1e13bba..32f80983b2d06b96b63f39dcee4fe3b073ba74ee 100644 (file)
@@ -98,13 +98,16 @@ gulp.task('customizer:html', ['customizer:loadConfig'], function() {
 //   - Creating a blank app.css file
 //   - Creating an app.js file with Foundation initialization code
 gulp.task('customizer', ['customizer:sass', 'customizer:javascript', 'customizer:html'], function(done) {
+  var outputFolder = path.dirname(OUTPUT_DIR);
+  var outputFileName = path.basename(OUTPUT_DIR);
+
   touch(path.join(OUTPUT_DIR, 'css/app.css'));
   touch(path.join(OUTPUT_DIR, 'js/app.js'));
   fs.writeFileSync(path.join(OUTPUT_DIR, 'js/app.js'), '$(document).foundation()\n');
 
   gulp.src(path.join(OUTPUT_DIR, '/**/*'))
-    .pipe(zip(path.basename(OUTPUT_DIR) + '.zip'))
-    .pipe(gulp.dest('.'))
+    .pipe(zip(path.basename(outputFileName) + '.zip'))
+    .pipe(gulp.dest(outputFolder))
     .on('finish', function() {
       rimraf(OUTPUT_DIR, done);
     });