summaryrefslogtreecommitdiff
path: root/build_system/get_jsfiles.sed
diff options
context:
space:
mode:
authorMike Crute <mcrute@gmail.com>2010-01-17 12:06:15 -0500
committerMike Crute <mcrute@gmail.com>2010-01-17 12:06:15 -0500
commit55974d21a824378b287e563bce4c32597060cfca (patch)
treeff8426efe10ff98189fee26583f061fb08f19a50 /build_system/get_jsfiles.sed
downloadsantoprene_designer_site-55974d21a824378b287e563bce4c32597060cfca.tar.bz2
santoprene_designer_site-55974d21a824378b287e563bce4c32597060cfca.tar.xz
santoprene_designer_site-55974d21a824378b287e563bce4c32597060cfca.zip
Initial importHEADmaster
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*//