Merge pull request #3312 from RVKen/webpack-migration-2.x
migrate webpack to v2.6.1
This commit is contained in:
@@ -1,28 +0,0 @@
|
|||||||
function extsToRegExp(exts) {
|
|
||||||
return new RegExp("\\.(" + exts.map(function(ext) {
|
|
||||||
return ext.replace(/\./g, "\\.");
|
|
||||||
}).join("|") + ")(\\?.*)?$");
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = function loadersByExtension(obj) {
|
|
||||||
var loaders = [];
|
|
||||||
Object.keys(obj).forEach(function(key) {
|
|
||||||
var exts = key.split("|");
|
|
||||||
var value = obj[key];
|
|
||||||
var entry = {
|
|
||||||
extensions: exts,
|
|
||||||
test: extsToRegExp(exts)
|
|
||||||
};
|
|
||||||
if(Array.isArray(value)) {
|
|
||||||
entry.loaders = value;
|
|
||||||
} else if(typeof value === "string") {
|
|
||||||
entry.loader = value;
|
|
||||||
} else {
|
|
||||||
Object.keys(value).forEach(function(valueKey) {
|
|
||||||
entry[valueKey] = value[valueKey];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
loaders.push(entry);
|
|
||||||
});
|
|
||||||
return loaders;
|
|
||||||
};
|
|
||||||
176
dist/swagger-ui-bundle.js
vendored
176
dist/swagger-ui-bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui-bundle.js.map
vendored
2
dist/swagger-ui-bundle.js.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA+4CA;;;;;;AAoIA;AAy2FA;AA8iCA;AA6lJA;AA81IA;AAwuGA;AA01FA;AAkjFA;AAs3FA;AAi+CA;AA29CA;AAmtCA;AAuyEA;;;;;AAwiDA;AA8zJA;;;;;;;;;;;;;;AAyoFA;AA+lIA;AA4oJA;AAqvHA;AA8nGA;AA+iEA;AAw3DA;AA4nDA;AAknBA;;;;;;AAg1FA;AAggGA;;;;;AA23CA;AAgsFA;AA6kDA;AA01CA;AA8yFA;AA61CA;AA0jFA;;;;;;;;;AA6pEA;AA2zIA;AAu7FA;AAmrFA;AAq/EA","sourceRoot":""}
|
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;AAsyKA;;;;;;AAmqEA;;;;;;;;;;;;;;;;;;;;;;;;;;AA6nTA;;;;;;;;;;;;;;AAu8JA;;;;;;;;;AA8/mBA;;;;;AA6/PA;;;;;;AAqpVA","sourceRoot":""}
|
||||||
31
dist/swagger-ui-standalone-preset.js
vendored
31
dist/swagger-ui-standalone-preset.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui-standalone-preset.js.map
vendored
2
dist/swagger-ui-standalone-preset.js.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA+tEA;AAo7GA;AAw0FA;;;;;;AAmZA;AAivFA;AAu+CA;AAo+CA;AAirCA;AAuyEA","sourceRoot":""}
|
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA40CA;;;;;;AA4kFA","sourceRoot":""}
|
||||||
5
dist/swagger-ui.css
vendored
5
dist/swagger-ui.css
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui.css.map
vendored
2
dist/swagger-ui.css.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui.css","sources":[],"mappings":"","sourceRoot":""}
|
{"version":3,"file":"swagger-ui.css","sources":[],"mappings":";;;","sourceRoot":""}
|
||||||
21
dist/swagger-ui.js
vendored
21
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui.js.map
vendored
2
dist/swagger-ui.js.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AA+nEA;;;;;;AAmgBA;AA2pHA;AA0pIA;AA09FA;AA0+CA;AAs0CA;AAgvCA","sourceRoot":""}
|
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAkoaA","sourceRoot":""}
|
||||||
@@ -3,11 +3,8 @@ var path = require('path')
|
|||||||
var webpack = require('webpack')
|
var webpack = require('webpack')
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
var deepExtend = require('deep-extend')
|
var deepExtend = require('deep-extend')
|
||||||
var autoprefixer = require('autoprefixer')
|
|
||||||
const {gitDescribeSync} = require('git-describe');
|
const {gitDescribeSync} = require('git-describe');
|
||||||
|
|
||||||
var loadersByExtension = require('./build-tools/loadersByExtension')
|
|
||||||
|
|
||||||
var pkg = require('./package.json')
|
var pkg = require('./package.json')
|
||||||
|
|
||||||
let gitInfo
|
let gitInfo
|
||||||
@@ -21,7 +18,27 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function(options) {
|
var commonRules = [
|
||||||
|
{ test: /\.(js(x)?)(\?.*)?$/,
|
||||||
|
use: [{
|
||||||
|
loader: 'babel-loader',
|
||||||
|
options: {
|
||||||
|
retainLines: true
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
include: [ path.join(__dirname, 'src') ]
|
||||||
|
},
|
||||||
|
{ test: /\.(txt|yaml)(\?.*)?$/,
|
||||||
|
loader: 'raw-loader' },
|
||||||
|
{ test: /\.(png|jpg|jpeg|gif|svg)(\?.*)?$/,
|
||||||
|
loader: 'url-loader?limit=10000' },
|
||||||
|
{ test: /\.(woff|woff2)(\?.*)?$/,
|
||||||
|
loader: 'url-loader?limit=100000' },
|
||||||
|
{ test: /\.(ttf|eot)(\?.*)?$/,
|
||||||
|
loader: 'file-loader' }
|
||||||
|
]
|
||||||
|
|
||||||
|
module.exports = function(rules, options) {
|
||||||
|
|
||||||
// Special options, that have logic in this file
|
// Special options, that have logic in this file
|
||||||
// ...with defaults
|
// ...with defaults
|
||||||
@@ -33,23 +50,11 @@ module.exports = function(options) {
|
|||||||
sourcemaps: false,
|
sourcemaps: false,
|
||||||
}, options._special)
|
}, options._special)
|
||||||
|
|
||||||
var loadersMap = {
|
|
||||||
'js(x)?': {
|
|
||||||
loader: 'babel?retainLines=true',
|
|
||||||
include: [ path.join(__dirname, 'src') ],
|
|
||||||
},
|
|
||||||
'json': 'json-loader',
|
|
||||||
'txt|yaml': 'raw-loader',
|
|
||||||
'png|jpg|jpeg|gif|svg': specialOptions.disableAssets ? 'null-loader' : 'url-loader?limit=10000',
|
|
||||||
'woff|woff2': specialOptions.disableAssets ? 'null-loader' : 'url-loader?limit=100000',
|
|
||||||
'ttf|eot': specialOptions.disableAssets ? 'null-loader' : 'file-loader',
|
|
||||||
"worker.js": ["worker-loader?inline=true", "babel"]
|
|
||||||
}
|
|
||||||
|
|
||||||
var plugins = []
|
var plugins = []
|
||||||
|
|
||||||
if( specialOptions.separateStylesheets ) {
|
if( specialOptions.separateStylesheets ) {
|
||||||
plugins.push(new ExtractTextPlugin('[name].css' + (specialOptions.longTermCaching ? '?[contenthash]' : ''), {
|
plugins.push(new ExtractTextPlugin({
|
||||||
|
filename: '[name].css' + (specialOptions.longTermCaching ? '?[contenthash]' : ''),
|
||||||
allChunks: true
|
allChunks: true
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
@@ -58,14 +63,16 @@ module.exports = function(options) {
|
|||||||
|
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
compressor: {
|
sourceMap: true,
|
||||||
warnings: false
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
new webpack.optimize.DedupePlugin()
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
options: {
|
||||||
|
context: __dirname
|
||||||
|
}
|
||||||
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
plugins.push( new webpack.NoErrorsPlugin())
|
plugins.push( new webpack.NoEmitOnErrorsPlugin())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,34 +90,7 @@ module.exports = function(options) {
|
|||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
|
|
||||||
var cssLoader = 'css-loader!postcss-loader'
|
delete options._special
|
||||||
|
|
||||||
var completeStylesheetLoaders = deepExtend({
|
|
||||||
'css': cssLoader,
|
|
||||||
'scss': cssLoader + '!' + 'sass-loader?outputStyle=expanded&sourceMap=true&sourceMapContents=true',
|
|
||||||
'less': cssLoader + '!' + 'less-loader',
|
|
||||||
}, specialOptions.stylesheetLoaders)
|
|
||||||
|
|
||||||
if(specialOptions.cssModules) {
|
|
||||||
cssLoader = cssLoader + '?module' + (specialOptions.minimize ? '' : '&localIdentName=[path][name]---[local]---[hash:base64:5]')
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.keys(completeStylesheetLoaders).forEach(function(ext) {
|
|
||||||
var ori = completeStylesheetLoaders[ext]
|
|
||||||
if(specialOptions.separateStylesheets) {
|
|
||||||
completeStylesheetLoaders[ext] = ExtractTextPlugin.extract('style-loader', ori)
|
|
||||||
} else {
|
|
||||||
completeStylesheetLoaders[ext] = 'style-loader!' + ori
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
var loaders = loadersByExtension(deepExtend({}, loadersMap, specialOptions.loaders, completeStylesheetLoaders))
|
|
||||||
var extraLoaders = (options.module || {} ).loaders
|
|
||||||
|
|
||||||
if(Array.isArray(extraLoaders)) {
|
|
||||||
loaders = loaders.concat(extraLoaders)
|
|
||||||
delete options.module.loaders
|
|
||||||
}
|
|
||||||
|
|
||||||
var completeConfig = deepExtend({
|
var completeConfig = deepExtend({
|
||||||
entry: {},
|
entry: {},
|
||||||
@@ -130,11 +110,11 @@ module.exports = function(options) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
loaders: loaders,
|
rules: commonRules.concat(rules),
|
||||||
},
|
},
|
||||||
|
|
||||||
resolveLoader: {
|
resolveLoader: {
|
||||||
root: path.join(__dirname, 'node_modules'),
|
modules: [path.join(__dirname, 'node_modules')],
|
||||||
},
|
},
|
||||||
|
|
||||||
externals: {
|
externals: {
|
||||||
@@ -142,19 +122,16 @@ module.exports = function(options) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
root: path.join(__dirname, './src'),
|
modules: [
|
||||||
modulesDirectories: ['node_modules'],
|
path.join(__dirname, './src'),
|
||||||
extensions: ["", ".web.js", ".js", ".jsx", ".json", ".less"],
|
'node_modules'
|
||||||
packageAlias: 'browser',
|
],
|
||||||
|
extensions: [".web.js", ".js", ".jsx", ".json", ".less"],
|
||||||
alias: {
|
alias: {
|
||||||
base: "getbase/src/less/base",
|
base: "getbase/src/less/base",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
postcss: function() {
|
|
||||||
return [autoprefixer]
|
|
||||||
},
|
|
||||||
|
|
||||||
devtool: specialOptions.sourcemaps ? 'cheap-module-source-map' : null,
|
devtool: specialOptions.sourcemaps ? 'cheap-module-source-map' : null,
|
||||||
|
|
||||||
plugins,
|
plugins,
|
||||||
|
|||||||
54
package.json
54
package.json
@@ -48,6 +48,7 @@
|
|||||||
"matcher": "^0.1.2",
|
"matcher": "^0.1.2",
|
||||||
"memoizee": "0.4.1",
|
"memoizee": "0.4.1",
|
||||||
"promise-worker": "^1.1.1",
|
"promise-worker": "^1.1.1",
|
||||||
|
"prop-types": "^15.5.10",
|
||||||
"react": "^15.4.0",
|
"react": "^15.4.0",
|
||||||
"react-addons-perf": "0.14.8",
|
"react-addons-perf": "0.14.8",
|
||||||
"react-addons-shallow-compare": "0.14.8",
|
"react-addons-shallow-compare": "0.14.8",
|
||||||
@@ -77,10 +78,10 @@
|
|||||||
"yaml-js": "0.2.0"
|
"yaml-js": "0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "6.6.1",
|
"autoprefixer": "7.1.1",
|
||||||
"babel-core": "^6.23.1",
|
"babel-core": "^6.23.1",
|
||||||
"babel-eslint": "^7.1.1",
|
"babel-eslint": "^7.1.1",
|
||||||
"babel-loader": "^6.3.2",
|
"babel-loader": "^7.1.0",
|
||||||
"babel-plugin-module-alias": "^1.6.0",
|
"babel-plugin-module-alias": "^1.6.0",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
"babel-plugin-transform-runtime": "^6.23.0",
|
||||||
"babel-preset-es2015": "^6.22.0",
|
"babel-preset-es2015": "^6.22.0",
|
||||||
@@ -88,42 +89,43 @@
|
|||||||
"babel-preset-react": "^6.23.0",
|
"babel-preset-react": "^6.23.0",
|
||||||
"babel-preset-stage-0": "^6.22.0",
|
"babel-preset-stage-0": "^6.22.0",
|
||||||
"babel-runtime": "^6.23.0",
|
"babel-runtime": "^6.23.0",
|
||||||
"css-loader": "0.22.0",
|
"css-loader": "0.28.4",
|
||||||
"deep-extend": "^0.4.1",
|
"deep-extend": "^0.5.0",
|
||||||
"deepmerge": "^1.3.2",
|
"deepmerge": "^1.3.2",
|
||||||
"enzyme": "^2.7.1",
|
"enzyme": "^2.7.1",
|
||||||
"eslint": "^2.13.1",
|
"eslint": "^4.1.1",
|
||||||
"eslint-plugin-react": "^6.10.3",
|
"eslint-plugin-import": "^2.6.0",
|
||||||
"extract-text-webpack-plugin": "0.8.2",
|
"eslint-plugin-react": "^7.1.0",
|
||||||
"file-loader": "0.8.4",
|
"extract-text-webpack-plugin": "^2.1.2",
|
||||||
|
"file-loader": "0.11.2",
|
||||||
"git-describe": "^4.0.1",
|
"git-describe": "^4.0.1",
|
||||||
"html-webpack-plugin": "^2.28.0",
|
"html-webpack-plugin": "^2.28.0",
|
||||||
"imports-loader": "0.6.5",
|
"imports-loader": "0.7.1",
|
||||||
"json-loader": "0.5.3",
|
"json-loader": "0.5.4",
|
||||||
"karma": "^0.13.22",
|
"karma": "^1.7.0",
|
||||||
"karma-chrome-launcher": "^0.2.3",
|
"karma-chrome-launcher": "^2.2.0",
|
||||||
"karma-mocha": "^0.2.2",
|
"karma-mocha": "^1.3.0",
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-webpack": "1.8.0",
|
"karma-webpack": "2.0.3",
|
||||||
"less": "2.5.3",
|
"less": "2.7.2",
|
||||||
"less-loader": "2.2.1",
|
"less-loader": "4.0.4",
|
||||||
"license-checker": "^8.0.4",
|
"license-checker": "^11.0.0",
|
||||||
"mocha": "^2.5.3",
|
"mocha": "^3.4.2",
|
||||||
"node-sass": "^4.5.0",
|
"node-sass": "^4.5.0",
|
||||||
"npm-run-all": "3.1.1",
|
"npm-run-all": "4.0.2",
|
||||||
"null-loader": "0.1.1",
|
"null-loader": "0.1.1",
|
||||||
"open": "0.0.5",
|
"open": "0.0.5",
|
||||||
"postcss-loader": "0.7.0",
|
"postcss-loader": "2.0.6",
|
||||||
"raw-loader": "0.5.1",
|
"raw-loader": "0.5.1",
|
||||||
"react-hot-loader": "^1.3.1",
|
"react-hot-loader": "^1.3.1",
|
||||||
"react-test-renderer": "^15.5.4",
|
"react-test-renderer": "^15.5.4",
|
||||||
"rimraf": "^2.6.0",
|
"rimraf": "^2.6.0",
|
||||||
"sass-loader": "^6.0.2",
|
"sass-loader": "^6.0.2",
|
||||||
"standard": "^8.6.0",
|
"standard": "^10.0.2",
|
||||||
"standard-loader": "^5.0.0",
|
"standard-loader": "^6.0.1",
|
||||||
"style-loader": "0.13.0",
|
"style-loader": "0.18.2",
|
||||||
"url-loader": "0.5.6",
|
"url-loader": "0.5.9",
|
||||||
"webpack": "^1.14.0",
|
"webpack": "^2.6.1",
|
||||||
"webpack-bundle-size-analyzer": "^2.5.0"
|
"webpack-bundle-size-analyzer": "^2.5.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
@@ -135,6 +137,6 @@
|
|||||||
"IE 11"
|
"IE 11"
|
||||||
],
|
],
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"webpack-dev-server": "1.14.0"
|
"webpack-dev-server": "2.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
postcss.config.js
Normal file
1
postcss.config.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = {};
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class App extends React.Component {
|
export default class App extends React.Component {
|
||||||
|
|
||||||
@@ -6,7 +7,7 @@ export default class App extends React.Component {
|
|||||||
let { getComponent, layoutSelectors } = this.props
|
let { getComponent, layoutSelectors } = this.props
|
||||||
const layoutName = layoutSelectors.current()
|
const layoutName = layoutSelectors.current()
|
||||||
const Component = getComponent(layoutName, true)
|
const Component = getComponent(layoutName, true)
|
||||||
return Component ? Component : ()=> <h1> No layout defined for "{layoutName}" </h1>
|
return Component ? Component : ()=> <h1> No layout defined for "{layoutName}" </h1>
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class ApiKeyAuth extends React.Component {
|
export default class ApiKeyAuth extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class AuthorizationPopup extends React.Component {
|
export default class AuthorizationPopup extends React.Component {
|
||||||
close =() => {
|
close =() => {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class AuthorizeBtn extends React.Component {
|
export default class AuthorizeBtn extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
|
|
||||||
export default class AuthorizeOperationBtn extends React.Component {
|
export default class AuthorizeOperationBtn extends React.Component {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
|
|
||||||
export default class Auths extends React.Component {
|
export default class Auths extends React.Component {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
|
|
||||||
export default class BasicAuth extends React.Component {
|
export default class BasicAuth extends React.Component {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class AuthError extends React.Component {
|
export default class AuthError extends React.Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import oauth2Authorize from "core/oauth2-authorize"
|
import oauth2Authorize from "core/oauth2-authorize"
|
||||||
|
|
||||||
const IMPLICIT = "implicit"
|
const IMPLICIT = "implicit"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { Component, PropTypes } from "react"
|
import React, { Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class Clear extends Component {
|
export default class Clear extends Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
import { fromJS } from "immutable"
|
import { fromJS } from "immutable"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import curlify from "core/curlify"
|
import curlify from "core/curlify"
|
||||||
|
|
||||||
export default class Curl extends React.Component {
|
export default class Curl extends React.Component {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import Collapse from "react-collapse"
|
import Collapse from "react-collapse"
|
||||||
import { presets } from "react-motion"
|
import { presets } from "react-motion"
|
||||||
import ObjectInspector from "react-object-inspector"
|
import ObjectInspector from "react-object-inspector"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { List } from "immutable"
|
import { List } from "immutable"
|
||||||
import Collapse from "react-collapse"
|
import Collapse from "react-collapse"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { Component, PropTypes } from "react"
|
import React, { Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class Execute extends Component {
|
export default class Execute extends Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import Im from "immutable"
|
import Im from "immutable"
|
||||||
|
|
||||||
export default class Headers extends React.Component {
|
export default class Headers extends React.Component {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { Component, PropTypes } from "react"
|
import React, { Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { highlight } from "core/utils"
|
import { highlight } from "core/utils"
|
||||||
|
|
||||||
export default class HighlightCode extends Component {
|
export default class HighlightCode extends Component {
|
||||||
@@ -8,17 +9,21 @@ export default class HighlightCode extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
highlight(this.refs.el)
|
highlight(this.el)
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
highlight(this.refs.el)
|
highlight(this.el)
|
||||||
|
}
|
||||||
|
|
||||||
|
initializeComponent = (c) => {
|
||||||
|
this.el = c
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
let { value, className } = this.props
|
let { value, className } = this.props
|
||||||
className = className || ""
|
className = className || ""
|
||||||
|
|
||||||
return <pre ref="el" className={className + " microlight"}>{ value }</pre>
|
return <pre ref={this.initializeComponent} className={className + " microlight"}>{ value }</pre>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { fromJS } from "immutable"
|
import { fromJS } from "immutable"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import OriCollapse from "react-collapse"
|
import OriCollapse from "react-collapse"
|
||||||
|
|
||||||
function xclass(...args) {
|
function xclass(...args) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class BaseLayout extends React.Component {
|
export default class BaseLayout extends React.Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class XPane extends React.Component {
|
export default class XPane extends React.Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
|
|
||||||
const Headers = ( { headers } )=>{
|
const Headers = ( { headers } )=>{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class ModelExample extends React.Component {
|
export default class ModelExample extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { Component, PropTypes } from "react"
|
import React, { Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
import { List } from "immutable"
|
import { List } from "immutable"
|
||||||
const braceOpen = "{"
|
const braceOpen = "{"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { Component, PropTypes } from "react"
|
import React, { Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class Models extends Component {
|
export default class Models extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class OnlineValidatorBadge extends React.Component {
|
export default class OnlineValidatorBadge extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PureComponent, PropTypes } from "react"
|
import React, { PureComponent } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { getList } from "core/utils"
|
import { getList } from "core/utils"
|
||||||
import * as CustomPropTypes from "core/proptypes"
|
import * as CustomPropTypes from "core/proptypes"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class Operations extends React.Component {
|
export default class Operations extends React.Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { Link } from "core/components/layout-utils"
|
import { Link } from "core/components/layout-utils"
|
||||||
|
|
||||||
export default class Overview extends React.Component {
|
export default class Overview extends React.Component {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PureComponent, PropTypes } from "react"
|
import React, { PureComponent } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { fromJS, List } from "immutable"
|
import { fromJS, List } from "immutable"
|
||||||
import { getSampleSchema } from "core/utils"
|
import { getSampleSchema } from "core/utils"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component, PropTypes } from "react"
|
import React, { Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import win from "core/window"
|
import win from "core/window"
|
||||||
|
|
||||||
|
|
||||||
export default class ParameterRow extends Component {
|
export default class ParameterRow extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { Component, PropTypes } from "react"
|
import React, { Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import ImPropTypes from "react-immutable-proptypes"
|
import ImPropTypes from "react-immutable-proptypes"
|
||||||
import Im from "immutable"
|
import Im from "immutable"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import Remarkable from "react-remarkable"
|
import Remarkable from "react-remarkable"
|
||||||
import sanitize from "sanitize-html"
|
import sanitize from "sanitize-html"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { formatXml } from "core/utils"
|
import { formatXml } from "core/utils"
|
||||||
import lowerCase from "lodash/lowerCase"
|
import lowerCase from "lodash/lowerCase"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { fromJS } from "immutable"
|
import { fromJS } from "immutable"
|
||||||
import { getSampleSchema } from "core/utils"
|
import { getSampleSchema } from "core/utils"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { fromJS } from "immutable"
|
import { fromJS } from "immutable"
|
||||||
import { defaultStatusCode } from "core/utils"
|
import { defaultStatusCode } from "core/utils"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class Schemes extends React.Component {
|
export default class Schemes extends React.Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class TryItOutButton extends React.Component {
|
export default class TryItOutButton extends React.Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes, PureComponent, Component } from "react"
|
import React, { PureComponent, Component } from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import { List, fromJS } from "immutable"
|
import { List, fromJS } from "immutable"
|
||||||
//import "less/json-schema-form"
|
//import "less/json-schema-form"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
import SplitPane from "react-split-pane"
|
import SplitPane from "react-split-pane"
|
||||||
import "./split-pane-mode.less"
|
import "./split-pane-mode.less"
|
||||||
|
|
||||||
@@ -23,9 +24,13 @@ export default class SplitPaneMode extends React.Component {
|
|||||||
children: [],
|
children: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
initializeComponent = (c) => {
|
||||||
|
this.splitPane = c
|
||||||
|
}
|
||||||
|
|
||||||
onDragFinished = () => {
|
onDragFinished = () => {
|
||||||
let { threshold, layoutActions } = this.props
|
let { threshold, layoutActions } = this.props
|
||||||
let { position, draggedSize } = this.refs.splitPane.state
|
let { position, draggedSize } = this.splitPane.state
|
||||||
this.draggedSize = draggedSize
|
this.draggedSize = draggedSize
|
||||||
|
|
||||||
let nearLeftEdge = position <= threshold
|
let nearLeftEdge = position <= threshold
|
||||||
@@ -62,7 +67,7 @@ export default class SplitPaneMode extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<SplitPane
|
<SplitPane
|
||||||
disabledClass={""}
|
disabledClass={""}
|
||||||
ref={"splitPane"}
|
ref={this.initializeComponent}
|
||||||
split='vertical'
|
split='vertical'
|
||||||
defaultSize={"50%"}
|
defaultSize={"50%"}
|
||||||
primary="second"
|
primary="second"
|
||||||
|
|||||||
@@ -65,11 +65,11 @@ export const render = (getSystem, getStore, getComponent, getComponents, dom) =>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Render try/catch wrapper
|
// Render try/catch wrapper
|
||||||
const createClass = component => React.createClass({
|
const createClass = component => class extends Component {
|
||||||
render() {
|
render() {
|
||||||
return component(this.props)
|
return component(this.props)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
const Fallback = ({ name }) => <div style={{ // eslint-disable-line react/prop-types
|
const Fallback = ({ name }) => <div style={{ // eslint-disable-line react/prop-types
|
||||||
padding: "1em",
|
padding: "1em",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { PropTypes } from "react"
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
// Takes a list and proptype, and returns a PropType.shape({ [item]: propType })
|
// Takes a list and proptype, and returns a PropType.shape({ [item]: propType })
|
||||||
const mapListToPropTypeShape = (list, propType) => PropTypes.shape(
|
const mapListToPropTypeShape = (list, propType) => PropTypes.shape(
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ export default class Store {
|
|||||||
action = {type: NEW_THROWN_ERR, error: true, payload: serializeError(e) }
|
action = {type: NEW_THROWN_ERR, error: true, payload: serializeError(e) }
|
||||||
}
|
}
|
||||||
finally{
|
finally{
|
||||||
return action
|
return action // eslint-disable-line no-unsafe-finally
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ export function highlight (el) {
|
|||||||
while (![
|
while (![
|
||||||
1, // 0: whitespace
|
1, // 0: whitespace
|
||||||
// 1: operator or braces
|
// 1: operator or braces
|
||||||
/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[test](chr),
|
/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[test](chr), // eslint-disable-line no-useless-escape
|
||||||
/[\])]/[test](chr), // 2: closing brace
|
/[\])]/[test](chr), // 2: closing brace
|
||||||
/[$\w]/[test](chr), // 3: (key)word
|
/[$\w]/[test](chr), // 3: (key)word
|
||||||
chr == "/" && // 4: regex
|
chr == "/" && // 4: regex
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
//import "./topbar.less"
|
//import "./topbar.less"
|
||||||
import Logo from "./logo_small.png"
|
import Logo from "./logo_small.png"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { PropTypes } from "react"
|
import React from "react"
|
||||||
|
import PropTypes from "prop-types"
|
||||||
|
|
||||||
export default class StandaloneLayout extends React.Component {
|
export default class StandaloneLayout extends React.Component {
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable no-useless-escape */
|
||||||
import expect from "expect"
|
import expect from "expect"
|
||||||
import { fromJS } from "immutable"
|
import { fromJS } from "immutable"
|
||||||
import { transform } from "corePlugins/err/error-transformers/transformers/parameter-oneof"
|
import { transform } from "corePlugins/err/error-transformers/transformers/parameter-oneof"
|
||||||
|
|||||||
@@ -1,14 +1,58 @@
|
|||||||
var path = require('path')
|
var path = require('path')
|
||||||
|
var rules = [
|
||||||
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'worker-loader',
|
||||||
|
options: {
|
||||||
|
inline: true,
|
||||||
|
name: '[name].js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ loader: 'babel-loader' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(css)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
'postcss-loader'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(scss)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: { sourceMap: true }
|
||||||
|
},
|
||||||
|
{ loader: 'sass-loader',
|
||||||
|
options: {
|
||||||
|
outputStyle: 'expanded',
|
||||||
|
sourceMap: true,
|
||||||
|
sourceMapContents: 'true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(less)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
},
|
||||||
|
'less-loader'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
module.exports = require('./make-webpack-config.js')(rules, {
|
||||||
module.exports = require('./make-webpack-config.js')({
|
|
||||||
_special: {
|
_special: {
|
||||||
separateStylesheets: false,
|
separateStylesheets: false,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
sourcemaps: true,
|
sourcemaps: true,
|
||||||
loaders: {
|
|
||||||
"worker.js": ["worker-loader?inline=true&name=[name].js", "babel"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
|
|||||||
@@ -1,14 +1,59 @@
|
|||||||
var path = require('path')
|
var path = require('path')
|
||||||
|
|
||||||
|
var rules = [
|
||||||
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'worker-loader',
|
||||||
|
options: {
|
||||||
|
inline: true,
|
||||||
|
name: '[name].js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ loader: 'babel-loader' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(css)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
'postcss-loader'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(scss)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: { sourceMap: true }
|
||||||
|
},
|
||||||
|
{ loader: 'sass-loader',
|
||||||
|
options: {
|
||||||
|
outputStyle: 'expanded',
|
||||||
|
sourceMap: true,
|
||||||
|
sourceMapContents: 'true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(less)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
},
|
||||||
|
'less-loader'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
module.exports = require('./make-webpack-config.js')({
|
module.exports = require('./make-webpack-config.js')(rules, {
|
||||||
_special: {
|
_special: {
|
||||||
separateStylesheets: false,
|
separateStylesheets: false,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
sourcemaps: true,
|
sourcemaps: true,
|
||||||
loaders: {
|
|
||||||
"worker.js": ["worker-loader?inline=true&name=[name].js", "babel"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
|
|||||||
@@ -1,15 +1,70 @@
|
|||||||
const path = require("path")
|
var path = require('path')
|
||||||
const fs = require("fs")
|
var fs = require('fs')
|
||||||
const nodeModules = fs.readdirSync("node_modules").filter(function(x) { return x !== ".bin" })
|
const nodeModules = fs.readdirSync("node_modules").filter(function(x) { return x !== ".bin" })
|
||||||
|
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
|
|
||||||
module.exports = require("./make-webpack-config.js")({
|
var rules = [
|
||||||
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'worker-loader',
|
||||||
|
options: {
|
||||||
|
inline: true,
|
||||||
|
name: '[name].js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ loader: 'babel-loader' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(css)(\?.*)?$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: 'style-loader',
|
||||||
|
use: [
|
||||||
|
'css-loader',
|
||||||
|
'postcss-loader'
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{ test: /\.(scss)(\?.*)?$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: 'style-loader',
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'css-loader',
|
||||||
|
options: { minimize: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: { sourceMap: true }
|
||||||
|
},
|
||||||
|
{ loader: 'sass-loader',
|
||||||
|
options: {
|
||||||
|
outputStyle: 'expanded',
|
||||||
|
sourceMap: true,
|
||||||
|
sourceMapContents: 'true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{ test: /\.(less)(\?.*)?$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: 'style-loader',
|
||||||
|
use: ['css-loader',
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
},
|
||||||
|
'less-loader'
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
module.exports = require('./make-webpack-config.js')(rules, {
|
||||||
_special: {
|
_special: {
|
||||||
separateStylesheets: true,
|
separateStylesheets: true,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
sourcemaps: true,
|
sourcemaps: true,
|
||||||
loaders: {
|
|
||||||
"worker.js": ["worker-loader?inline=true&name=[name].js", "babel"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
|
|||||||
@@ -1,10 +1,61 @@
|
|||||||
var path = require('path')
|
var path = require('path')
|
||||||
|
|
||||||
module.exports = require("./make-webpack-config")({
|
var rules = [
|
||||||
|
{ test: /\.(worker\.js)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'worker-loader',
|
||||||
|
options: {
|
||||||
|
inline: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ loader: 'babel-loader' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(jsx)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
{ loader: 'react-hot-loader' },
|
||||||
|
{ loader: 'babel-loader' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(css)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
'postcss-loader'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(scss)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: { sourceMap: true }
|
||||||
|
},
|
||||||
|
{ loader: 'sass-loader',
|
||||||
|
options: {
|
||||||
|
outputStyle: 'expanded',
|
||||||
|
sourceMap: true,
|
||||||
|
sourceMapContents: 'true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ test: /\.(less)(\?.*)?$/,
|
||||||
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
'css-loader',
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
},
|
||||||
|
'less-loader'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
module.exports = require("./make-webpack-config")(rules, {
|
||||||
_special: {
|
_special: {
|
||||||
loaders: {
|
|
||||||
'jsx': [ "react-hot-loader", "babel" ]
|
|
||||||
},
|
|
||||||
separateStylesheets: false,
|
separateStylesheets: false,
|
||||||
},
|
},
|
||||||
devtool: "eval",
|
devtool: "eval",
|
||||||
@@ -14,14 +65,12 @@ module.exports = require("./make-webpack-config")({
|
|||||||
'./src/core/index.js'
|
'./src/core/index.js'
|
||||||
],
|
],
|
||||||
'swagger-ui-standalone-preset': [
|
'swagger-ui-standalone-preset': [
|
||||||
'webpack/hot/dev-server',
|
|
||||||
'./src/polyfills',
|
'./src/polyfills',
|
||||||
'./src/standalone/index.js',
|
'./src/standalone/index.js',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
pathinfo: true,
|
pathinfo: true,
|
||||||
debug: true,
|
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
library: "[name]",
|
library: "[name]",
|
||||||
libraryTarget: "umd",
|
libraryTarget: "umd",
|
||||||
@@ -29,10 +78,9 @@ module.exports = require("./make-webpack-config")({
|
|||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 3200,
|
port: 3200,
|
||||||
path: path.join(__dirname, 'dev-helpers'),
|
contentBase: path.join(__dirname, 'dev-helpers'),
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
noInfo: true,
|
noInfo: true,
|
||||||
colors: true,
|
|
||||||
hot: true,
|
hot: true,
|
||||||
stats: {
|
stats: {
|
||||||
colors: true
|
colors: true
|
||||||
|
|||||||
Reference in New Issue
Block a user