Commit 40f71ab19b2723762bf7ceb4eef3d130c8a32fea
1 parent
344a37ad
Utilisation de Sass et de Gulp
Trust me, I'm an engineer
Showing
6 changed files
with
87 additions
and
2 deletions
Show diff stats
.gitignore
... | ... | @@ -0,0 +1,39 @@ |
1 | +var gulp = require('gulp'); | |
2 | +// var source = require('vinyl-source-stream'); | |
3 | +// var buffer = require('vinyl-buffer'); | |
4 | +var gutil = require('gulp-util'); | |
5 | +// var uglify = require('gulp-uglify'); | |
6 | +// var sourcemaps = require('gulp-sourcemaps'); | |
7 | +// var reactify = require('reactify'); | |
8 | +var sass = require('gulp-sass'); | |
9 | +// var fs = require('fs-extra'); | |
10 | +var exec = require('child_process').exec; | |
11 | +var path = require('path'); | |
12 | +// var install = require("gulp-install"); | |
13 | + | |
14 | +gulp.task('style', function() { | |
15 | + gulp.src('./scss/style.scss') | |
16 | + .pipe(sass().on('error', sass.logError)) | |
17 | + .pipe(gulp.dest('./css'));; | |
18 | +}); | |
19 | + | |
20 | +gulp.task('style:watch', function() { | |
21 | + gulp.watch('./scss/style.scss', ['style']); | |
22 | +}); | |
23 | + | |
24 | +gulp.task('clean', function() { | |
25 | + fs.removeSync(__dirname+'/bower_components'); | |
26 | + fs.removeSync(__dirname+'/lib'); | |
27 | +}); | |
28 | + | |
29 | +gulp.task('install', function() { | |
30 | + // gulp.src(['./bower.json', './package.json']) // FIXME Doesn't work | |
31 | + // .pipe(install()); | |
32 | +}); | |
33 | + | |
34 | +gulp.task('bootstrap', ['install', 'style']); | |
35 | + | |
36 | +gulp.task('watch', ['bootstrap', 'style:watch']); | |
37 | + | |
38 | +gulp.task('default', ['watch']); | |
39 | + | ... | ... |
index.html
... | ... | @@ -7,8 +7,6 @@ |
7 | 7 | <title>10⁵</title> |
8 | 8 | |
9 | 9 | <!-- CSS --> |
10 | - <link href="lib/material-design-icons/iconfont/material-icons.css" rel="stylesheet"> | |
11 | - <link href="lib/Materialize/dist/css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection" /> | |
12 | 10 | <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection" /> |
13 | 11 | </head> |
14 | 12 | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +{ | |
2 | + "name": "10p5-server", | |
3 | + "version": "0.0.0", | |
4 | + "description": "Client web pour le système de paiment de 10⁵", | |
5 | + "main": "gulpfile.js", | |
6 | + "scripts": { | |
7 | + "test": "echo \"Error: no test specified\" && exit 1" | |
8 | + }, | |
9 | + "repository": { | |
10 | + "type": "git", | |
11 | + "url": "git+https://github.com/GeoffreyFrogeye/10p5-server.git" | |
12 | + }, | |
13 | + "author": "Le Club Info Polytech Lille <Club.Informatique@polytech-lille.fr>", | |
14 | + "license": "UNLICENSED", | |
15 | + "bugs": { | |
16 | + "url": "https://github.com/GeoffreyFrogeye/10p5-server/issues" | |
17 | + }, | |
18 | + "homepage": "https://github.com/GeoffreyFrogeye/10p5-server#readme", | |
19 | + "devDependencies": { | |
20 | + "gulp": "^3.9.1", | |
21 | + "gulp-sass": "^2.3.1" | |
22 | + } | |
23 | +} | ... | ... |
css/style.css renamed to scss/style.scss
1 | +@charset "UTF-8"; | |
2 | + | |
3 | +// Importation des Mixins de Materialize | |
4 | +@import "../lib/Materialize/sass/components/mixins"; | |
5 | +@import "../lib/Materialize/sass/components/color"; | |
6 | + | |
7 | +// Définition de la couleur principale de Materialize | |
8 | +$primary-color: color("red", "lighten-2") !default; | |
9 | +$primary-color-light: lighten($primary-color, 15%) !default; | |
10 | +$primary-color-dark: darken($primary-color, 15%) !default; | |
11 | + | |
12 | +$secondary-color: color("indigo", "lighten-1") !default; | |
13 | +$success-color: color("green", "base") !default; | |
14 | +$error-color: color("pink", "base") !default; | |
15 | +$link-color: color("blue", "darken-1") !default; | |
16 | + | |
17 | +// Import du reste de Materialize | |
18 | +@import "../lib/Materialize/sass/materialize.scss"; | |
19 | + | |
20 | +// Import des icônes Material Design | |
21 | +@import "../lib/material-design-icons/iconfont/material-icons.css"; | |
22 | + | |
1 | 23 | body { |
2 | 24 | display: flex; |
3 | 25 | min-height: 100vh; | ... | ... |