meta: improve building mockups
This commit is contained in:
parent
d30d01ba38
commit
9332474097
3 changed files with 15 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.sass-cache/
|
||||
node_modules/
|
||||
dist/
|
||||
tmp/
|
||||
|
|
6
generate.sh
Executable file
6
generate.sh
Executable 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
|
16
gulpfile.js
16
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;
|
||||
|
|
Loading…
Reference in a new issue