blob: 09e7a6da5473966719e6e0e5c779b9f9b9a102a2 (
plain)
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
|
#!/bin/sed -f
#
# SED script for parsing out include file names from
# the application.js file.
#
# Remove single line comments first
/^\s+\/\//d
# Remove multi-line comments
/^\s+\/\*.+/d
/\/\*/,/\*\// {
s/.*//g
}
# Replace the require lines with just their contents
s/this\.require\(["']([^"']*)["']\);/\1/
# Remove all lines that don't end in js
# assumes we are getting all of our JS files
/js$/!d
# Remove the spaces before and after the filename
# assumes there are no spaces in the filename iteself
s/\s*//
|