-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.coffee
executable file
·72 lines (55 loc) · 1.5 KB
/
config.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
68
69
70
71
72
exports.config = config =
# See http://brunch.readthedocs.org/en/latest/config.html for documentation.
serverUrl: "https://logroll.in"
environment: ""
modules:
wrapper: false
definition: false
paths:
watched: ['src', 'test']
public: 'build'
files:
javascripts:
joinTo:
'LogAndRollSDK.js': (path) ->
env = config.environment
if env is "browser"
return /^src/.test(path) and path.indexOf("/Node/") == -1
if env is "node"
return /^src/.test(path) and path.indexOf("/Browser/") == -1
'test.js': /^test/
order:
before: [
'src/Header.coffee'
'src/BaseEngine.coffee'
/ˆLibraries/
'src/StorageEngines/StorageEngine.coffee'
'src/SendEngines/SendEngine.coffee'
/ˆsrc\/StorageEngines/
/ˆsrc\/SendEngines/
]
after: [
'src/Main.coffee'
]
overrides:
node:
environment: "node"
plugins:
singlewrap:
wrap: (file, code) ->
return "(function(window,serverUrl){\n#{code}\n})(global,'#{config.serverUrl}');"
browser:
environment: "browser"
plugins:
singlewrap:
wrap: (file, code) ->
return "(function(window,serverUrl){\n#{code}\n})(window,'#{config.serverUrl}');"
plugins:
uglify:
mangle: yes
compress:
global_defs:
DEBUG: false
coffeescript:
bare: true
minify: true