mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
96f0b5fbd6
We don't have any tests in this repository
35 lines
817 B
CoffeeScript
35 lines
817 B
CoffeeScript
path = require('path')
|
|
gulp = require('gulp')
|
|
coffee = require('gulp-coffee')
|
|
coffeelint = require('gulp-coffeelint')
|
|
shell = require('gulp-shell')
|
|
packageJSON = require('./package.json')
|
|
|
|
OPTIONS =
|
|
config:
|
|
coffeelint: path.join(__dirname, 'coffeelint.json')
|
|
files:
|
|
coffee: [ 'lib/**/*.coffee', 'gulpfile.coffee' ]
|
|
app: [ 'lib/**/*.coffee', '!lib/**/*.spec.coffee' ]
|
|
directories:
|
|
build: 'build/'
|
|
|
|
gulp.task 'coffee', [ 'lint' ], ->
|
|
gulp.src(OPTIONS.files.app)
|
|
.pipe(coffee())
|
|
.pipe(gulp.dest(OPTIONS.directories.build))
|
|
|
|
gulp.task 'lint', ->
|
|
gulp.src(OPTIONS.files.coffee)
|
|
.pipe(coffeelint({
|
|
optFile: OPTIONS.config.coffeelint
|
|
}))
|
|
.pipe(coffeelint.reporter())
|
|
|
|
gulp.task 'build', [
|
|
'coffee'
|
|
]
|
|
|
|
gulp.task 'watch', [ 'lint', 'coffee' ], ->
|
|
gulp.watch([ OPTIONS.files.coffee ], [ 'coffee' ])
|