diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/generate-dependencies | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/generate-dependencies b/bin/generate-dependencies new file mode 100755 index 0000000..937412e --- /dev/null +++ b/bin/generate-dependencies | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/bash | ||
2 | { | ||
3 | path="${2%/*}" | ||
4 | echo -n "$1: $2 " | ||
5 | deps=`grep import "$2" | grep -Po "['\"]\./.*?['\"]" | sed 's/.\(.*\)./\1/'` | ||
6 | for dep in $deps; do | ||
7 | echo -n "$path/$dep.js " | ||
8 | done | ||
9 | echo -n ' | ||
10 | |||
11 | ' | ||
12 | } > "$3" | ||