Skip to content

Commit

Permalink
Test something with gulpfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentCraftsman committed Dec 28, 2024
1 parent aa14335 commit 36b9666
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
var gulp = require("gulp"), pug = require('gulp-pug-3'), runSequence = require('gulp4-run-sequence');;
var gulp = require("gulp"),
pug = require("gulp-pug-3"),
runSequence = require("gulp4-run-sequence");

gulp.task('pugToHtml', () => {
return gulp.src('src/*.pug')
.pipe(pug({
pretty: true
}))
.pipe(gulp.dest('dest'));
});
gulp.task("pugToHtml", () => {
return gulp
.src("src/*.pug") // S'assurer que tous les fichiers .pug dans src sont capturés
.pipe(
pug({
pretty: true,
})
)
.pipe(gulp.dest("dest")); // Le résultat doit aller dans dest/
});

gulp.task("copy", () => {
return gulp
.src(
[
"src/styles/*.*", // Assurer que tous les fichiers CSS sont pris en compte
],
{
dot: true,
}
)
.pipe(gulp.dest("dest")); // Les fichiers CSS seront également copiés dans dest/
});

gulp.task('copy', () => {
return gulp.src([
"src/styles/*.*",
], {
dot: true,
})
.pipe(gulp.dest('dest'));
});

gulp.task('build', done => {
runSequence(
['pugToHtml'],
['copy'],
done
);
});
gulp.task("build", (done) => {
runSequence(
"pugToHtml", // D'abord transformer Pug en HTML
"copy", // Puis copier les fichiers CSS dans dest
done
);
});

0 comments on commit 36b9666

Please sign in to comment.