From c91f9628f281a4823adfafd37fd185a50d67aaf2 Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 20 Oct 2014 13:51:25 -0400 Subject: [PATCH] Fix trailing slash detection in install --- gulpfile.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 65b423765..7b160caed 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -405,7 +405,7 @@ gulp.task('install', 'Set-up project for first time', function () { .src(defaults.paths.source.config) .pipe(prompt.prompt(questions.setup, function( answers ) { var - trailingSlash = /(\/$)+/mg, + trailingSlash = /(\/$|\\$)+/mg, templates = { theme : './src/theme.config.example', json : './semantic.json.example', @@ -458,7 +458,7 @@ gulp.task('install', 'Set-up project for first time', function () { json.components = answers.components; } if(answers.dist) { - answers.dist.replace(trailingSlash, ''); + answers.dist = answers.dist.replace(trailingSlash, ''); json.paths.output = { packaged : answers.dist + '/', uncompressed : answers.dist + '/components/', @@ -467,19 +467,19 @@ gulp.task('install', 'Set-up project for first time', function () { }; } if(answers.site) { - answers.site.replace(trailingSlash, ''); + answers.site = answers.site.replace(trailingSlash, ''); json.paths.source.site = answers.site + '/'; } if(answers.packaged) { - answers.packaged.replace(trailingSlash, ''); + answers.packaged = answers.packaged.replace(trailingSlash, ''); json.paths.output.packaged = answers.packaged + '/'; } if(answers.compressed) { - answers.compressed.replace(trailingSlash, ''); + answers.compressed = answers.compressed.replace(trailingSlash, ''); json.paths.output.compressed = answers.compressed + '/'; } if(answers.uncompressed) { - answers.uncompressed.replace(trailingSlash, ''); + answers.uncompressed = answers.uncompressed.replace(trailingSlash, ''); json.paths.output.uncompressed = answers.uncompressed + '/'; } if(configExists) {