Commit a9296562 authored by Alexey Golubev's avatar Alexey Golubev

Make build by the component

parent 16f16f86
...@@ -6,19 +6,27 @@ OUTPUT = $(OUTPUT_DIR) ...@@ -6,19 +6,27 @@ OUTPUT = $(OUTPUT_DIR)
WEBAPPS_DIR = web-apps WEBAPPS_DIR = web-apps
WEBAPPS = $(OUTPUT)/$(WEBAPPS_DIR) WEBAPPS = $(OUTPUT)/$(WEBAPPS_DIR)
GRUNT_FILES = build/Gruntfile.js.out ../web-apps/build/Gruntfile.js.out NODE_MODULES = build/node_modules ../web-apps/build/node_modules
WEBAPPS_FILES = ../web-apps/deploy/web-apps/apps/documenteditor/main/app.js ../web-apps/deploy/web-apps/apps/presentationeditor/main/app.js ../web-apps/deploy/web-apps/apps/spreadsheeteditor/main/app.js
SDKJS_FILES = word/sdk-all.js cell/sdk-all.js slide/sdk-all.js
all: $(WEBAPPS) all: $(WEBAPPS)
$(WEBAPPS): $(GRUNT_FILES) $(WEBAPPS): $(WEBAPPS_FILES)
mkdir -p $(OUTPUT)/$(WEBAPPS_DIR) && \ mkdir -p $(OUTPUT)/$(WEBAPPS_DIR) && \
cp -r -t $(OUTPUT)/$(WEBAPPS_DIR) ../$(WEBAPPS_DIR)/deploy/** cp -r -t $(OUTPUT)/$(WEBAPPS_DIR) ../$(WEBAPPS_DIR)/deploy/**
$(GRUNT_FILES): $(WEBAPPS_FILES): $(NODE_MODULES) $(SDKJS_FILES)
cd ../$(WEBAPPS_DIR)/build && \
$(GRUNT) deploy-$(filter %editor,$(subst /, ,$(@D))) $(GRUNT_FLAGS)
$(NODE_MODULES):
cd $(@D) && \ cd $(@D) && \
npm install && \ npm install
$(GRUNT) $(GRUNT_FLAGS)
echo "Done" > $@ $(SDKJS_FILES): $(NODE_MODULES)
cd build && \
$(GRUNT) build_$(@D) $(GRUNT_FLAGS)
clean: clean:
rm -f $(GRUNT_FILES) rm -f $(WEBAPPS_FILES) $(SDKJS_FILES)
...@@ -84,11 +84,11 @@ module.exports = function(grunt) { ...@@ -84,11 +84,11 @@ module.exports = function(grunt) {
} }
}); });
grunt.registerTask('build_webword', ['build_webword_init', 'build_sdk']); grunt.registerTask('build_word', ['build_webword_init', 'build_sdk']);
grunt.registerTask('build_webexcel', ['build_webexcel_init', 'build_sdk']); grunt.registerTask('build_cell', ['build_webexcel_init', 'build_sdk']);
grunt.registerTask('build_webpowerpoint', ['build_webpowerpoint_init', 'build_sdk']); grunt.registerTask('build_slide', ['build_webpowerpoint_init', 'build_sdk']);
grunt.registerTask('build_all', ['build_webword_init', 'build_sdk', 'build_webexcel_init', 'build_sdk', 'build_webpowerpoint_init', 'build_sdk']); grunt.registerTask('build_all', ['build_word', 'build_cell', 'build_slide']);
grunt.registerTask('concat_sdk_init', function() { grunt.registerTask('concat_sdk_init', function() {
var sdkDstFolder = packageFile['compile']['sdk']['dst']; var sdkDstFolder = packageFile['compile']['sdk']['dst'];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment