1 var gulp
= require('gulp')
2 , pkg
= require('./package.json')
3 , gutil
= require('gulp-util')
4 , gkarma
= require('gulp-karma')
5 , sass
= require('gulp-sass')
6 , concat
= require('gulp-concat')
7 , uglify
= require('gulp-uglify')
8 , clean
= require('gulp-clean')
9 , header
= require('gulp-header')
16 ' * @version v<%= pkg.version %>',
22 LIB
: 'bower_components/d3/*.min.js',
23 NS
: 'src/namespaces.js',
24 SOURCE
: 'src/**/*.js',
25 SPEC
: 'test/**/*-spec.js',
26 STYLESHEETS
: 'src/stylesheets/**/*.scss'
29 gulp
.task('sass', function () {
30 gulp
.src(files
.STYLESHEETS
)
32 .pipe(gulp
.dest('./dist/'));
35 gulp
.task('concat', function () {
36 gulp
.src([files
.NS
, files
.SOURCE
])
37 .pipe(concat('tech-radar.js'))
38 .pipe(header(banner
, { pkg
: pkg
}))
39 .pipe(gulp
.dest('./dist/'));
41 var clean
= require('gulp-clean');
43 gulp
.task('clean', function() {
44 gulp
.src('./dist/', {read
: false})
45 .pipe(clean({force
: true}));
48 gulp
.task('compress', function() {
49 gulp
.src([files
.NS
, files
.SOURCE
])
50 .pipe(concat('tech-radar.min.js'))
51 .pipe(uglify({outSourceMap
: true}))
52 .pipe(header(banner
, { pkg
: pkg
}))
53 .pipe(gulp
.dest('./dist/'))
56 gulp
.task('dist', ['clean', 'concat', 'compress', 'sass']);
58 gulp
.task('test', function (){
62 configFile
: 'karma.conf.js',
67 [files
.LIB
, files
.NS
, files
.SOURCE
, files
.SPEC
]