Skip to content
Browse files

Refactored the 'create-html5-app-layout' and 'create-html5-subapp-lay…

…out' tasks and created new 'prepare-html5-boilerplate-app', 'prepare-html5-boilerplate-subapp', 'prepare-1140-css-grid-app', and 'prepare-1140-css-grid-subapp' helper tasks as a result.
  • Loading branch information...
1 parent eeea181 commit a228a61d02ca2a3896ef966e87b7315f7192ae30 @mr-rock mr-rock committed May 28, 2012
Showing with 40 additions and 28 deletions.
  1. +40 −28 Makefile
View
68 Makefile
@@ -1118,48 +1118,24 @@ create-coffeescript-app:
@echo $(TESTSUBAPP_CS) > $(TESTING_DIRECTORY)/$(APPS_DIRECTORY)/$(NAME_CAMELIZED)/app-test.coffee
create-html5-app-layout:
- @make download-1140-css-grid
- @git clone https://github.com/h5bp/html5-boilerplate.git $(TEMPORARY_HTML5_DIRECTORY)
@mkdir -p $(VIEWS_DIRECTORY)
@mkdir -p $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)
@mkdir -p $(PUBLIC_DIRECTORY)/$(IMAGES_DIRECTORY)
@mkdir -p $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)
- @mv $(TEMPORARY_HTML5_DIRECTORY)/*.txt $(PUBLIC_DIRECTORY)
- @mv $(TEMPORARY_HTML5_DIRECTORY)/*.png $(PUBLIC_DIRECTORY)
- @mv $(TEMPORARY_HTML5_DIRECTORY)/*.ico $(PUBLIC_DIRECTORY)
- @mv $(TEMPORARY_HTML5_DIRECTORY)/$(STYLES_DIRECTORY)/*.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)
- @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/1140.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)
- @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/ie.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)
- @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/styles.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)/app.css
- @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/main.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)
- @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/plugins.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)
- @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/jquery-*.min.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)/jquery.js
- @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/modernizr-*.min.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)/modernizr.js
- @mv $(TEMPORARY_1140_DIRECTORY)/$(SCRIPTS_DIRECTORY)/*.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)/css3-queries.js
+ @make prepare-html5-boilerplate-app
+ @make prepare-1140-css-grid-app
@rm -rf $(TEMPORARY_DIRECTORY)
@echo "APP_LAYOUT = HTML5" >> .lemmy/setup
create-html5-subapp-layout:
@if [ -d "./$(APPS_DIRECTORY)/$(APP_CAMELIZED)" ]; \
then \
- make download-1140-css-grid; \
- git clone https://github.com/h5bp/html5-boilerplate.git $(TEMPORARY_HTML5_DIRECTORY); \
mkdir -p $(VIEWS_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED); \
mkdir -p $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY); \
mkdir -p $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(IMAGES_DIRECTORY); \
mkdir -p $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY); \
- mv $(TEMPORARY_HTML5_DIRECTORY)/*.txt $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/; \
- mv $(TEMPORARY_HTML5_DIRECTORY)/*.png $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/; \
- mv $(TEMPORARY_HTML5_DIRECTORY)/*.ico $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/; \
- mv $(TEMPORARY_HTML5_DIRECTORY)/$(STYLES_DIRECTORY)/*.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY); \
- mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/1140.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY); \
- mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/ie.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY); \
- mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/styles.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY)/app.css; \
- mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/main.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY); \
- mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/plugins.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY); \
- mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/jquery-*.min.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)/jquery.js; \
- mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/modernizr-*.min.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)/modernizr.js; \
- mv $(TEMPORARY_1140_DIRECTORY)/$(SCRIPTS_DIRECTORY)/*.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)/css3-queries.js; \
+ make prepare-html5-boilerplate-subapp; \
+ make prepare-1140-css-grid-subapp; \
rm -rf $(TEMPORARY_DIRECTORY); \
echo "$(APP_UPPERCASED)_LAYOUT = HTML5" >> .lemmy/setup; \
else \
@@ -1172,6 +1148,42 @@ download-1140-css-grid:
@unzip 1140_CssGrid_2.zip -d $(TEMPORARY_1140_DIRECTORY)
@rm 1140_CssGrid_2.zip
+prepare-html5-boilerplate-app:
+ @git clone https://github.com/h5bp/html5-boilerplate.git $(TEMPORARY_HTML5_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/*.txt $(PUBLIC_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/*.png $(PUBLIC_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/*.ico $(PUBLIC_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(STYLES_DIRECTORY)/*.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/main.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/plugins.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/jquery-*.min.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)/jquery.js
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/modernizr-*.min.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)/modernizr.js
+
+prepare-html5-boilerplate-subapp:
+ @git clone https://github.com/h5bp/html5-boilerplate.git $(TEMPORARY_HTML5_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/*.txt $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/*.png $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/*.ico $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(STYLES_DIRECTORY)/*.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/main.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/plugins.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/jquery-*.min.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)/jquery.js
+ @mv $(TEMPORARY_HTML5_DIRECTORY)/$(SCRIPTS_DIRECTORY)/vendor/modernizr-*.min.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)/modernizr.js
+
+prepare-1140-css-grid-app:
+ @make download-1140-css-grid
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/1140.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/ie.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/styles.css $(PUBLIC_DIRECTORY)/$(STYLES_DIRECTORY)/app.css
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(SCRIPTS_DIRECTORY)/*.js $(PUBLIC_DIRECTORY)/$(SCRIPTS_DIRECTORY)/css3-queries.js
+
+prepare-1140-css-grid-subapp:
+ @make download-1140-css-grid
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/1140.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY)
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/ie.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY)
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(STYLES_DIRECTORY)/styles.css $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(STYLES_DIRECTORY)/app.css
+ @mv $(TEMPORARY_1140_DIRECTORY)/$(SCRIPTS_DIRECTORY)/*.js $(PUBLIC_DIRECTORY)/$(APPS_DIRECTORY)/$(APP_CAMELIZED)/$(SCRIPTS_DIRECTORY)/css3-queries.js
+
move-files-to-deployment-folder:
@mkdir $(DEPLOYMENT_DIRECTORY)
@cp $(APP_FILE) $(DEPLOYMENT_DIRECTORY)

0 comments on commit a228a61

Please sign in to comment.
Something went wrong with that request. Please try again.