Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / ibrik / gulpfile.coffee
1 # -*- coding: utf-8 -*-
2 #  Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>
3 #
4 #  Redistribution and use in source and binary forms, with or without
5 #  modification, are permitted provided that the following conditions are met:
6 #
7 #    * Redistributions of source code must retain the above copyright
8 #      notice, this list of conditions and the following disclaimer.
9 #    * Redistributions in binary form must reproduce the above copyright
10 #      notice, this list of conditions and the following disclaimer in the
11 #      documentation and/or other materials provided with the distribution.
12 #
13 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14 #  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 #  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 #  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
17 #  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18 #  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 #  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20 #  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 #  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24 gulp   = require 'gulp'
25 coffee = require 'gulp-coffee'
26 mocha  = require 'gulp-mocha'
27 require 'coffee-script/register'
28
29 SOURCE = [
30     'src/*.coffee'
31 ]
32
33 DEST = 'lib'
34
35 TEST = [
36     'test/*.coffee'
37 ]
38
39 gulp.task 'build', ->
40     gulp.src(SOURCE)
41     .pipe coffee(
42         header: yes
43     )
44     .pipe gulp.dest(DEST)
45
46 gulp.task 'watch', [ 'build' ], ->
47     gulp.watch SOURCE, [ 'build' ]
48
49 gulp.task 'default', [ 'build' ]
50
51 gulp.task 'test', ->
52     gulp.src(TEST)
53     .pipe(mocha(
54         reporter: 'spec',
55         timeout: 100000
56     ))
57
58 # vim: set sw=4 ts=4 et tw=80 :