summaryrefslogtreecommitdiff
path: root/build_system/get_jsfiles.sed
diff options
context:
space:
mode:
Diffstat (limited to 'build_system/get_jsfiles.sed')
-rwxr-xr-xbuild_system/get_jsfiles.sed25
1 files changed, 25 insertions, 0 deletions
diff --git a/build_system/get_jsfiles.sed b/build_system/get_jsfiles.sed
new file mode 100755
index 0000000..09e7a6d
--- /dev/null
+++ b/build_system/get_jsfiles.sed
@@ -0,0 +1,25 @@
1#!/bin/sed -f
2#
3# SED script for parsing out include file names from
4# the application.js file.
5#
6
7# Remove single line comments first
8/^\s+\/\//d
9
10# Remove multi-line comments
11/^\s+\/\*.+/d
12/\/\*/,/\*\// {
13 s/.*//g
14}
15
16# Replace the require lines with just their contents
17s/this\.require\(["']([^"']*)["']\);/\1/
18
19# Remove all lines that don't end in js
20# assumes we are getting all of our JS files
21/js$/!d
22
23# Remove the spaces before and after the filename
24# assumes there are no spaces in the filename iteself
25s/\s*//