mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-25 18:28:33 +01:00
Fixes for breaking changes
- new webpack dev server options - babel support for async functions in hooks - new uuid import style - automatically open browser for testing
This commit is contained in:
parent
ab00c9f426
commit
d73add77e7
8 changed files with 48 additions and 51 deletions
3
.babelrc
3
.babelrc
|
@ -6,7 +6,8 @@
|
|||
"plugins": [
|
||||
"static-fs",
|
||||
"react-hot-loader/babel",
|
||||
"@babel/plugin-proposal-class-properties"
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/transform-runtime"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
|
|
|
@ -3,7 +3,6 @@ var WebpackDevServer = require("webpack-dev-server");
|
|||
var webpackConfig = require("./webpack.config");
|
||||
var testConfig = require("../test/config/specs");
|
||||
var artifacts = require("../test/artifacts");
|
||||
var isDocker = require("is-docker");
|
||||
|
||||
|
||||
var server;
|
||||
|
@ -22,6 +21,7 @@ exports.config = {
|
|||
browserName: (process.env.BROWSER || 'chrome'),
|
||||
}
|
||||
],
|
||||
services: ['selenium-standalone'],
|
||||
logLevel: 'info',
|
||||
bail: 0,
|
||||
screenshotPath: SCREENSHOT_PATH,
|
||||
|
@ -33,39 +33,14 @@ exports.config = {
|
|||
// Because we don't know how long the initial build will take...
|
||||
timeout: 4*60*1000,
|
||||
},
|
||||
onPrepare: function (config, capabilities) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var compiler = webpack(webpackConfig);
|
||||
const serverHost = "0.0.0.0";
|
||||
|
||||
server = new WebpackDevServer(compiler, {
|
||||
host: serverHost,
|
||||
disableHostCheck: true,
|
||||
stats: {
|
||||
colors: true
|
||||
}
|
||||
});
|
||||
|
||||
server.listen(testConfig.port, serverHost, function(err) {
|
||||
if(err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
})
|
||||
onPrepare: async function (config, capabilities) {
|
||||
webpackConfig.devServer.host = testConfig.testNetwork;
|
||||
webpackConfig.devServer.port = testConfig.port;
|
||||
const compiler = webpack(webpackConfig);
|
||||
server = new WebpackDevServer(webpackConfig.devServer, compiler);
|
||||
await server.start();
|
||||
},
|
||||
onComplete: function(exitCode) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
server.close(function (err) {
|
||||
if (err) {
|
||||
reject(err)
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
});
|
||||
onComplete: async function (exitCode, config, capabilities) {
|
||||
await server.stop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
"use strict";
|
||||
var webpack = require('webpack');
|
||||
var path = require('path');
|
||||
var rules = require('./webpack.rules');
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
@ -52,9 +51,10 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
},
|
||||
optimization: {
|
||||
noEmitOnErrors: true,
|
||||
},
|
||||
plugins: [
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Maputnik',
|
||||
template: './src/template.html'
|
||||
|
|
36
package-lock.json
generated
36
package-lock.json
generated
|
@ -6675,6 +6675,16 @@
|
|||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||
},
|
||||
"bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"bl": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||
|
@ -10505,6 +10515,13 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"filelist": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.2.tgz",
|
||||
|
@ -12445,12 +12462,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"is-docker": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
|
||||
"integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-dom": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-dom/-/is-dom-1.1.0.tgz",
|
||||
|
@ -14652,6 +14663,13 @@
|
|||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
||||
"dev": true
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.15.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
|
||||
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
|
||||
|
@ -20141,7 +20159,11 @@
|
|||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"nan": "^2.12.1"
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "3.1.0",
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"license": "MIT",
|
||||
"homepage": "https://github.com/maputnik/editor#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
||||
"@mapbox/mapbox-gl-style-spec": "^13.23.1",
|
||||
"@mdi/react": "^1.5.0",
|
||||
|
@ -148,7 +149,6 @@
|
|||
"express": "^4.17.3",
|
||||
"html-webpack-inline-svg-plugin": "^2.3.0",
|
||||
"html-webpack-plugin": "^4.5.2",
|
||||
"is-docker": "^3.0.0",
|
||||
"istanbul": "^0.4.5",
|
||||
"istanbul-lib-coverage": "^3.2.0",
|
||||
"mkdirp": "^1.0.4",
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
var config = {};
|
||||
var testNetwork = process.env.TEST_NETWORK || "localhost";
|
||||
|
||||
config.testNetwork = process.env.TEST_NETWORK || "localhost";
|
||||
config.port = 9001;
|
||||
config.baseUrl = "http://"+testNetwork+":"+config.port;
|
||||
config.baseUrl = "http://"+config.testNetwork+":"+config.port;
|
||||
|
||||
module.exports = config;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var wd = require("../wd-helper");
|
||||
var uuid = require('uuid/v1');
|
||||
var {v1: uuid} = require('uuid');
|
||||
var geoServer = require("../geojson-server");
|
||||
|
||||
var testNetwork = process.env.TEST_NETWORK || "localhost";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var assert = require("assert");
|
||||
var config = require("../../config/specs");
|
||||
var helper = require("../helper");
|
||||
var uuid = require('uuid/v1');
|
||||
var {v1: uuid} = require('uuid');
|
||||
var wd = require("../../wd-helper");
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue