-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
47 lines (41 loc) · 1.62 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
var gulp = require('gulp');
var sass = require('gulp-sass');
var spritesmith = require('gulp.spritesmith');
var debug = require('gulp-debug');
// Tasks
gulp.task('sass', function () {
return gulp.src('resources/assets/css-preprocessors/scss/nifty.scss')
.pipe(debug({title: 'unicorn sass:'}))
.pipe(sass())
.pipe(gulp.dest('public/css'))
});
gulp.task('sprite', function () {
var spriteData = gulp.src('resources/assets/images/ffbe/global_units/*.png')
.pipe(debug({title: 'unicorn sprite:'}))
.pipe(spritesmith({
/* this whole image path is used in css background declarations */
imgName: '/../img/global_units.png',
cssName: 'global_units.css',
cssVarMap : function (sprite) {
sprite.name = sprite.name.replace(/ /g, '_');
}
}));
//spriteData.img.pipe(gulp.dest('public/img'));
spriteData.css.pipe(gulp.dest('public/css'));
});
gulp.task('sprite2', function () {
var spriteData = gulp.src('resources/assets/images/ffbe/global_units/*.png')
.pipe(debug({title: 'unicorn sprite:'}))
.pipe(spritesmith({
/* this whole image path is used in css background declarations */
imgName: 'global_units.png',
cssName: 'global_units.css',
cssVarMap : function (sprite) {
sprite.name = sprite.name.replace(/ /g, '_');
}
}));
spriteData.img.pipe(gulp.dest('public/img/'));
//spriteData.css.pipe(gulp.dest('public/css'));
});
// Gulp requires a default task to be present
gulp.task('default');