From 933247409769bab14b2b977d062473a50a6f43ed Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 8 Nov 2020 20:03:29 +0100 Subject: [PATCH] meta: improve building mockups --- .gitignore | 1 + generate.sh | 6 ++++++ gulpfile.js | 16 ++++++++-------- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100755 generate.sh diff --git a/.gitignore b/.gitignore index bbf41bb..84eb260 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .sass-cache/ node_modules/ dist/ +tmp/ diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..288ce56 --- /dev/null +++ b/generate.sh @@ -0,0 +1,6 @@ +echo "STEP 1 - Generation des fichiers statics" +gulp + +echo "STEP 2 - Remplacement dossier public par dossier temp" +rm -rf dist +mv tmp dist diff --git a/gulpfile.js b/gulpfile.js index 78829f9..537c32f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,45 +7,45 @@ sass.compiler = require('node-sass'); function html() { return src('src/static/*.html') .pipe(include()) - .pipe(dest('dist')) + .pipe(dest('tmp')) } function css() { return src('src/scss/style.scss') .pipe(sass().on('error', sass.logError)) - .pipe(dest('dist')) + .pipe(dest('tmp')) } function js() { return src('src/js/*.js') - .pipe(dest('dist/js')) + .pipe(dest('tmp/js')) } function htmladmin() { return src('src/admin/*.html') .pipe(include()) - .pipe(dest('dist/admin')) + .pipe(dest('tmp/admin')) } function cssadmin() { return src('src/admin/scss/style.scss') .pipe(sass().on('error', sass.logError)) - .pipe(dest('dist/admin')) + .pipe(dest('tmp/admin')) } function jsadmin() { return src('src/admin/js/*.js') - .pipe(dest('dist/admin/js')) + .pipe(dest('tmp/admin/js')) } function dep() { return src(['dep/**/*']) - .pipe(dest('dist/dep')); + .pipe(dest('tmp/dep')); } function assets() { return src(['assets/**/*']) - .pipe(dest('dist')); + .pipe(dest('tmp')); } exports.html = html;