Remove trailing commas in addons

This commit is contained in:
Dan Abramov
2017-06-14 12:38:03 +01:00
parent a5e69ca8ea
commit 00917c80e8
23 changed files with 180 additions and 178 deletions
+6 -6
View File
@@ -32,7 +32,7 @@ if (process.env.NODE_ENV !== 'production') {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
childContext: 'child context',
childContext: 'child context'
};
} else {
ReactPropTypeLocationNames = {};
@@ -284,7 +284,7 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
* @internal
* @overridable
*/
updateComponent: 'OVERRIDE_BASE',
updateComponent: 'OVERRIDE_BASE'
};
/**
@@ -350,7 +350,7 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
},
autobind: function() {},
autobind: function() {}
};
function validateTypeDef(Constructor, typeDef, location) {
@@ -695,13 +695,13 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
var IsMountedPreMixin = {
componentDidMount: function() {
this.__isMounted = true;
},
}
};
var IsMountedPostMixin = {
componentWillUnmount: function() {
this.__isMounted = false;
},
}
};
/**
@@ -737,7 +737,7 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
this.__didWarnIsMounted = true;
}
return !!this.__isMounted;
},
}
};
var ReactClassComponent = function() {};
+40 -40
View File
@@ -34,11 +34,11 @@ env.beforeEach(() => {
if (actual !== newError && !jasmine.isSpy(actual)) {
return {
pass: false,
message: 'Test did not tear down console.error mock properly.',
message: 'Test did not tear down console.error mock properly.'
};
}
return {pass: true};
},
}
};
},
toNotHaveBeenCalled() {
@@ -48,11 +48,11 @@ env.beforeEach(() => {
pass: callCount === 0,
message: 'Expected test not to warn. If the warning is expected, mock ' +
"it out using spyOn(console, 'error'); and test that the " +
'warning occurs.',
'warning occurs.'
};
},
}
};
},
}
});
});
env.afterEach(() => {
@@ -108,7 +108,7 @@ describe('ReactClass-spec', () => {
var TestComponent = createReactClass({
render: function() {
return <div />;
},
}
});
expect(TestComponent.displayName).toBe('TestComponent');
@@ -118,11 +118,11 @@ describe('ReactClass-spec', () => {
var propValidator = jest.fn();
var TestComponent = createReactClass({
propTypes: {
value: propValidator,
value: propValidator
},
render: function() {
return <div />;
},
}
});
expect(TestComponent.propTypes).toBeDefined();
@@ -134,11 +134,11 @@ describe('ReactClass-spec', () => {
createReactClass({
displayName: 'Component',
propTypes: {
prop: null,
prop: null
},
render: function() {
return <span>{this.props.prop}</span>;
},
}
});
expectDev(console.error.calls.count()).toBe(1);
expectDev(console.error.calls.argsFor(0)[0]).toBe(
@@ -152,11 +152,11 @@ describe('ReactClass-spec', () => {
createReactClass({
displayName: 'Component',
contextTypes: {
prop: null,
prop: null
},
render: function() {
return <span>{this.props.prop}</span>;
},
}
});
expectDev(console.error.calls.count()).toBe(1);
expectDev(console.error.calls.argsFor(0)[0]).toBe(
@@ -170,11 +170,11 @@ describe('ReactClass-spec', () => {
createReactClass({
displayName: 'Component',
childContextTypes: {
prop: null,
prop: null
},
render: function() {
return <span>{this.props.prop}</span>;
},
}
});
expectDev(console.error.calls.count()).toBe(1);
expectDev(console.error.calls.argsFor(0)[0]).toBe(
@@ -192,7 +192,7 @@ describe('ReactClass-spec', () => {
},
render: function() {
return <div />;
},
}
});
expectDev(console.error.calls.count()).toBe(1);
expectDev(console.error.calls.argsFor(0)[0]).toBe(
@@ -208,7 +208,7 @@ describe('ReactClass-spec', () => {
},
render: function() {
return <div />;
},
}
});
expectDev(console.error.calls.count()).toBe(2);
expectDev(console.error.calls.argsFor(1)[0]).toBe(
@@ -226,7 +226,7 @@ describe('ReactClass-spec', () => {
},
render: function() {
return <div />;
},
}
});
expectDev(console.error.calls.count()).toBe(1);
expectDev(console.error.calls.argsFor(0)[0]).toBe(
@@ -241,14 +241,14 @@ describe('ReactClass-spec', () => {
statics: {
getDefaultProps: function() {
return {
foo: 0,
foo: 0
};
},
}
},
render: function() {
return <span />;
},
}
});
}).toThrowError(
'ReactClass: You are attempting to define a reserved property, ' +
@@ -264,17 +264,17 @@ describe('ReactClass-spec', () => {
createReactClass({
mixins: [{}],
propTypes: {
foo: PropTypes.string,
foo: PropTypes.string
},
contextTypes: {
foo: PropTypes.string,
foo: PropTypes.string
},
childContextTypes: {
foo: PropTypes.string,
foo: PropTypes.string
},
render: function() {
return <div />;
},
}
});
expectDev(console.error.calls.count()).toBe(4);
expectDev(console.error.calls.argsFor(0)[0]).toBe(
@@ -304,12 +304,12 @@ describe('ReactClass-spec', () => {
jkl: 'mno',
pqr: function() {
return this;
},
}
},
render: function() {
return <span />;
},
}
});
var instance = <Component />;
instance = renderIntoDocument(instance);
@@ -329,12 +329,12 @@ describe('ReactClass-spec', () => {
var Component = createReactClass({
getInitialState: function() {
return {
occupation: 'clown',
occupation: 'clown'
};
},
render: function() {
return <span />;
},
}
});
var instance = <Component />;
instance = renderIntoDocument(instance);
@@ -344,26 +344,26 @@ describe('ReactClass-spec', () => {
it('renders based on context getInitialState', () => {
var Foo = createReactClass({
contextTypes: {
className: PropTypes.string,
className: PropTypes.string
},
getInitialState() {
return {className: this.context.className};
},
render() {
return <span className={this.state.className} />;
},
}
});
var Outer = createReactClass({
childContextTypes: {
className: PropTypes.string,
className: PropTypes.string
},
getChildContext() {
return {className: 'foo'};
},
render() {
return <Foo />;
},
}
});
var container = document.createElement('div');
@@ -381,7 +381,7 @@ describe('ReactClass-spec', () => {
},
render: function() {
return <span />;
},
}
});
var instance = <Component />;
expect(function() {
@@ -399,7 +399,7 @@ describe('ReactClass-spec', () => {
},
render: function() {
return <span />;
},
}
});
expect(() => renderIntoDocument(<Component />)).not.toThrow();
});
@@ -409,7 +409,7 @@ describe('ReactClass-spec', () => {
var Component = createReactClass({
render() {
return <div />;
},
}
});
expect(() => Component()).toThrow();
@@ -429,7 +429,7 @@ describe('ReactClass-spec', () => {
render() {
ops.push('Render: ' + this.state.step);
return <div />;
},
}
});
var instance = renderIntoDocument(<Component />);
@@ -462,8 +462,8 @@ describe('ReactClass-spec', () => {
},
componentWillUnmount() {
this.log('mixin.componentWillUnmount');
},
},
}
}
],
log(name) {
ops.push(`${name}: ${this.isMounted()}`);
@@ -491,7 +491,7 @@ describe('ReactClass-spec', () => {
instance = this;
this.log('render');
return <div />;
},
}
});
var container = document.createElement('div');
@@ -513,7 +513,7 @@ describe('ReactClass-spec', () => {
'componentDidUpdate: true',
'mixin.componentWillUnmount: true',
'componentWillUnmount: true',
'after unmount: false',
'after unmount: false'
]);
expectDev(console.error.calls.count()).toBe(1);
+10 -10
View File
@@ -30,32 +30,32 @@ module.exports = {
output: {
library: 'createReactClass',
libraryTarget: 'umd',
filename: __DEV__ ? 'create-react-class.js' : 'create-react-class.min.js',
filename: __DEV__ ? 'create-react-class.js' : 'create-react-class.min.js'
},
externals: {
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
amd: 'react'
}
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"',
}),
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"'
})
].concat(
__DEV__
? []
: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
warnings: false
},
output: {
comments: false,
},
}),
comments: false
}
})
]
),
)
};
+1 -1
View File
@@ -48,7 +48,7 @@ var throwIIFE = [
' could not find the React object. If you are using script tags, make sure that React is being loaded before ' +
packageName +
'.")',
'})()',
'})()'
].join('');
var replace =
'($1.React?($1.React.addons=$1.React.addons||{}):' +
+1 -1
View File
@@ -41,7 +41,7 @@ function escape(key) {
var escapeRegex = /[=:]/g;
var escaperLookup = {
'=': '=0',
':': '=2',
':': '=2'
};
var escapedString = ('' + key).replace(escapeRegex, function(match) {
return escaperLookup[match];
+6 -6
View File
@@ -32,11 +32,11 @@ env.beforeEach(() => {
if (actual !== newError && !jasmine.isSpy(actual)) {
return {
pass: false,
message: 'Test did not tear down console.error mock properly.',
message: 'Test did not tear down console.error mock properly.'
};
}
return {pass: true};
},
}
};
},
toNotHaveBeenCalled() {
@@ -46,11 +46,11 @@ env.beforeEach(() => {
pass: callCount === 0,
message: 'Expected test not to warn. If the warning is expected, mock ' +
"it out using spyOn(console, 'error'); and test that the " +
'warning occurs.',
'warning occurs.'
};
},
}
};
},
}
});
});
env.afterEach(() => {
@@ -93,7 +93,7 @@ describe('createReactFragment', () => {
createReactFragment({
1: React.createElement('span'),
2: React.createElement('span'),
2: React.createElement('span')
});
expectDev(console.error.calls.count()).toBe(1);
@@ -32,32 +32,32 @@ module.exports = {
libraryTarget: 'umd',
filename: __DEV__
? 'react-addons-create-fragment.js'
: 'react-addons-create-fragment.min.js',
: 'react-addons-create-fragment.min.js'
},
externals: {
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
amd: 'react'
}
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"',
}),
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"'
})
].concat(
__DEV__
? []
: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
warnings: false
},
output: {
comments: false,
},
}),
comments: false
}
})
]
),
)
};
+3 -3
View File
@@ -79,7 +79,7 @@ var ReactStateSetters = {
// Memoize the setters.
var cache = component.__keySetters || (component.__keySetters = {});
return cache[key] || (cache[key] = createStateKeySetter(component, key));
},
}
};
function createStateKeySetter(component, key) {
@@ -131,7 +131,7 @@ ReactStateSetters.Mixin = {
*/
createStateKeySetter: function(key) {
return ReactStateSetters.createStateKeySetter(this, key);
},
}
};
/**
@@ -152,7 +152,7 @@ var LinkedStateMixin = {
this.state[key],
ReactStateSetters.createStateKeySetter(this, key)
);
},
}
};
module.exports = LinkedStateMixin;
+7 -7
View File
@@ -35,11 +35,11 @@ env.beforeEach(() => {
if (actual !== newError && !jasmine.isSpy(actual)) {
return {
pass: false,
message: 'Test did not tear down console.error mock properly.',
message: 'Test did not tear down console.error mock properly.'
};
}
return {pass: true};
},
}
};
},
toNotHaveBeenCalled() {
@@ -49,11 +49,11 @@ env.beforeEach(() => {
pass: callCount === 0,
message: 'Expected test not to warn. If the warning is expected, mock ' +
"it out using spyOn(console, 'error'); and test that the " +
'warning occurs.',
'warning occurs.'
};
},
}
};
},
}
});
});
env.afterEach(() => {
@@ -83,7 +83,7 @@ describe('LinkedStateMixin', () => {
},
render: function() {
return <input type="text" valueLink={this.linkState('message')} />;
},
}
});
const instance = ReactTestUtils.renderIntoDocument(
@@ -114,7 +114,7 @@ describe('LinkedStateMixin', () => {
return (
<input type="text" value={valueLink.value} onChange={handleChange} />
);
},
}
});
const instance = ReactTestUtils.renderIntoDocument(
@@ -32,24 +32,24 @@ module.exports = {
libraryTarget: 'umd',
filename: __DEV__
? 'react-addons-linked-state-mixin.js'
: 'react-addons-linked-state-mixin.min.js',
: 'react-addons-linked-state-mixin.min.js'
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"',
}),
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"'
})
].concat(
__DEV__
? []
: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
warnings: false
},
output: {
comments: false,
},
}),
comments: false
}
})
]
),
)
};
+1 -1
View File
@@ -18,5 +18,5 @@ module.exports = {
!shallowEqual(this.props, nextProps) ||
!shallowEqual(this.state, nextState)
);
},
}
};
+14 -14
View File
@@ -33,11 +33,11 @@ env.beforeEach(() => {
if (actual !== newError && !jasmine.isSpy(actual)) {
return {
pass: false,
message: 'Test did not tear down console.error mock properly.',
message: 'Test did not tear down console.error mock properly.'
};
}
return {pass: true};
},
}
};
},
toNotHaveBeenCalled() {
@@ -47,11 +47,11 @@ env.beforeEach(() => {
pass: callCount === 0,
message: 'Expected test not to warn. If the warning is expected, mock ' +
"it out using spyOn(console, 'error'); and test that the " +
'warning occurs.',
'warning occurs.'
};
},
}
};
},
}
});
});
env.afterEach(() => {
@@ -77,14 +77,14 @@ describe('PureRenderMixin', () => {
constructor(props, context) {
super(props, context);
this.state = {
color: 'green',
color: 'green'
};
}
render() {
return React.createElement(Apple, {
color: this.state.color,
ref: 'apple',
ref: 'apple'
});
}
}
@@ -95,27 +95,27 @@ describe('PureRenderMixin', () => {
getInitialState: function() {
return {
cut: false,
slices: 1,
slices: 1
};
},
cut: function() {
this.setState({
cut: true,
slices: 10,
slices: 10
});
},
eatSlice: function() {
this.setState({
slices: this.state.slices - 1,
slices: this.state.slices - 1
});
},
render: function() {
renderCalls++;
return React.createElement('div');
},
}
});
var instance = renderIntoDocument(React.createElement(PlasticWrap));
@@ -146,7 +146,7 @@ describe('PureRenderMixin', () => {
function getInitialState() {
return {
foo: [1, 2, 3],
bar: {a: 4, b: 5, c: 6},
bar: {a: 4, b: 5, c: 6}
};
}
@@ -163,7 +163,7 @@ describe('PureRenderMixin', () => {
render: function() {
renderCalls++;
return React.createElement('div');
},
}
});
var instance = renderIntoDocument(React.createElement(Component));
@@ -172,7 +172,7 @@ describe('PureRenderMixin', () => {
// Do not re-render if state is equal
var settings = {
foo: initialSettings.foo,
bar: initialSettings.bar,
bar: initialSettings.bar
};
instance.setState(settings);
expect(renderCalls).toBe(1);
@@ -32,24 +32,24 @@ module.exports = {
libraryTarget: 'umd',
filename: __DEV__
? 'react-addons-pure-render-mixin.js'
: 'react-addons-pure-render-mixin.min.js',
: 'react-addons-pure-render-mixin.min.js'
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"',
}),
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"'
})
].concat(
__DEV__
? []
: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
warnings: false
},
output: {
comments: false,
},
}),
comments: false
}
})
]
),
)
};
+14 -14
View File
@@ -33,11 +33,11 @@ env.beforeEach(() => {
if (actual !== newError && !jasmine.isSpy(actual)) {
return {
pass: false,
message: 'Test did not tear down console.error mock properly.',
message: 'Test did not tear down console.error mock properly.'
};
}
return {pass: true};
},
}
};
},
toNotHaveBeenCalled() {
@@ -47,11 +47,11 @@ env.beforeEach(() => {
pass: callCount === 0,
message: 'Expected test not to warn. If the warning is expected, mock ' +
"it out using spyOn(console, 'error'); and test that the " +
'warning occurs.',
'warning occurs.'
};
},
}
};
},
}
});
});
env.afterEach(() => {
@@ -150,7 +150,7 @@ describe('shallowCompare', () => {
constructor(props, context) {
super(props, context);
this.state = {
color: 'green',
color: 'green'
};
}
@@ -161,7 +161,7 @@ describe('shallowCompare', () => {
render() {
return React.createElement(Apple, {
color: this.state.color,
ref: 'apple',
ref: 'apple'
});
}
}
@@ -170,20 +170,20 @@ describe('shallowCompare', () => {
getInitialState: function() {
return {
cut: false,
slices: 1,
slices: 1
};
},
cut: function() {
this.setState({
cut: true,
slices: 10,
slices: 10
});
},
eatSlice: function() {
this.setState({
slices: this.state.slices - 1,
slices: this.state.slices - 1
});
},
@@ -194,7 +194,7 @@ describe('shallowCompare', () => {
render: function() {
renderCalls++;
return React.createElement('div');
},
}
});
var instance = renderIntoDocument(React.createElement(PlasticWrap));
@@ -225,7 +225,7 @@ describe('shallowCompare', () => {
function getInitialState() {
return {
foo: [1, 2, 3],
bar: {a: 4, b: 5, c: 6},
bar: {a: 4, b: 5, c: 6}
};
}
@@ -244,7 +244,7 @@ describe('shallowCompare', () => {
render: function() {
renderCalls++;
return React.createElement('div');
},
}
});
var instance = renderIntoDocument(React.createElement(Component));
@@ -253,7 +253,7 @@ describe('shallowCompare', () => {
// Do not re-render if state is equal
var settings = {
foo: initialSettings.foo,
bar: initialSettings.bar,
bar: initialSettings.bar
};
instance.setState(settings);
expect(renderCalls).toBe(1);
@@ -32,24 +32,24 @@ module.exports = {
libraryTarget: 'umd',
filename: __DEV__
? 'react-addons-shallow-compare.js'
: 'react-addons-shallow-compare.min.js',
: 'react-addons-shallow-compare.min.js'
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"',
}),
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"'
})
].concat(
__DEV__
? []
: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
warnings: false
},
output: {
comments: false,
},
}),
comments: false
}
})
]
),
)
};
+1 -1
View File
@@ -36,7 +36,7 @@ var ALL_COMMANDS_LIST = [
COMMAND_SPLICE,
COMMAND_SET,
COMMAND_MERGE,
COMMAND_APPLY,
COMMAND_APPLY
];
var ALL_COMMANDS_SET = {};
+8 -8
View File
@@ -29,11 +29,11 @@ env.beforeEach(() => {
if (actual !== newError && !jasmine.isSpy(actual)) {
return {
pass: false,
message: 'Test did not tear down console.error mock properly.',
message: 'Test did not tear down console.error mock properly.'
};
}
return {pass: true};
},
}
};
},
toNotHaveBeenCalled() {
@@ -43,11 +43,11 @@ env.beforeEach(() => {
pass: callCount === 0,
message: 'Expected test not to warn. If the warning is expected, mock ' +
"it out using spyOn(console, 'error'); and test that the " +
'warning occurs.',
'warning occurs.'
};
},
}
};
},
}
});
});
env.afterEach(() => {
@@ -73,7 +73,7 @@ describe('update', () => {
const collection = [1, 2, {a: [12, 17, 15]}];
const newCollection = update(collection, {
2: {a: {$splice: [[1, 1, 13, 14]]}},
2: {a: {$splice: [[1, 1, 13, 14]]}}
});
expect(collection).toEqual([1, 2, {a: [12, 17, 15]}]);
@@ -88,8 +88,8 @@ describe('update', () => {
b: {
$apply: function(x) {
return x * 2;
},
},
}
}
});
expect(newObj).toEqual({a: 5, b: 6});
+8 -8
View File
@@ -30,24 +30,24 @@ module.exports = {
output: {
library: 'update',
libraryTarget: 'umd',
filename: __DEV__ ? 'react-addons-update.js' : 'react-addons-update.min.js',
filename: __DEV__ ? 'react-addons-update.js' : 'react-addons-update.min.js'
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"',
}),
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"'
})
].concat(
__DEV__
? []
: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
warnings: false
},
output: {
comments: false,
},
}),
comments: false
}
})
]
),
)
};
+3 -3
View File
@@ -90,7 +90,7 @@ var LinkedValueUtils = {
} else if (inputProps.onChange) {
return inputProps.onChange.call(undefined, event);
}
},
}
};
function _classCallCheck(instance, Constructor) {
@@ -122,8 +122,8 @@ function _inherits(subClass, superClass) {
value: subClass,
enumerable: false,
writable: true,
configurable: true,
},
configurable: true
}
});
if (superClass) {
if (Object.setPrototypeOf) {
+9 -9
View File
@@ -29,11 +29,11 @@ env.beforeEach(() => {
if (actual !== newError && !jasmine.isSpy(actual)) {
return {
pass: false,
message: 'Test did not tear down console.error mock properly.',
message: 'Test did not tear down console.error mock properly.'
};
}
return {pass: true};
},
}
};
},
toNotHaveBeenCalled() {
@@ -43,11 +43,11 @@ env.beforeEach(() => {
pass: callCount === 0,
message: 'Expected test not to warn. If the warning is expected, mock ' +
"it out using spyOn(console, 'error'); and test that the " +
'warning occurs.',
'warning occurs.'
};
},
}
};
},
}
});
});
env.afterEach(() => {
@@ -76,7 +76,7 @@ describe('LinkedInput', function() {
const component = ReactDOM.render(
React.createElement(LinkedInput, {
value: 'foo',
onChange: noop,
onChange: noop
}),
container
);
@@ -85,7 +85,7 @@ describe('LinkedInput', function() {
ReactDOM.render(
React.createElement(LinkedInput, {
valueLink: {value: 'boo'},
requestChange: noop,
requestChange: noop
}),
container
);
@@ -98,8 +98,8 @@ describe('LinkedInput', function() {
value: 'foo',
valueLink: {
value: 'boo',
requestChange: noop,
},
requestChange: noop
}
});
expect(function() {
ReactDOM.render(element, container);
+10 -10
View File
@@ -30,32 +30,32 @@ module.exports = {
output: {
library: 'LinkedInput',
libraryTarget: 'umd',
filename: __DEV__ ? 'react-linked-input.js' : 'react-linked-input.min.js',
filename: __DEV__ ? 'react-linked-input.js' : 'react-linked-input.min.js'
},
externals: {
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
amd: 'react'
}
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"',
}),
'process.env.NODE_ENV': __DEV__ ? '"development"' : '"production"'
})
].concat(
__DEV__
? []
: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
warnings: false
},
output: {
comments: false,
},
}),
comments: false
}
})
]
),
)
};
+1 -1
View File
@@ -5,7 +5,7 @@ var spawnSync = require('child_process').spawnSync;
function runNpmCommand(dir, args) {
const result = spawnSync('npm', args, {
cwd: path.join(__dirname, dir),
stdio: 'inherit',
stdio: 'inherit'
});
if (result.status !== 0) {
process.exit('npm test exited with non-zero code.');
+3 -1
View File
@@ -40,7 +40,9 @@ const config = {
'**/node_modules/**',
],
options: {
'trailing-comma': 'es5',
// We don't compile them with Babel, and
// trailing commas break GCC.
'trailing-comma': 'none',
},
},
};