Skip to content

Commit f628b85

Browse files
committed
CODE: Refactor and spawn into a separate library TC-related actions/reducers/services
Submission 253940 by liuliquan to the challenge https://www.topcoder.com/challenges/30064737
0 parents  commit f628b85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+36195
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["topcoder-react-utils/config/babel/node-ssr"]
3+
}

.circleci/config.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: 2
2+
jobs:
3+
# Release.
4+
# TODO: Probably, it is possible to reuse the test job below as a part of
5+
# the release job; but as I don't know how to do it at the moment, let's
6+
# just dublicate the logic for now.
7+
release:
8+
docker:
9+
- image: circleci/node:8.9.4
10+
steps:
11+
- checkout
12+
- restore_cache:
13+
# Careful here, though, at the moment, there should be no problem
14+
# to reuse the same cache of "node_modules" between test and release
15+
# jobs.
16+
key: test-node-modules-{{ checksum "package-lock.json" }}
17+
- run: npm install
18+
- save_cache:
19+
key: test-node-modules-{{ checksum "package-lock.json" }}
20+
paths:
21+
- node_modules
22+
- run: npm test
23+
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
24+
- run: npm publish
25+
26+
# Just tests commited code.
27+
test:
28+
docker:
29+
- image: circleci/node:8.9.4
30+
steps:
31+
- checkout
32+
- restore_cache:
33+
key: test-node-modules-{{ checksum "package-lock.json" }}
34+
- run: npm install
35+
- save_cache:
36+
key: test-node-modules-{{ checksum "package-lock.json" }}
37+
paths:
38+
- node_modules
39+
- run: npm test
40+
41+
workflows:
42+
version: 2
43+
build:
44+
jobs:
45+
- release:
46+
filters:
47+
branches:
48+
only: master
49+
- test:
50+
filters:
51+
branches:
52+
ignore: master
53+

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__coverage__
2+
dist
3+
node_modules

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/topcoder-react-utils/config/eslint/default.json"
3+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
__coverage__
2+
.build-info
3+
.sass-cache
4+
dist
5+
node_modules

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v8.11.1

.stylelintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "topcoder-react-utils/config/stylelint/default"
3+
}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Topcoder React Lib
2+
3+
### v0.0.x
4+
Pre-release drafts of the initial library version. A big journey starts here.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Topcoder React Lib
2+
3+
The [Topcoder](https://www.topcoder.com) lib for internal ReactJS projects.
4+
5+
### Development
6+
```shell
7+
# Install dependencies
8+
npm install
9+
10+
# Run test & build
11+
npm test
12+
npm run build
13+
14+
# Go to other project which depends on the topcoder-react-lib, config its package.json so
15+
# that the 'topcoder-react-lib' points to the local foler path of topcoder-react-lib:
16+
#
17+
# "dependencies": {
18+
# "topcoder-react-lib": "<local-path-to-topcoder-react-lib>",
19+
# ......
20+
# }
21+
#
22+
```
23+
24+
### License
25+
UNLICENSED &mdash; for internal Topcoder projects only.

__tests__/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["topcoder-react-utils/config/babel/node-ssr"]
3+
}

0 commit comments

Comments
 (0)