Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7a0808b

Browse files
committed
Update to the latest topcoder-react-utils
1 parent 7122d49 commit 7a0808b

File tree

10 files changed

+7512
-5760
lines changed

10 files changed

+7512
-5760
lines changed

.npmignore

Whitespace-only changes.

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Topcoder React UI Kit Changelog
22

3+
### v0.4.0
4+
Update to the latest **topcoder-react-utils**, and also better way to pack
5+
the library for release.
6+
7+
**Breaking Changes:**
8+
- This version of the library requires a new way to include its global
9+
stylesheet into the host code.
10+
11+
You should replace, in the root ReactJS component of your app, this:
12+
```jsx
13+
import 'topcoder-react-ui-kit/dist/style.css';
14+
```
15+
16+
with this:
17+
```jsx
18+
/* eslint-disable global-require */
19+
if (process.env.NODE_ENV === 'production') {
20+
require('topcoder-react-ui-kit/dist/prod/style.css');
21+
} else {
22+
require('topcoder-react-ui-kit/dist/dev/style.css');
23+
}
24+
/* eslint-enable global-require */
25+
```
26+
327
### v0.3.0
428
Update of dependencies. Should not introduce breaking changes, but, just in
529
case, tagged as minor version update.

config/webpack/development.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
const configFactory
2-
= require('topcoder-react-utils/config/webpack/lib-development');
1+
const configFactory = require('topcoder-react-utils/config/webpack/lib-development');
32
const path = require('path');
43

54
const standardConfig = configFactory({

config/webpack/production.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
const configFactory
2-
= require('topcoder-react-utils/config/webpack/lib-production');
1+
const configFactory = require('topcoder-react-utils/config/webpack/lib-production');
32
const path = require('path');
43

54
const standardConfig = configFactory({

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Entry point of the library.
3+
*
4+
* Depending on NODE_ENV variable, it loads development or production build
5+
* of the library.
6+
*/
7+
/* eslint-disable global-require, import/no-unresolved */
8+
9+
if (process.env.NODE_ENV === 'production') {
10+
module.exports = require('./dist/prod');
11+
} else {
12+
module.exports = require('./dist/dev');
13+
}

0 commit comments

Comments
 (0)