Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add a dependency-writer script (build/deps.js)

  • Loading branch information...
commit 6553ccd1f87820d381e73496d9d153c4794f4e94 1 parent ebe46c3
@jankuca authored
Showing with 37 additions and 0 deletions.
  1. +34 −0 build/deps.sh
  2. +3 −0  build/vars.sh
View
34 build/deps.sh
@@ -0,0 +1,34 @@
+
+# Closure-Boilerplate Dependency-Writer Script
+# --
+# @autor Jan Kuča
+
+
+
+# The $1 argument is the project root path (defaults to ".")
+# Note: The provided Sublime Text build command automatically passes
+# the $project_path variable to this script.
+PROJECT_DIR_RELATIVE=$1
+[ -z $1 ] && PROJECT_DIR_RELATIVE="."
+
+source $PROJECT_DIR_RELATIVE/build/vars.sh
+
+
+
+# Make sure the target directory exists
+echo "-- Make sure the target directory exists"
+echo -n "$TARGET_DIR: "
+mkdir -p $TARGET_DIR && echo "ok"
+echo ""
+
+
+echo "-- Create the dependency information file"
+echo $DEPS_FILE
+$CLOSURE_LIBRARY_DIR/closure/bin/build/depswriter.py \
+ --root_with_prefix="public/app ../../../app" \
+> $DEPS_FILE \
+|| exit 1
+echo ""
+
+
+echo "== Successfully created =="
View
3  build/vars.sh
@@ -26,6 +26,9 @@ TARGET_FILE=app.min.js
# Relative to $TARGET_DIR
SOURCE_MAP_FILE=source-map.json
+# The dependency file path
+DEPS_FILE=$TARGET_DIR/deps.js
+
# The file (created by the script) including JS references from HTML files
HTML_JS_FILE=$PUBLIC_DIR/app/js/html-references.temp.js
Please sign in to comment.
Something went wrong with that request. Please try again.