Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update build script: remove optimized js from source tree; add a new …

…build folder that contains the tempalte;
  • Loading branch information...
commit 418dece3ced2399cca4fa77dc8a0999fa6e87ad2 1 parent 9b123f7
Clément Vollet authored
View
3  .gitignore
@@ -2,4 +2,5 @@
node_modules
tasks/node_modules
*.sublime-project
-*.sublime-workspace
+*.sublime-workspace
+build
View
7 app/app.desktop.ios.optimized.js
0 additions, 7 deletions not shown
View
7 app/app.phone.android.optimized.js
0 additions, 7 deletions not shown
View
7 app/app.phone.ios.optimized.js
0 additions, 7 deletions not shown
View
7 app/app.tablet.android.optimized.js
0 additions, 7 deletions not shown
View
7 app/app.tablet.ios.optimized.js
0 additions, 7 deletions not shown
View
9 app/app.tv.samsung.samsungtv.optimized.js
0 additions, 9 deletions not shown
View
9 app/app.tv.tv.optimized.js
0 additions, 9 deletions not shown
View
36 build.sh
@@ -1,5 +1,6 @@
-# Optimize versions
cd app/
+
+# Optimize versions
node joshfire-framework/scripts/optimize.js ios app.phone
node joshfire-framework/scripts/optimize.js android app.phone
node joshfire-framework/scripts/optimize.js tv app.tv
@@ -8,24 +9,39 @@ node joshfire-framework/scripts/optimize.js ios app.tablet
node joshfire-framework/scripts/optimize.js android app.tablet
node joshfire-framework/scripts/optimize.js ios app.desktop
-# Pack Samsung Version
cd ..
+
+# Build folder
+rm -fr build
+mkdir -p build/app/
+
+echo "Moving files around..."
+
+# Copy resources to the build folder
+cp -r app/{index.*.optimized.html,css,images,ui,vendor,lang} build/app/
+cp app/todate.js build/app/
+cp app/prettystatus.js build/app/
+# cp config.xml build/config.xml
+cp package.json build/
+
+# Move optimized js files
+mv app/app.*.optimized.js build/app/
@steren
steren added a note

The factory uses these optimized files, they should not be removed for the moment.
I fixed it in commit e400f56 by using a cp.

I agree that ordinary, we shouldn't version the optimized files, except for factory templates.

Later we will use two branches : master (for the factory, with optimized files) and dev, to work on, without optimized files.

@dieppe
dieppe added a note

Right. I was thinking of doing both (fix build script and add a dev branch) at the same time, and well, didn't. Sorry for the mixup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+# Pack Samsung Version
mkdir samsung_export
-cp -r app/css samsung_export
-cp -r app/images samsung_export/
-cp -r app/ui samsung_export/
-cp -r app/vendor samsung_export/
-cp -r app/lang samsung_export/
-cp app/index.samsung.optimized.html samsung_export/index.html
-cp app/app.tv.samsung.samsungtv.optimized.js samsung_export/
+cp -r build/app/{css,images,ui,vendor,lang} samsung_export
+cp build/app/index.samsung.optimized.html samsung_export/index.html
+cp build/app/app.tv.samsung.samsungtv.optimized.js samsung_export/
cp app/todate.js samsung_export/
cp app/prettystatus.js samsung_export/
cp config.xml samsung_export/config.xml
rm tasks/server/public/sleek.zip
out="../tasks/server/public/sleek.zip"
cd samsung_export
+
+echo "Archiving samsung_export..."
zip -r $out ./*
cd ..
rm -rf samsung_export
-echo "Finished at $(date +"%T")"
+echo "Finished at $(date +"%T")"
Please sign in to comment.
Something went wrong with that request. Please try again.