-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathconcat-with-sourcemaps.node.txt
39 lines (32 loc) · 2.43 KB
/
concat-with-sourcemaps.node.txt
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
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ CONCAT-WITH-SOURCEMAPS ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
ALTERNATIVES ==> # - concat-with-sourcemaps (prefered):
# - can specify "file", delimiter
# - based on rather recent mozilla source-map dependency
# - not well maintained
# - combine-source-map:
# - can specify "file", "sourceRoot"
# - Small interface to convert-source-map and inline-source-map (see their doc)
# - based on old mozilla source-map dependency
# - not well maintained
# - mapcat:
# - can specify "file"
# - based on very old mozilla source-map dependency
# - not well maintained
# - source-map-concat:
# - concat to SOURCE_NODE_ARR
# - can specify "file", "sourceRoot", delimiter
# - based on old mozilla source-map dependency
# - not maintained anymore
#None on the libraries above create an "index map". Instead they create a single normal source map.
VERSION ==> #1.1.0
GOAL ==> #Concatenate files and create a related source map
#Based on mozilla source-map (see its doc)
CONCAT-WITH-SOURCEMAPS
(true, 'COMPILED_FILENAME' #'COMPILED_FILENAME' is SOURCE_MAP "file"
[, 'SEPARATOR'])->CONCAT #Def 'SEPARATOR': '' (but should use '\n')
CONCAT.add('SOURCE_PATH'|null, #Add a new section (source files + compiled file + source map)
'COMPILED_CODE'[, SOURCE_MAP]) #If no SOURCE_MAP, will offset others but not be source-mapped itself.
CONCAT.content #Concatenated 'COMPILED_CODE'
CONCAT.sourceMap #Concatenated SOURCE_MAP_STR