meta: improve building mockups

This commit is contained in:
Kazhnuz 2020-11-08 20:03:29 +01:00
parent d30d01ba38
commit 9332474097
3 changed files with 15 additions and 8 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.sass-cache/
node_modules/
dist/
tmp/

6
generate.sh Executable file
View file

@ -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

View file

@ -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;