Commit f144b0af authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Skip the Copyright text replacement.

This comment will be removed anyway in the final compressed app.js.
parent 2f4ed3b6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -206,13 +206,11 @@ task :compress do
  system("sencha", "create", "jsb", "-a", "#{OUT_DIR}/index.html", "-p", "#{OUT_DIR}/app.jsb3")
  # Concatenate files listed in JSB3 file
  system("sencha", "build", "-p", "#{OUT_DIR}/app.jsb3", "-d", OUT_DIR)
  # Replace Copyright information in compressed file, writing new version to original app.js
  copy = 'Generated by JSDuck: https:\/\/github.com\/senchalabs\/jsduck'
  system("sed 's/^Copyright.*Company Name$/#{copy}/' #{OUT_DIR}/app-all.js > #{OUT_DIR}/app.js")
  # Remove intermediate build files
  system("rm", "#{OUT_DIR}/app.jsb3")
  system("rm", "#{OUT_DIR}/all-classes.js")
  system("rm", "#{OUT_DIR}/app-all.js")
  # Replace app.js with app-all.js
  system("mv", "#{OUT_DIR}/app-all.js", "#{OUT_DIR}/app.js")
  # Remove the entire app/ dir
  system("rm", "-r", "#{OUT_DIR}/app")