Permalink
Browse files

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

…build folder that contains the tempalte;
  • Loading branch information...
1 parent 9b123f7 commit 418dece3ced2399cca4fa77dc8a0999fa6e87ad2 Clément Vollet committed Feb 20, 2013
View
@@ -2,4 +2,5 @@
node_modules
tasks/node_modules
*.sublime-project
-*.sublime-workspace
+*.sublime-workspace
+build
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
View
@@ -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 Feb 22, 2013 Contributor

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 Feb 25, 2013 Contributor

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.

+
+# 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")"

0 comments on commit 418dece

Please sign in to comment.