This repository has been archived by the owner on Jul 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-ngmodules.coffee
67 lines (50 loc) · 1.62 KB
/
gulp-ngmodules.coffee
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
yargs = require('yargs')
through = require 'through2'
gulp = require 'gulp'
gutil = require 'gulp-util'
fs = require 'fs'
_ = require 'lodash'
_str = require 'underscore.string'
path = require 'path'
clean = require 'gulp-clean'
coffee = require 'gulp-coffee'
concat = require 'gulp-concat'
wrap = require 'gulp-wrap'
jade = require 'gulp-jade'
template = require 'gulp-template'
rename = require 'gulp-rename'
conflict = require 'gulp-conflict'
ngtpl = require 'gulp-angular-templatecache'
NGModule = require './ngmodule'
module.exports = ngmodules = ->
console.log 'args', arguments
# console.log new NGModule path: './ng-modules/ui/src'
###*
* @todo check if isDir
* @todo inspect cli arg module glob
###
return through.obj (dir, enc, cb)->
# filesToCreate.forEach (file)->
# gulp.src file.template
# .pipe template(file.templateData)
# .pipe rename file.dest
# # conflict
# .pipe gulp.dest module.path
# create a stream for each new file
# result = _.transform args.argv, (result, arg, index)->
# result[index] = arg
# return result
# coffee = ->
# gulp.src __dirname + '/templates/controller.coffee'
# .pipe template(name:'bar')
# .pipe rename target
# # conflict
# .pipe gulp.dest module.path
# coffee()
# js = gutil.combine(
# coffee( bare: true ),
# concat( module.ngModuleName + '.js' )
# )
# _.forEach file, (value, key)->
# console.log key, ' : ', value
cb()