Add support for grid-specific builds
parent
9dd6177d03
commit
57fa9c7d8f
24
gulpfile.js
24
gulpfile.js
|
@ -160,6 +160,28 @@ gulp.task('styles', ['styletemplates'], function () {
|
|||
.pipe($.size({title: 'styles'}));
|
||||
});
|
||||
|
||||
|
||||
// Only generate CSS styles for the MDL grid
|
||||
gulp.task('styles-grid', function () {
|
||||
return gulp.src(['src/material-design-lite-grid.scss'])
|
||||
.pipe($.sass({
|
||||
precision: 10,
|
||||
onError: console.error.bind(console, 'Sass error:')
|
||||
}))
|
||||
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
|
||||
.pipe(gulp.dest('.tmp'))
|
||||
// Concatenate Styles
|
||||
.pipe($.concat('material-grid.css'))
|
||||
.pipe($.header(banner, {pkg: pkg}))
|
||||
.pipe(gulp.dest('./dist'))
|
||||
// Minify Styles
|
||||
.pipe($.if('*.css', $.csso()))
|
||||
.pipe($.concat('material-grid.min.css'))
|
||||
.pipe($.header(banner, {pkg: pkg}))
|
||||
.pipe(gulp.dest('./dist'))
|
||||
.pipe($.size({title: 'styles-grid'}));
|
||||
});
|
||||
|
||||
// Concatenate And Minify JavaScript
|
||||
gulp.task('scripts', function () {
|
||||
var sources = [
|
||||
|
@ -210,7 +232,7 @@ gulp.task('default', ['clean', 'mocha'], function (cb) {
|
|||
runSequence(
|
||||
'styles',
|
||||
['jshint', 'jscs', 'scripts', 'styles', 'assets', 'pages', 'demos', 'templates',
|
||||
'images'],
|
||||
'images', 'styles-grid'],
|
||||
cb);
|
||||
});
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* Material Design Lite Grid*/
|
||||
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
@import "grid/grid";
|
Loading…
Reference in New Issue