Skip to content

Commit

Permalink
Use google-closure-library package
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Oct 12, 2017
1 parent e52d751 commit fa8e3e5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ NGEO_EXAMPLES_PARTIALS_FILES := $(shell ls -1 examples/partials/*.html)
GMF_EXAMPLES_PARTIALS_FILES := $(shell ls -1 contribs/gmf/examples/partials/*.html)

OS := $(shell uname)
CLOSURE_LIBRARY_PATH = $(shell node -e 'process.stdout.write(require("@camptocamp/closure-util").getLibraryPath())' 2> /dev/null)

EXAMPLES_HTML_FILES := $(shell find examples -maxdepth 1 -type f -name '*.html')
EXAMPLES_JS_FILES := $(EXAMPLES_HTML_FILES:.html=.js)
Expand Down Expand Up @@ -47,7 +46,7 @@ GMF_APPS_LIBS_JS_FILES += \
node_modules/jsts/dist/jsts.min.js \
node_modules/moment/moment.js \
third-party/jquery-ui/jquery-ui.js \
$(CLOSURE_LIBRARY_PATH)/closure/goog/transpile.js
node_modules/google-closure-library/closure/goog/transpile.js
else
GMF_APPS_LIBS_JS_FILES += \
examples/https.js \
Expand Down Expand Up @@ -481,11 +480,9 @@ dist/gmf.js.map: dist/gmf.js
mkdir -p $(dir $@)
cp $< $@

$(CLOSURE_LIBRARY_PATH)/closure/goog/transpile.js: .build/node_modules.timestamp

.build/examples-hosted/lib/transpile.js: $(CLOSURE_LIBRARY_PATH)/closure/goog/transpile.js
.build/examples-hosted/lib/transpile.js: node_modules/google-closure-library/closure/goog/transpile.js
mkdir -p $(dir $@)
cp $(CLOSURE_LIBRARY_PATH)/closure/goog/transpile.js $@
cp $< $@

.PRECIOUS: .build/examples-hosted/fonts/%
.build/examples-hosted/fonts/%: node_modules/font-awesome/fonts/%
Expand Down
6 changes: 1 addition & 5 deletions Makefile_windows
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ GMF_DIRECTIVES_PARTIALS_FILES := $(shell ls -1 contribs/gmf/src/directives/parti
NGEO_EXAMPLES_PARTIALS_FILES := $(shell ls -1 examples/partials/*.html)
GMF_EXAMPLES_PARTIALS_FILES := $(shell ls -1 contribs/gmf/examples/partials/*.html)

CLOSURE_LIBRARY_PATH = $(shell node -e 'process.stdout.write(require("@camptocamp/closure-util").getLibraryPath())' 2> /dev/null)

EXAMPLES_HTML_FILES := $(shell find examples -maxdepth 1 -type f -name '*.html')
EXAMPLES_JS_FILES := $(EXAMPLES_HTML_FILES:.html=.js)

Expand Down Expand Up @@ -58,7 +56,7 @@ GMF_APPS_LIBS_JS_FILES += \
node_modules/corejs-typeahead/dist/typeahead.bundle.js \
node_modules/jsts/dist/jsts.min.js \
third-party/jquery-ui/jquery-ui.js \
$(CLOSURE_LIBRARY_PATH)/closure/goog/transpile.js
node_modules/google-closure-library/closure/goog/transpile.js
else
GMF_APPS_LIBS_JS_FILES += \
examples/https.js \
Expand Down Expand Up @@ -219,8 +217,6 @@ serve: .build/node_modules.timestamp $(JQUERY_UI) $(FONTAWESOME_WEBFONT) $(ANGUL
node buildtools/build.js $< $@
echo '//# sourceMappingURL=$*.js.map' >> $@

$(CLOSURE_LIBRARY_PATH)/closure/goog/transpile.js: .build/node_modules.timestamp

node_modules/angular/angular.min.js: .build/node_modules.timestamp

.build/node_modules.timestamp: package.json
Expand Down
2 changes: 1 addition & 1 deletion karma-conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var isDebug = process.argv.some(function(argument) {
});

module.exports = function(config) {
var closureLibPath = 'node_modules/@camptocamp/closure-util/.deps/library/**/';
var closureLibPath = 'node_modules/google-closure-library/';
var olSrcPath = 'node_modules/openlayers/src/';
var olExtPath = 'node_modules/openlayers/build/ol.ext/';

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"font-awesome": "4.7.0",
"fs-extra": "4.0.2",
"gaze": "1.1.2",
"google-closure-library": "20170910.0.0",
"jasmine-core": "2.8.0",
"jquery": "3.2.1",
"jsdoc": "3.5.5",
Expand Down

0 comments on commit fa8e3e5

Please sign in to comment.