mirror of
https://github.com/google/material-design-lite.git
synced 2024-09-11 12:25:38 +03:00
Rig up the gulpfile.
This commit is contained in:
parent
bf48c25276
commit
e2e033425e
@ -42,6 +42,7 @@
|
||||
<link rel="stylesheet" href="styles/h5bp.css">
|
||||
<link rel="stylesheet" href="styles/components/components.css">
|
||||
<link rel="stylesheet" href="styles/main.css">
|
||||
<link rel="stylesheet" href="styles/blah.css">
|
||||
<!-- endbuild -->
|
||||
</head>
|
||||
<body>
|
||||
|
3215
app/styles/components/components.css
Executable file
3215
app/styles/components/components.css
Executable file
File diff suppressed because it is too large
Load Diff
31
gulpfile.js
31
gulpfile.js
@ -21,6 +21,7 @@
|
||||
var gulp = require('gulp');
|
||||
var $ = require('gulp-load-plugins')();
|
||||
var rimraf = require('rimraf');
|
||||
var runSequence = require('run-sequence');
|
||||
var browserSync = require('browser-sync');
|
||||
var pagespeed = require('psi');
|
||||
var reload = browserSync.reload;
|
||||
@ -28,17 +29,31 @@ var reload = browserSync.reload;
|
||||
// public URL for your website
|
||||
var PUBLIC_URL = 'https://example.com';
|
||||
|
||||
gulp.task('styles', function () {
|
||||
gulp.src('app/styles/**/*.scss')
|
||||
gulp.task('styles:components', function () {
|
||||
return gulp.src('app/styles/components/components.scss')
|
||||
.pipe($.rubySass({
|
||||
style: 'expanded',
|
||||
precision: 10,
|
||||
loadPath: ['app/styles', 'app/styles/components']
|
||||
loadPath: ['app/styles/components']
|
||||
}))
|
||||
.pipe($.autoprefixer('last 1 version'))
|
||||
.pipe(gulp.dest('app/styles/components'))
|
||||
.pipe($.size({title: 'styles:scss'}));
|
||||
})
|
||||
|
||||
gulp.task('styles:scss', function () {
|
||||
return gulp.src(['app/styles/**/*.scss', '!app/styles/components/components.scss'])
|
||||
.pipe($.rubySass({
|
||||
style: 'expanded',
|
||||
precision: 10,
|
||||
loadPath: ['app/styles']
|
||||
}))
|
||||
.pipe($.autoprefixer('last 1 version'))
|
||||
.pipe(gulp.dest('.tmp/styles'))
|
||||
.pipe($.size({title: 'styles:scss'}));
|
||||
});
|
||||
|
||||
gulp.task('styles:css', function () {
|
||||
return gulp.src('app/styles/**/*.css')
|
||||
.pipe($.autoprefixer('last 1 version'))
|
||||
.pipe(gulp.dest('app/styles'))
|
||||
@ -46,6 +61,8 @@ gulp.task('styles', function () {
|
||||
.pipe($.size({title: 'styles:css'}));
|
||||
});
|
||||
|
||||
gulp.task('styles', ['styles:components', 'styles:scss', 'styles:css']);
|
||||
|
||||
gulp.task('jshint', function () {
|
||||
return gulp.src('app/scripts/**/*.js')
|
||||
.pipe($.jshint())
|
||||
@ -87,7 +104,9 @@ gulp.task('pagespeed', pagespeed.bind(null, {
|
||||
strategy: 'mobile'
|
||||
}));
|
||||
|
||||
gulp.task('clean', rimraf.bind(null, 'dist'));
|
||||
gulp.task('clean', function (cb) {
|
||||
rimraf('dist', rimraf.bind({}, '.tmp', cb));
|
||||
});
|
||||
|
||||
gulp.task('serve', function () {
|
||||
browserSync.init(null, {
|
||||
@ -104,7 +123,9 @@ gulp.task('serve', function () {
|
||||
gulp.watch(['app/images/**/*'], ['images']);
|
||||
});
|
||||
|
||||
gulp.task('build', ['jshint', 'styles', 'html', 'images']);
|
||||
gulp.task('build', function (cb) {
|
||||
runSequence('styles', ['jshint', 'html', 'images'], cb);
|
||||
});
|
||||
|
||||
gulp.task('default', ['clean'], function (cb) {
|
||||
gulp.start('build', cb);
|
||||
|
@ -10,16 +10,17 @@
|
||||
"gulp-imagemin": "^0.6.0",
|
||||
"gulp-jshint": "^1.5.3",
|
||||
"gulp-load-plugins": "^0.5.0",
|
||||
"gulp-minify-html": "^0.1.3",
|
||||
"gulp-ruby-sass": "^0.5.0",
|
||||
"gulp-size": "^0.4.0",
|
||||
"gulp-uglify": "^0.3.0",
|
||||
"gulp-useref": "^0.4.3",
|
||||
"gulp-uncss": "^0.4.4",
|
||||
"gulp-minify-html": "^0.1.3",
|
||||
"gulp-useref": "^0.4.3",
|
||||
"jshint-stylish": "^0.2.0",
|
||||
"opn": "^0.1.1",
|
||||
"psi": "0.0.3",
|
||||
"rimraf": "^2.2.8"
|
||||
"rimraf": "^2.2.8",
|
||||
"run-sequence": "^0.3.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
Loading…
Reference in New Issue
Block a user