Skip to content

Commit

Permalink
Merge branch 'master' into docs_gen
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandinand authored Feb 24, 2017
2 parents 7fb0c46 + 9db1d13 commit 88c134a
Show file tree
Hide file tree
Showing 186 changed files with 1,882 additions and 1,142 deletions.
68 changes: 57 additions & 11 deletions karma.conf.continuous-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,67 @@ module.exports = function karmaConfig(config) {
webpack: {
devtool: 'eval',
module: {
loaders: [
{ test: /\.jsx?$/, exclude: /(ol\.js$|node_modules)/, loader: 'babel-loader', include: path.join(__dirname, "web", "client") },
{ test: /\.css$/, loader: 'style!css'},
{ test: /\.less$/, loader: "style!css!less-loader" },
{ test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/, loader: "url-loader?mimetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9].[0-9].[0-9])?$/, loader: "file-loader?name=[name].[ext]" },
{ test: /\.(png|jpg|gif|svg)$/, loader: 'url-loader?name=[path][name].[ext]&limit=8192'} // inline base64 URLs for <=8k images, direct URLs for the rest
],
postLoaders: [ ]
rules: [
{
test: /\.jsx?$/,
exclude: /(ol\.js$|node_modules)/,
use: [{
loader: 'babel-loader'
}],
include: path.join(__dirname, "web", "client")
},
{
test: /\.css$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}]
},
{
test: /\.less$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'less-loader'
}]
},
{
test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/,
use: [{
loader: 'url-loader',
options: {
mimetype: "application/font-woff"
}
}]
},
{
test: /\.(ttf|eot|svg)(\?v=[0-9].[0-9].[0-9])?$/,
use: [{
loader: 'file-loader',
options: {
name: "[name].[ext]"
}
}]
},
{
test: /\.(png|jpg|gif|svg)$/,
use: [{
loader: 'url-loader',
options: {
name: "[path][name].[ext]",
limit: 8192
}
}] // inline base64 URLs for <=8k images, direct URLs for the rest
}
]
},
resolve: {
extensions: ['', '.js', '.json', '.jsx']
extensions: ['.js', '.json', '.jsx']
}
},

webpackServer: {
noInfo: true
}
Expand Down
75 changes: 64 additions & 11 deletions karma.conf.single-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,77 @@ module.exports = function karmaConfig(config) {
webpack: {
devtool: 'eval',
module: {
preLoaders: [
rules: [
{
test: /\.jsx?$/,
exclude: /(__tests__|node_modules|legacy|libs\\Cesium|libs\\html2canvas)\\|(__tests__|node_modules|legacy|libs\/Cesium|libs\/html2canvas)\/|webpack\.js|utils\/(openlayers|leaflet)/,
loader: 'babel-istanbul'
enforce: "pre",
use: [
{
loader: 'babel-istanbul-loader'
}
]
},
{
test: /\.jsx?$/,
exclude: /(ol\.js$|node_modules)/,
use: [
{
loader: 'babel-loader'
}
],
include: path.join(__dirname, "web", "client")
},
{
test: /\.css$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}]
},
{
test: /\.less$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'less-loader'
}]
},
{
test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/,
use: [{
loader: 'url-loader',
options: {
mimetype: "application/font-woff"
}
}]
},
{
test: /\.(ttf|eot|svg)(\?v=[0-9].[0-9].[0-9])?$/,
use: [{
loader: 'file-loader',
options: {
name: "[name].[ext]"
}
}]
},
{
test: /\.(png|jpg|gif|svg)$/,
use: [{
loader: 'url-loader',
options: {
name: "[path][name].[ext]",
limit: 8192
}
}] // inline base64 URLs for <=8k images, direct URLs for the rest
}
],
loaders: [
{ test: /\.jsx?$/, exclude: /(ol\.js$|node_modules)/, loader: 'babel-loader', include: path.join(__dirname, "web", "client") },
{ test: /\.css$/, loader: 'style!css'},
{ test: /\.less$/, loader: "style!css!less-loader" },
{ test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/, loader: "url-loader?mimetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9].[0-9].[0-9])?$/, loader: "file-loader?name=[name].[ext]" },
{ test: /\.(png|jpg|gif|svg)$/, loader: 'url-loader?name=[path][name].[ext]&limit=8192'} // inline base64 URLs for <=8k images, direct URLs for the rest
]
},
resolve: {
extensions: ['', '.js', '.json', '.jsx']
extensions: ['.js', '.json', '.jsx']
}
},

