Skip to content

Commit c41652f

Browse files
author
caoxinke
committed
2 parents 7ace511 + 49c2788 commit c41652f

File tree

4 files changed

+42
-38
lines changed

4 files changed

+42
-38
lines changed

karma.conf.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ module.exports = function (config) {
1111

1212
// frameworks to use
1313
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
14-
frameworks: ['jasmine', 'commonjs'],
15-
14+
frameworks: ['jasmine', 'browserify'],
15+
browserify: {
16+
debug: true
17+
},
1618
// list of files patterns to load in the browser
1719
// include:false表示不包含这些文件到浏览器中,注意添加顺序
1820
files: [
@@ -111,12 +113,12 @@ module.exports = function (config) {
111113
// preprocess matching files before serving them to the browser
112114
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
113115
preprocessors: {
114-
'src/legacy/libs/SuperMap_Basic-8.1.1-14426.js': ['commonjs'],
115-
'./node_modules/whatwg-fetch/fetch.js': ['commonjs'],
116-
'./node_modules/fetch-jsonp/build/fetch-jsonp.js': ['commonjs'],
117-
'src/legacy/libs/Lang/*.js': ['commonjs'],
118-
'src/common/**/*.js': ['commonjs', 'coverage'],
119-
'test/common/**/*Spec.js': ['commonjs']
116+
'src/legacy/libs/SuperMap_Basic-8.1.1-14426.js': ['browserify'],
117+
'./node_modules/whatwg-fetch/fetch.js': ['browserify'],
118+
'./node_modules/fetch-jsonp/build/fetch-jsonp.js': ['browserify'],
119+
'src/legacy/libs/Lang/*.js': ['browserify'],
120+
'src/common/**/*.js': ['browserify', 'coverage'],
121+
'test/common/**/*Spec.js': ['browserify']
120122
},
121123

122124
// test results reporter to use

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,29 @@
2525
"author": "SuperMap",
2626
"license": "Apache-2.0",
2727
"devDependencies": {
28-
"openlayers": "4.0.0",
29-
"leaflet": "1.0.3",
28+
"browserify": "^14.3.0",
3029
"commander": "2.9.0",
3130
"commonjs": "0.0.1",
31+
"css-loader": "^0.26.1",
32+
"extract-text-webpack-plugin": "^1.0.1",
33+
"file-loader": "^0.10.0",
34+
"imports-loader": "^0.7.0",
3235
"jasmine-core": "^2.5.2",
3336
"karma": "^1.4.1",
37+
"karma-browserify": "^5.1.1",
3438
"karma-chrome-launcher": "^2.0.0",
3539
"karma-cli": "^1.0.1",
3640
"karma-commonjs": "^1.0.0",
3741
"karma-coverage": "^1.1.1",
3842
"karma-jasmine": "^1.1.0",
3943
"karma-teamcity-reporter": "^1.0.0",
44+
"leaflet": "1.0.3",
45+
"openlayers": "4.0.0",
4046
"shelljs": "0.7.6",
41-
"underscore": "^1.8.3",
42-
"webpack": "^1.14.0",
43-
"extract-text-webpack-plugin": "^1.0.1",
44-
"file-loader": "^0.10.0",
4547
"style-loader": "^0.13.1",
46-
"css-loader": "^0.26.1",
47-
"imports-loader": "^0.7.0"
48+
"underscore": "^1.8.3",
49+
"watchify": "^3.9.0",
50+
"webpack": "^1.14.0"
4851
},
4952
"dependencies": {
5053
"proj4": "^2.4.3",

src/common/util/Request.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
require("whatwg-fetch/fetch");
2-
var fetchJsonp = require('fetch-jsonp/build/fetch-jsonp');
1+
require("whatwg-fetch");
2+
var fetchJsonp = require('fetch-jsonp');
33

44
SuperMap.Support = {
55
cors: ((window.XMLHttpRequest && 'withCredentials' in new window.XMLHttpRequest()))

test/tool/GlobeParameter.js

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
//CI测试机的IP为:localhost
2-
GlobeParameter = {
3-
rootURL: "http://localhost:8090/iserver/services",
4-
mapServiceURL: "http://localhost:8090/iserver/services/map-world/rest/maps/",
5-
worldMapURL: "http://localhost:8090/iserver/services/map-world/rest/maps/世界地图",
6-
networkAnalystURL: "http://localhost:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun",
7-
spatialAnalystURL: "http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst",
8-
spatialAnalystURL_Changchun:"http://localhost:8090/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst",
9-
dataServiceURL: "http://localhost:8090/iserver/services/data-world/rest/data",
10-
editServiceURL: "http://localhost:8090/iserver/services/data-jingjin/rest/data/datasources/name/Jingjin/datasets/name/Landuse_R",
11-
trafficTransferURL: "http://localhost:8090/iserver/services/traffictransferanalyst-sample/restjsr/traffictransferanalyst/Traffic-Changchun",
12-
vectorURL: "http://localhost:8090/iserver/services/map-world/rest/maps/World/",
13-
gridURL:"http://localhost:8090/iserver/services/map-jingjin/rest/maps/京津地区土地利用现状图",
14-
imageURL: "http://localhost:8090/iserver/services/map-world/rest/maps/世界地图_Day",
15-
WorldURL: "http://localhost:8090/iserver/services/map-world/rest/maps/World",
16-
ChinaURL:"http://localhost:8090/iserver/services/map-china400/rest/maps/China",
17-
WMTSURL:"http://localhost:8090/iserver/services/map-world/wmts100",
18-
WCSURL: "http://localhost:8090/iserver/services/data-world/wcs111",
19-
plotUrl: "http://localhost:8090/iserver/services/plot-jingyong/rest/plot",
20-
tileSetsURL: "http://localhost:8090/iserver/services/map-ChinaProvinces/rest/maps/ChinaProvinces"
1+
GlobeParameter = {
2+
rootURL: "http://192.168.112.222:8090/iserver/services",
3+
mapServiceURL: "http://192.168.112.222:8090/iserver/services/map-world/rest/maps/",
4+
worldMapURL: "http://192.168.112.222:8090/iserver/services/map-world/rest/maps/世界地图",
5+
networkAnalystURL: "http://192.168.112.222:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun",
6+
spatialAnalystURL: "http://192.168.112.222:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst",
7+
spatialAnalystURL_Changchun:"http://192.168.112.222:8090/iserver/services/spatialanalyst-changchun/restjsr/spatialanalyst",
8+
dataServiceURL: "http://192.168.112.222:8090/iserver/services/data-world/rest/data",
9+
editServiceURL: "http://192.168.112.222:8090/iserver/services/data-jingjin/rest/data/datasources/name/Jingjin/datasets/name/Landuse_R",
10+
trafficTransferURL: "http://192.168.112.222:8090/iserver/services/traffictransferanalyst-sample/restjsr/traffictransferanalyst/Traffic-Changchun",
11+
vectorURL: "http://192.168.112.222:8090/iserver/services/map-world/rest/maps/World/",
12+
gridURL:"http://192.168.112.222:8090/iserver/services/map-jingjin/rest/maps/京津地区土地利用现状图",
13+
imageURL: "http://192.168.112.222:8090/iserver/services/map-world/rest/maps/世界地图_Day",
14+
WorldURL: "http://192.168.112.222:8090/iserver/services/map-world/rest/maps/World",
15+
ChinaURL:"http://192.168.112.222:8090/iserver/services/map-china400/rest/maps/China",
16+
WMTSURL:"http://192.168.112.222:8090/iserver/services/map-world/wmts100",
17+
WCSURL: "http://192.168.112.222:8090/iserver/services/data-world/wcs111",
18+
plotUrl: "http://192.168.112.222:8090/iserver/services/plot-jingyong/rest/plot",
19+
tileSetsURL: "http://192.168.112.222:8090/iserver/services/map-ChinaProvinces/rest/maps/ChinaProvinces"
2120
};

0 commit comments

Comments
 (0)