Skip to content

Commit

Permalink
Première structure pour la page de maintenance + tâche gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Jul 10, 2014
1 parent 2c3b659 commit 618cb67
Show file tree
Hide file tree
Showing 6 changed files with 4,272 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ var paths = {
smileys: "assets/smileys/**",
stylesheet: "assets/scss/main.scss",
scss: ["assets/scss/**", "!assets/scss/_sprite.scss"],
errors_scss: ["errors/scss/**"],
errors: {
sass: "errors/scss",
images: "errors/images",
includePaths: ["errors/scss", "assets/bower_components/modularized-normalize-scss"],
},
sass: {
sass: "assets/scss",
images: "assets/images",
Expand Down Expand Up @@ -48,6 +54,20 @@ gulp.task("stylesheet", ["sprite"], function() {
.pipe(gulp.dest("dist/css"));
});

gulp.task("errors", function() {
return gulp.src(paths.stylesheet)
.pipe($.sass({
sass: paths.errors.sass,
imagePath: paths.errors.images,
includePaths: paths.errors.includePaths
}))
.pipe($.autoprefixer(["last 1 version", "> 1%", "ff >= 20", "ie >= 8", "opera >= 12", "Android >= 2.2"], { cascade: true }))
.pipe(gulp.dest("errors/css"))
.pipe($.rename({ suffix: ".min" })) // génère une version minimifié
.pipe($.minifyCss())
.pipe(gulp.dest("errors/css"));
});

gulp.task("sprite", function() {
var sprite = gulp.src(paths.sprite)
.pipe(spritesmith({
Expand Down Expand Up @@ -116,6 +136,7 @@ gulp.task("watch", function(cb) {
gulp.watch(paths.smiley, ["smileys"]);
gulp.watch(paths.images, ["images"]);
gulp.watch(paths.scss, ["stylesheet"]);
gulp.watch(paths.errors_scss, ["errors"]);
gulp.watch(paths.sprite, ["sprite", "stylesheet"]);

gulp.watch("dist/*/**", function(file) {
Expand Down
Empty file added errors/500.html
Empty file.
Loading

0 comments on commit 618cb67

Please sign in to comment.