Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update closure-util to the latest version #2974

Merged
merged 2 commits into from
Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 7 additions & 10 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("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 Expand Up @@ -849,20 +846,20 @@ $(EXTERNS_JQUERY): github_versions

.build/ol-deps.js: .build/python-venv .build/node_modules.timestamp
.build/python-venv/bin/python buildtools/closure/depswriter.py \
--root_with_prefix="node_modules/openlayers/src ../../../../../../openlayers/src" \
--root_with_prefix="node_modules/openlayers/build/ol.ext ../../../../../../openlayers/build/ol.ext" \
--root_with_prefix="node_modules/openlayers/src ../../../openlayers/src" \
--root_with_prefix="node_modules/openlayers/build/ol.ext ../../../openlayers/build/ol.ext" \
--output_file=$@

.build/ngeo-deps.js: .build/python-venv .build/node_modules.timestamp
.build/python-venv/bin/python buildtools/closure/depswriter.py \
--root_with_prefix="src ../../../../../../../src" --output_file=$@
--root_with_prefix="src ../../../../src" --output_file=$@

.build/gmf-deps.js: .build/python-venv \
.build/node_modules.timestamp \
$(SRC_JS_FILES) \
$(GMF_SRC_JS_FILES)
.build/python-venv/bin/python buildtools/closure/depswriter.py \
--root_with_prefix="contribs/gmf/src ../../../../../../../contribs/gmf/src" --output_file=$@
--root_with_prefix="contribs/gmf/src ../../../../contribs/gmf/src" --output_file=$@

# The keys in the template cache begin with "../src/directives/partials". This
# is done so ngeo.js works for the examples on github.io. If another key
Expand Down
14 changes: 5 additions & 9 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("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 Expand Up @@ -327,20 +323,20 @@ $(EXTERNS_JQUERY): github_versions

.build/ol-deps.js: .build/python-venv .build/node_modules.timestamp
.build/python-venv/Scripts/python buildtools/closure/depswriter.py \
--root_with_prefix="node_modules/openlayers/src ../../../../../../openlayers/src" \
--root_with_prefix="node_modules/openlayers/build/ol.ext ../../../../../../openlayers/build/ol.ext" \
--root_with_prefix="node_modules/openlayers/src ../../../openlayers/src" \
--root_with_prefix="node_modules/openlayers/build/ol.ext ../../../openlayers/build/ol.ext" \
--output_file=$@

.build/ngeo-deps.js: .build/python-venv .build/node_modules.timestamp
.build/python-venv/Scripts/python buildtools/closure/depswriter.py \
--root_with_prefix="src ../../../../../../../src" --output_file=$@
--root_with_prefix="src ../../../../src" --output_file=$@

.build/gmf-deps.js: .build/python-venv \
.build/node_modules.timestamp \
$(SRC_JS_FILES) \
$(GMF_SRC_JS_FILES)
.build/python-venv/Scripts/python buildtools/closure/depswriter.py \
--root_with_prefix="contribs/gmf/src ../../../../../../../contribs/gmf/src" --output_file=$@
--root_with_prefix="contribs/gmf/src ../../../../contribs/gmf/src" --output_file=$@

# The keys in the template cache begin with "../src/directives/partials". This
# is done so ngeo.js works for the examples on github.io. If another key
Expand Down
2 changes: 1 addition & 1 deletion buildtools/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
let path = require('path');

let async = require('async');
let closure = require('closure-util');
let closure = require('@camptocamp/closure-util');
let fs = require('fs-extra');
let nomnom = require('nomnom');
let temp = require('temp').track();
Expand Down
2 changes: 1 addition & 1 deletion buildtools/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
let path = require('path');
let url = require('url');

let closure = require('closure-util');
let closure = require('@camptocamp/closure-util');
let nomnom = require('nomnom');
let gaze = require('gaze');
let exec = require('child_process').exec;
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/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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"ngeo-build": "buildtools/build.js"
},
"devDependencies": {
"@camptocamp/closure-util": "1.24.0",
"angular": "1.6.6",
"angular-animate": "1.6.6",
"angular-dynamic-locale": "0.1.32",
Expand All @@ -33,7 +34,6 @@
"async": "2.5.0",
"bootstrap": "3.3.7",
"clean-css-cli": "4.1.10",
"closure-util": "camptocamp/closure-util#487fac6",
"console-control-strings": "1.1.0",
"corejs-typeahead": "1.2.1",
"coveralls": "3.0.0",
Expand All @@ -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