mirror of
https://github.com/namibia/file-icon-vectors.git
synced 2025-01-24 12:58:29 +00:00
Adding package.json, gulpfile.js
This commit is contained in:
parent
048ac5b893
commit
6cc914f120
48
gulpfile.js
Normal file
48
gulpfile.js
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Gulpfile for File Icon Vectors
|
||||
*
|
||||
* @author Daniel M. Hendricks
|
||||
* @license MIT
|
||||
* {@link https://github.com/dmhendricks/file-icon-vectors GitHub repo}
|
||||
*/
|
||||
|
||||
var pkg = require( './package.json' );
|
||||
var gulp = require( 'gulp' );
|
||||
var rename = require( 'gulp-rename' );
|
||||
var minifycss = require( 'gulp-uglifycss' );
|
||||
var svgmin = require( 'gulp-svgmin' );
|
||||
var sass = require( 'gulp-sass' );
|
||||
var autoprefixer = require( 'gulp-autoprefixer' );
|
||||
var lineec = require( 'gulp-line-ending-corrector' );
|
||||
var filter = require( 'gulp-filter' );
|
||||
var notify = require( 'gulp-notify' );
|
||||
|
||||
const AUTOPREFIXER_BROWSERS = [ 'last 2 version', '> 1%', 'ie >= 9', 'ie_mob >= 10', 'ff >= 30', 'chrome >= 34', 'safari >= 7', 'opera >= 23', 'ios >= 7', 'android >= 4', 'bb >= 10' ];
|
||||
|
||||
gulp.task( 'sassTask', function () {
|
||||
gulp.src( [ './src/scss/file-icon-classic.scss', './src/scss/file-icon-vivid.scss' ] )
|
||||
.pipe( sass( {
|
||||
outputStyle: 'expanded' } ) )
|
||||
.on( 'error', console.error.bind( console ) )
|
||||
.pipe( autoprefixer ( AUTOPREFIXER_BROWSERS ) )
|
||||
.pipe( lineec() )
|
||||
.pipe( gulp.dest( './dist') )
|
||||
.pipe( filter( '**/*.css' ) )
|
||||
.pipe( rename( { suffix: '.min' } ) )
|
||||
.pipe( minifycss() )
|
||||
.pipe( lineec() )
|
||||
.pipe( gulp.dest( './dist' ) )
|
||||
.pipe( notify( { message: 'TASK: "sassTask" completed.', onLast: true } ) );
|
||||
});
|
||||
|
||||
gulp.task('default', [ 'sassTask' ], function(){
|
||||
var icon_libs = [ './dist/icons/classic', './dist/icons/vivid' ];
|
||||
|
||||
gulp.watch( './src/scss/*.scss', [ 'sassTask' ] );
|
||||
|
||||
icon_libs.forEach( function( lib ) {
|
||||
console.log(lib);
|
||||
gulp.src( lib + '/*.svg' ).pipe( svgmin() ).pipe( gulp.dest( lib ) );
|
||||
});
|
||||
|
||||
});
|
27
package.json
Normal file
27
package.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "file-icon-vectors",
|
||||
"author": "Daniel M. Hendricks",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"file",
|
||||
"icons",
|
||||
"vectors",
|
||||
"svg",
|
||||
"css"
|
||||
],
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-svgmin": "^1.2",
|
||||
"gulp-sass": "^3.1",
|
||||
"gulp-autoprefixer": "^4.1",
|
||||
"gulp-filter": "^5.1.0",
|
||||
"gulp-line-ending-corrector": "^1.0.2",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-uglifycss": "^1.0.9",
|
||||
"gulp-notify": "^3.2"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/dmhendricks/file-icon-vectors.git"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user