Skip to content

Commit

Permalink
Tranform to ES6 modules
Browse files Browse the repository at this point in the history
./node_modules/.bin/jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js --legacy true jsapi/src/
./node_modules/.bin/jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js --legacy true geoportailv3/static/js/
  • Loading branch information
gberaudo committed May 8, 2019
1 parent 40041e4 commit 82d0235
Show file tree
Hide file tree
Showing 140 changed files with 1,799 additions and 1,384 deletions.
12 changes: 8 additions & 4 deletions geoportailv3/static/js/Activetool.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/**
* @module app.Activetool
*/
/**
* @fileoverview This file provides an Angular service to share which tool is
* active.
*/
goog.module('app.Activetool');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
import appModule from './module.js';

/**
* @param {app.draw.SelectedFeatures} appSelectedFeatures Selected features service.
* @constructor
* @ngInject
*/
exports = function(appSelectedFeatures) {
const exports = function(appSelectedFeatures) {

/**
* @type {ol.Collection<ol.Feature>}
Expand Down Expand Up @@ -46,3 +47,6 @@ exports.prototype.isActive = function() {
};

appModule.service('appActivetool', exports);


export default exports;
19 changes: 12 additions & 7 deletions geoportailv3/static/js/CoordinateStringService.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
/**
* @module app.CoordinateStringService
*/
let exports = {};

/**
* @fileoverview Provides a coordinate string output service, useful for
* correctly formatted coordinate strings in different projections.
*/

goog.module('app.CoordinateStringService');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
const olCoordinate = goog.require('ol.coordinate');
const olProj = goog.require('ol.proj');
const olString = goog.require('ol.string');
import appModule from './module.js';
import olCoordinate from 'ol/coordinate.js';
import olProj from 'ol/proj.js';
import olString from 'ol/string.js';


/**
Expand Down Expand Up @@ -136,3 +138,6 @@ function service() {


appModule.service('appCoordinateString', service);


export default exports;
27 changes: 15 additions & 12 deletions geoportailv3/static/js/ExclusionManager.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* @module app.ExclusionManager
*/
/**
* @fileoverview This file defines the Exclusion service. This service manages
* the exclusion between layers.
*/
goog.module('app.ExclusionManager');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
const appNotifyNotificationType = goog.require('app.NotifyNotificationType');
const olBase = goog.require('ol');
const olObservable = goog.require('ol.Observable');
const olObject = goog.require('ol.Object');
const olEvents = goog.require('ol.events');
const olLayerProperty = goog.require('ol.layer.Property');
const olCollectionEventType = goog.require('ol.CollectionEventType');

import appModule from './module.js';
import appNotifyNotificationType from './NotifyNotificationType.js';
import olBase from 'ol.js';
import olObservable from 'ol/Observable.js';
import olObject from 'ol/Object.js';
import olEvents from 'ol/events.js';
import olLayerProperty from 'ol/layer/Property.js';
import olCollectionEventType from 'ol/CollectionEventType.js';

/**
* @param {angularGettext.Catalog} gettextCatalog Gettext catalog.
Expand All @@ -24,7 +24,7 @@ const olCollectionEventType = goog.require('ol.CollectionEventType');
* @constructor
* @ngInject
*/
exports = function(gettextCatalog, ngeoBackgroundLayerMgr,
const exports = function(gettextCatalog, ngeoBackgroundLayerMgr,
appBlankLayer, appNotify) {

/**
Expand Down Expand Up @@ -193,3 +193,6 @@ exports.prototype.init = function(map) {
};

appModule.service('appExclusionManager', exports);


export default exports;
25 changes: 14 additions & 11 deletions geoportailv3/static/js/Export.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
/**
* @module app.Export
*/
/**
* @fileoverview This file provides an Angular service for interacting
* with the "export" web service.
*/
goog.module('app.Export');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
const olGeomGeometryType = goog.require('ol.geom.GeometryType');
const appMiscFile = goog.require('app.misc.file');
const olFormatGPX = goog.require('ol.format.GPX');
const olFormatGeoJSON = goog.require('ol.format.GeoJSON');
const olFormatKML = goog.require('ol.format.KML');
const olGeomMultiLineString = goog.require('ol.geom.MultiLineString');

import appModule from './module.js';
import olGeomGeometryType from 'ol/geom/GeometryType.js';
import appMiscFile from './misc/file.js';
import olFormatGPX from 'ol/format/GPX.js';
import olFormatGeoJSON from 'ol/format/GeoJSON.js';
import olFormatKML from 'ol/format/KML.js';
import olGeomMultiLineString from 'ol/geom/MultiLineString.js';

/**
* @constructor
* @param {Document} $document Document.
* @param {string} exportgpxkmlUrl URL to echo web service.
* @ngInject
*/
exports = function($document, exportgpxkmlUrl) {
const exports = function($document, exportgpxkmlUrl) {

/**
* @type {ol.Map}
Expand Down Expand Up @@ -296,3 +296,6 @@ exports.prototype.exportFeatures_ =
};

appModule.service('appExport', exports);


export default exports;
15 changes: 9 additions & 6 deletions geoportailv3/static/js/Geocoding.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* @module app.Geocoding
*/
/**
* @fileoverview This file provides an Angular service for interacting
* with the "geocoding" web service.
*/
goog.module('app.Geocoding');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
const olProj = goog.require('ol.proj');

import appModule from './module.js';
import olProj from 'ol/proj.js';

/**
* @constructor
Expand All @@ -16,7 +16,7 @@ const olProj = goog.require('ol.proj');
* @param {string} geocodingServiceUrl The url of the service.
* @ngInject
*/
exports = function($http, reverseGeocodingServiceUrl, geocodingServiceUrl) {
const exports = function($http, reverseGeocodingServiceUrl, geocodingServiceUrl) {
/**
* @type {angular.$http}
* @private
Expand Down Expand Up @@ -84,3 +84,6 @@ exports.prototype.geocode = function(address) {


appModule.service('appGeocoding', exports);


export default exports;
13 changes: 8 additions & 5 deletions geoportailv3/static/js/GetDevice.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* @module app.GetDevice
*/
/**
* @fileoverview This file provides an Angular service for interacting
* with the "elevation" web service.
*/
goog.module('app.GetDevice');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');

import appModule from './module.js';

/**
* @constructor
Expand All @@ -15,7 +15,7 @@ const appModule = goog.require('app.module');
* @private
* @ngInject
*/
exports = function($document, $window) {
const exports = function($document, $window) {
/**
* @type {Document}
* @private
Expand Down Expand Up @@ -71,3 +71,6 @@ exports.prototype.isHiDpi = function() {
};

appModule.service('appGetDevice', exports);


export default exports;
14 changes: 10 additions & 4 deletions geoportailv3/static/js/GetElevationService.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
/**
* @module app.GetElevationService
*/
let exports = {};

/**
* @fileoverview This file provides an Angular service for interacting
* with the "elevation" web service.
*/
goog.module('app.GetElevationService');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
const olProj = goog.require('ol.proj');
import appModule from './module.js';
import olProj from 'ol/proj.js';


/**
Expand Down Expand Up @@ -51,3 +54,6 @@ function service($http, gettextCatalog, elevationServiceUrl) {


appModule.service('appGetElevation', service);


export default exports;
12 changes: 9 additions & 3 deletions geoportailv3/static/js/GetLayerForCatalogNodeFactory.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/**
* @module app.GetLayerForCatalogNodeFactory
*/
let exports = {};

/**
* @fileoverview This file defines Angular services to use to get OpenLayers
* layers for the application.
*/
goog.module('app.GetLayerForCatalogNodeFactory');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
import appModule from './module.js';


/**
Expand Down Expand Up @@ -76,3 +79,6 @@ function factory(appGetWmtsLayer, appGetWmsLayer,


appModule.factory('appGetLayerForCatalogNode', factory);


export default exports;
13 changes: 9 additions & 4 deletions geoportailv3/static/js/GetProfileService.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/**
* @module app.GetProfileService
*/
let exports = {};

/**
* @fileoverview This file provides an Angular service for interacting
* with the "profile" web service.
*/
goog.module('app.GetProfileService');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
const olFormatGeoJSON = goog.require('ol.format.GeoJSON');
import appModule from './module.js';
import olFormatGeoJSON from 'ol/format/GeoJSON.js';


/**
Expand Down Expand Up @@ -74,3 +76,6 @@ function service($http, profileServiceUrl) {
}

appModule.service('appGetProfile', service);


export default exports;
12 changes: 9 additions & 3 deletions geoportailv3/static/js/GetShorturlService.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/**
* @module app.GetShorturlService
*/
let exports = {};

/**
* @fileoverview This file provides an Angular service for interacting
* with the "shorturl" web service.
*/
goog.module('app.GetShorturlService');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
import appModule from './module.js';


/**
Expand Down Expand Up @@ -48,3 +51,6 @@ function service($http, ngeoLocation, shorturlServiceUrl) {


appModule.service('appGetShorturl', service);


export default exports;
20 changes: 13 additions & 7 deletions geoportailv3/static/js/GetWmsLayerFactory.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
/**
* @module app.GetWmsLayerFactory
*/
let exports = {};

/**
* @fileoverview This file defines Angular services to use to get OpenLayers
* layers for the application.
*/
goog.module('app.GetWmsLayerFactory');

goog.module.declareLegacyNamespace();
const appModule = goog.require('app.module');
const appOlcsExtent = goog.require('app.olcs.Extent');
const ngeoMiscDecorate = goog.require('ngeo.misc.decorate');
const olLayerImage = goog.require('ol.layer.Image');
const olSourceImageWMS = goog.require('ol.source.ImageWMS');
import appModule from './module.js';
import appOlcsExtent from './olcs/Extent.js';
import ngeoMiscDecorate from 'ngeo/misc/decorate.js';
import olLayerImage from 'ol/layer/Image.js';
import olSourceImageWMS from 'ol/source/ImageWMS.js';


/**
Expand Down Expand Up @@ -62,3 +65,6 @@ function factory(proxyWmsUrl, remoteProxyWms,


appModule.factory('appGetWmsLayer', factory);


export default exports;
Loading

0 comments on commit 82d0235

Please sign in to comment.