Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: gulpfile.js

Issue 29361647: Issue 4607 - Default content styles (Closed)
Patch Set: Added container & simplified html/scss Created Nov. 10, 2016, 1:22 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*!
2 * This file is part of universal-design-language
3 * Copyright (C) 2016 Eyeo GmbH
4 *
5 * universal-design-language is free software: you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * universal-design-language is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with web.starter-kit. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 const gulp = require("gulp");
20 const sass = require("gulp-sass");
21 const stylelint = require("gulp-stylelint");
22 const htmlhint = require("gulp-htmlhint");
23 const connect = require("gulp-connect");
24 const sourcemaps = require("gulp-sourcemaps");
25
26 gulp.task("connect", function()
27 {
28 connect.server({
29 root: ".",
30 livereload: true
31 });
32 });
33
34 gulp.task("lint:css", function()
35 {
36 return gulp.src("scss/*.scss")
37 .pipe(stylelint({
38 reporters: [
39 {formatter: "string", console: true}
40 ]
41 }));
42 });
43
44 gulp.task("lint:html", function()
45 {
46 return gulp.src("html/*.html")
47 .pipe(htmlhint());
48 });
49
50 gulp.task("html", function()
51 {
52 gulp.src("html/*.html")
53 .pipe(connect.reload());
54 });
55
56 gulp.task("scss", function ()
57 {
58 return gulp.src("./scss/main.scss")
59 .pipe(sourcemaps.init())
60 .pipe(sass().on("error", sass.logError))
61 .pipe(sourcemaps.write("./"))
62 .pipe(gulp.dest("./css/"))
63 .pipe(connect.reload());
64 });
65
66 gulp.task("watch", function ()
67 {
68 gulp.watch("html/*.html", ["lint:html", "html"]);
69 gulp.watch("scss/*.scss", ["lint:css", "scss"]);
70 });
71
72 gulp.task("lint", ["lint:html", "lint:css"]);
73
74 gulp.task("default", ["lint", "scss", "connect", "watch"]);
OLDNEW

Powered by Google App Engine
This is Rietveld