-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathcore-modules.coffee
More file actions
38 lines (34 loc) · 885 Bytes
/
Copy pathcore-modules.coffee
File metadata and controls
38 lines (34 loc) · 885 Bytes
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
path = require 'path'
{sync: resolve} = require 'resolve'
CJS_DIR = path.join __dirname, '..'
CORE_MODULES =
buffer: resolve 'buffer-browserify'
constants: resolve 'constants-browserify'
crypto: resolve 'crypto-browserify'
events: resolve 'events-browserify'
http: resolve 'http-browserify'
punycode: resolve './node_modules/punycode', basedir: CJS_DIR
querystring: resolve './node_modules/querystring', basedir: CJS_DIR
vm: resolve 'vm-browserify'
zlib: resolve 'zlib-browserify'
NODE_CORE_MODULES = [
'_stream_duplex'
'_stream_passthrough'
'_stream_readable'
'_stream_transform'
'_stream_writable'
'assert'
'console'
'domain'
'freelist'
'path'
'readline'
'stream'
'string_decoder'
'sys'
'url'
'util'
]
for mod in NODE_CORE_MODULES
CORE_MODULES[mod] = path.join CJS_DIR, 'node', 'lib', "#{mod}.js"
module.exports = CORE_MODULES