diff --git a/gulpfile.js b/gulpfile.js index 2da8d6c3..35e6886d 100644 --- a/gulpfile.js +++ b/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); }); diff --git a/src/material-design-lite-grid.scss b/src/material-design-lite-grid.scss new file mode 100644 index 00000000..060dad26 --- /dev/null +++ b/src/material-design-lite-grid.scss @@ -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"; \ No newline at end of file