Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test.html
.sass-cache/
node_modules/
23 changes: 21 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
{
"name": "toast-css",
"name": "toast-grid",
"version": "1.0.0",
"main": [
"scss/_grid.scss"
],
"license": "MIT",
"homepage": "http://daneden.github.io/Toast"
"homepage": "http://daneden.github.io/Toast",
"authors": [
"Daniel Eden <dan.eden@me.com>"
],
"description": "The Toast framework is a grid. That's it. Set any number of columns, any gutter size you want, and whatever classes you need.",
"moduleType": [],
"keywords": [
"grid",
"toast",
"sass",
"scss",
"css"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
3 changes: 1 addition & 2 deletions css/grid.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions css/grid.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions css/grid.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions css/grid.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 83 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*===================================================================================================================
* Here, the script need *nodeJS* and *gulp* to run.
*
* This script is for building Toast library. Then following operations can be done:
* watching partials sources to biuld the library depending of changes.
* compiling considered partials sources.
* autoprefixe and generate sourcemap when needed.
* minifications.
*===================================================================================================================
* @license MIT
*/


if (process.versions.node <= '0.12.0') {

console.warn('iui-gulp: recommand node version 0.12.x or later ') ;
require('es6-promise').polyfill() ;
}

var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
sourcemaps = require('gulp-sourcemaps'),
ignore = require('gulp-ignore'),
rename = require('gulp-rename') ,
notify = require("gulp-notify"),

notifier = require('node-notifier') ;

var paths = {
sassAll: 'scss/**/*.scss' ,
sassMain: 'scss/grid.scss' ,
sass: './scss' ,
dest: 'css'
};


gulp.task('sass', function() {
// compile and minify all target sass files.
// with sourcemaps all the way down
gulp.src( paths.sass+"/_grid.scss")
.pipe( sourcemaps.init())
.pipe( rename("grid.scss"))
.pipe( sass( {style: 'expanded'} ))
.pipe( autoprefixer('last 5 Chrome versions',
'last 5 Firefox versions',
'last 2 Safari versions',
'ie >= 8',
'iOS >= 7',
'Android >= 4.2'))
.pipe( sourcemaps.write( ".", {includeContent: false})) //@TODO make source files from sourcemaps to be load by browsers (see `sourceRoot` property)
.pipe( gulp.dest( paths.dest))
.pipe( ignore.exclude('*.map'))
.pipe( rename({suffix: '.min'}))
.pipe( cssnano())
.pipe( sourcemaps.write( "."))
.pipe( gulp.dest(paths.dest))
.pipe( notify({ onLast: true, title: 'toast-sass:', message: 'css generation\'s / minification\'s task complete!' }));

//del( [paths.sassMain]) ;
});

// library's builder task
gulp.task('build', ['sass'] );

// Return the task when a file changes
gulp.task('watch', function() {

gulp.watch( paths.sassAll, ['sass']) ;

notifier.notify({ title: 'toast-watcher:', message: 'source files are being watched!' }) ;
});

// The default task (called when you run `gulp` from cli)
gulp.task('default', ['watch'], function() {

console.log('.....\n toast-dev: available task:') ;
console.log('watch [default] - (watch source files and automate building)') ;
console.log('sass - (generate and minify css from sass\'s files)') ;
console.log('build - (build the project)') ;
console.log('.....') ;
});