Expand Down
55 changes: 28 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@
"eslint-plugin-react": "3.0.0",
"exists-file": "1.0.2",
"expect": "1.13.4",
"extract-text-webpack-plugin": "0.8.2",
"extract-text-webpack-plugin": "2.0.0-rc.3",
"file-loader": "0.8.5",
"html-webpack-plugin": "2.17.0",
"istanbul-instrumenter-loader": "0.1.3",
"karma": "0.12.37",
"karma-chrome-launcher": "0.1.12",
"karma-cli": "0.0.4",
"karma-coverage": "0.4.2",
"istanbul-instrumenter-loader": "2.0.0",
"karma": "1.5.0",
"karma-chrome-launcher": "2.0.0",
"karma-cli": "1.0.1",
"karma-coverage": "1.1.1",
"karma-coveralls": "1.1.2",
"karma-firefox-launcher": "0.1.7",
"karma-ie-launcher": "0.2.0",
"karma-junit-reporter": "0.3.8",
"karma-mocha": "0.1.10",
"karma-mocha-reporter": "1.3.0",
"karma-firefox-launcher": "1.0.0",
"karma-ie-launcher": "1.0.0",
"karma-junit-reporter": "1.2.0",
"karma-mocha": "1.3.0",
"karma-mocha-reporter": "2.2.2",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "1.6.0",
"karma-webpack": "2.0.2",
"less": "2.7.1",
"less-loader": "2.2.3",
"markdown-toc": "1.1.0",
Expand All @@ -48,11 +48,11 @@
"ncp": "2.0.0",
"parallelshell": "1.2.0",
"raw-loader": "0.5.1",
"react-addons-css-transition-group": "0.14.8",
"react-addons-test-utils": "0.14.8",
"react-addons-css-transition-group": "15.4.2",
"react-addons-test-utils": "15.4.2",
"react-docgen": "2.13.0",
"react-docs-markdown": "0.1.7",
"react-hot-loader": "1.3.0",
"react-hot-loader": "1.3.1",
"react-motion": "0.4.4",
"react-router": "2.4.0",
"react-router-redux": "2.1.0",
Expand All @@ -68,9 +68,10 @@
"simple-git": "1.33.1",
"style-loader": "0.12.4",
"url-loader": "0.5.7",
"webpack": "1.12.15",
"webpack": "2.2.1",
"webpack-bundle-size-analyzer": "2.0.2",
"webpack-dev-server": "1.14.1"
"webpack-dev-server": "2.4.1",
"webpack-parallel-uglify-plugin": "0.4.0"
},
"//": "replace react-sortable-items with official on npm when 0.0.10 with remove_deprecated PR in included",
"dependencies": {
Expand Down Expand Up @@ -102,26 +103,26 @@
"lodash.castarray": "4.4.0",
"moment": "2.13.0",
"node-uuid": "1.4.3",
"object-assign": "3.0.0",
"object-assign": "4.1.1",
"ogc-schemas": "2.6.1",
"openlayers": "3.15.1",
"pdfviewer": "0.3.2",
"proj4": "2.3.14",
"qrcode.react": "0.6.1",
"react": "0.14.8",
"react-addons-shallow-compare": "0.14.8",
"react": "15.4.2",
"react-addons-shallow-compare": "15.4.2",
"react-bootstrap": "0.28.1",
"react-codemirror": "0.2.6",
"react-color": "2.4.0",
"react-confirm-button": "0.0.2",
"react-copy-to-clipboard": "4.1.0",
"react-dnd": "2.1.3",
"react-dnd-html5-backend": "2.1.2",
"react-dnd": "2.2.3",
"react-dnd-html5-backend": "2.2.3",
"react-dock": "0.2.3",
"react-dom": "0.14.8",
"react-dom": "15.4.2",
"react-draggable": "1.3.4",
"react-dropzone": "3.4.0",
"react-intl": "https://github.com/geosolutions-it/react-intl/tarball/react_014_1x",
"react-intl": "2.2.3",
"react-joyride": "1.10.1",
"react-nouislider": "1.11.0",
"react-overlays": "0.6.3",
Expand All @@ -131,10 +132,10 @@
"react-selectize": "2.0.3",
"react-share": "1.8.0",
"react-sidebar": "2.1.2",
"react-sortable-items": "0.0.12",
"react-sortable-items": "https://github.com/geosolutions-it/react-sortable-items/tarball/react15",
"react-spinkit": "1.1.6",
"react-swipeable-views": "0.6.3",
"react-widgets": "3.1.7",
"react-widgets": "3.4.6",
"redux": "3.6.0",
"redux-logger": "2.6.1",
"redux-observable": "0.13.0",
Expand All @@ -155,7 +156,7 @@
"scripts": {
"postinstall": "node checkCesium.js && mkdirp ./web/client/libs/Cesium && download --extract --out ./web/client/libs/Cesium https://cesiumjs.org/releases/Cesium-1.17.zip || echo Cesium already installed",
"clean": "rimraf ./web/client/dist",
"compile": "npm run clean && mkdirp ./web/client/dist && webpack --config prod-webpack.config.js",
"compile": "npm run clean && mkdirp ./web/client/dist && webpack --progress --config prod-webpack.config.js",
"analyze": "npm run clean && mkdirp ./web/client/dist && webpack --json | webpack-bundle-size-analyzer",
"start": "webpack-dev-server --progress --colors --port 8081 --hot --inline --content-base web/client",
"examples": "webpack-dev-server --progress --colors --port 8081 --hot --inline --content-base web/client --config examples-webpack.config.js",
Expand Down
17 changes: 11 additions & 6 deletions prod-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var webpackConfig = require('./webpack.config.js');
var path = require("path");
var UglifyJsPlugin = require("webpack/lib/optimize/UglifyJsPlugin");
var LoaderOptionsPlugin = require("webpack/lib/LoaderOptionsPlugin");
var ParallelUglifyPlugin = require("webpack-parallel-uglify-plugin");
var DefinePlugin = require("webpack/lib/DefinePlugin");
var NormalModuleReplacementPlugin = require("webpack/lib/NormalModuleReplacementPlugin");

Expand All @@ -9,6 +10,9 @@ var assign = require('object-assign');
assign(webpackConfig.entry, require('./examples.js'));

webpackConfig.plugins = [
new LoaderOptionsPlugin({
debug: false
}),
new DefinePlugin({
"__DEVTOOLS__": false
}),
Expand All @@ -20,14 +24,15 @@ webpackConfig.plugins = [
new NormalModuleReplacementPlugin(/leaflet$/, path.join(__dirname, "web", "client", "libs", "leaflet")),
new NormalModuleReplacementPlugin(/openlayers$/, path.join(__dirname, "web", "client", "libs", "openlayers")),
new NormalModuleReplacementPlugin(/proj4$/, path.join(__dirname, "web", "client", "libs", "proj4")),
new UglifyJsPlugin({
sourceMap: false,
compress: {warnings: false},
mangle: true
new ParallelUglifyPlugin({
uglifyJS: {
sourceMap: false,
compress: {warnings: false},
mangle: true
}
})
];
webpackConfig.devtool = undefined;
webpackConfig.debug = false;

// this is a workaround for this issue https://github.com/webpack/file-loader/issues/3
// use `__webpack_public_path__` in the index.html when fixed
Expand Down
14 changes: 7 additions & 7 deletions project/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>__PROJECTDESCRIPTION__</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css" />
<link rel="stylesheet" href="http://rawgit.com/Leaflet/Leaflet.draw/v0.2.4/dist/leaflet.draw.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css" />
<link rel="stylesheet" href="https://rawgit.com/Leaflet/Leaflet.draw/v0.2.4/dist/leaflet.draw.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.10.1/ol.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/mapstore2.css">
<script src="http://maps.google.com/maps/api/js?v=3"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script>
<script src="http://rawgit.com/Leaflet/Leaflet.draw/v0.2.4/dist/leaflet.draw.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ol3/3.10.1/ol.min.js"></script>
<script src="https://maps.google.com/maps/api/js?v=3"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script>
<script src="https://rawgit.com/Leaflet/Leaflet.draw/v0.2.4/dist/leaflet.draw.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.10.1/ol.min.js"></script>

</head>
<body>
Expand Down
20 changes: 15 additions & 5 deletions project/prod-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
var webpackConfig = require('./webpack.config.js');
var path = require("path");
var UglifyJsPlugin = require("webpack/lib/optimize/UglifyJsPlugin");
var LoaderOptionsPlugin = require("webpack/lib/LoaderOptionsPlugin");
var ParallelUglifyPlugin = require("webpack-parallel-uglify-plugin");
var DefinePlugin = require("webpack/lib/DefinePlugin");
var NormalModuleReplacementPlugin = require("webpack/lib/NormalModuleReplacementPlugin");

var assign = require('object-assign');

assign(webpackConfig.entry, require('./examples.js'));

webpackConfig.plugins = [
new LoaderOptionsPlugin({
debug: false
}),
new DefinePlugin({
"__DEVTOOLS__": false
}),
Expand All @@ -17,13 +25,15 @@ webpackConfig.plugins = [
new NormalModuleReplacementPlugin(/openlayers$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "openlayers")),
new NormalModuleReplacementPlugin(/cesium$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "cesium")),
new NormalModuleReplacementPlugin(/proj4$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "proj4")),
new UglifyJsPlugin({
compress: {warnings: false},
mangle: true
new ParallelUglifyPlugin({
uglifyJS: {
sourceMap: false,
compress: {warnings: false},
mangle: true
}
})
];
webpackConfig.devtool = undefined;
webpackConfig.debug = false;

// this is a workaround for this issue https://github.com/webpack/file-loader/issues/3
// use `__webpack_public_path__` in the index.html when fixed
Expand Down
Loading

0 comments on commit 88c134a

Please sign in to comment.