Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use webpack to bundle js, css and html templates
This commit includes webpack.dev config and some initial but untested config for prodution. It builds hslayers.js bundle in dist folder, which will be included in npm package. All the html templates are now packaged in this bundle with ng-cache-loader. refs #203
- Loading branch information
Showing
60 changed files
with
10,852 additions
and
999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
'use strict'; | ||
|
||
define(['angular', 'ol', 'toolbar', 'layermanager', 'sidebar', 'map', 'ows', 'query', 'search', 'print', 'permalink', 'measure', 'legend', 'bootstrap.bundle', 'geolocation', 'core', 'datasource_selector', 'api', 'angular-gettext', 'translations', 'compositions', 'status_creator', 'info'], | ||
|
||
function(angular, ol, toolbar, layermanager) { | ||
var module = angular.module('hs', [ | ||
'hs.sidebar', | ||
'hs.toolbar', | ||
'hs.layermanager', | ||
'hs.map', | ||
'hs.query', | ||
'hs.search', 'hs.print', 'hs.permalink', 'hs.measure', | ||
'hs.legend', 'hs.geolocation', 'hs.core', | ||
'hs.datasource_selector', | ||
'hs.status_creator', | ||
'hs.api', | ||
'hs.ows', | ||
'gettext', | ||
'hs.compositions', | ||
'hs.info' | ||
]); | ||
|
||
module.directive('hs', ['config', 'Core', function(config, Core) { | ||
return { | ||
template: require('hslayers.html'), | ||
link: function(scope, element, attrs) { | ||
Core.fullScreenMap(element); | ||
} | ||
}; | ||
}]); | ||
|
||
if(window.hslayersNgConfig) module.value('config', Object.assign({}, window.hslayersNgConfig(ol))); | ||
|
||
module.controller('Main', ['$scope', 'Core', 'hs.ows.wms.service_layer_producer', 'hs.compositions.service_parser', 'config', | ||
function($scope, Core, srv_producer, composition_parser, config) { | ||
$scope.hsl_path = config.hsl_path; //Get this from hslayers.js file | ||
$scope.Core = Core; | ||
Core.sidebarRight = false; | ||
Core.singleDatasources = true; | ||
} | ||
]); | ||
|
||
return module; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.