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

Commit bfb2b49

Browse files
Update README and move development instructions on separate doc
1 parent 1541b96 commit bfb2b49

File tree

2 files changed

+52
-50
lines changed

2 files changed

+52
-50
lines changed

README.md

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,12 @@
11
topcoder-cli
22
===
33

4-
# Dependencies
5-
- nodejs https://nodejs.org/en/ (v10)
6-
- npm https://www.npmjs.com/ (v6)
7-
8-
# Configuration
9-
Configuration for the application is at `config/default.js`.
10-
The following parameters can be set in config files or in env variables:
11-
12-
| Property | Environment varible | Default value | Description |
13-
| --- | --- | --- | --- |
14-
| LOG_LEVEL | LOG_LEVEL | info | control log level |
15-
| SUBMISSION_API_URL | TEST_SUBMISSION_API_URL | https://api.topcoder.com/v5/submissions | the TC submission API URL |
16-
| TC_AUTHN_URL | TC_AUTHN_URL | https://topcoder.auth0.com/oauth/ro | API that is used to fetch JWT token v2 |
17-
| TC_AUTHZ_URL | TC_AUTHZ_URL | https://api.topcoder.com/v3/authorizations | API that is used to fetch JWT token v3 |
18-
| TC_CLIENT_ID | TC_CLIENT_ID | 6ZwZEUo2ZK4c50aLPpgupeg5v2Ffxp9P | TC client ID |
19-
| TC_CLIENT_V2CONNECTION | CLIENT_V2CONNECTION | TC-User-Database | TC client connection protocol |
20-
21-
# Publish the package to npm
22-
- Create a npm account on https://www.npmjs.com/signup if you don't have one.
23-
- Use the account to sign in via cli: `npm login`
24-
- In the root directory of the project, run `npm publish --access=public` to publish the package to npm registry.
25-
26-
## Notes
27-
- In rare cases the module name would have been used by others. You may need to change the value of the `name` field in `package.json`
28-
to a unique one.
29-
- When you make changes to your code and want to update the package you'll need to update the version of the package.
30-
After that, run `npm publish` again to republish the package.
31-
- If you want to remove the package from npm registry anyway, run `npm unpublish --force` under the root directory of the project.
32-
334
# Installation
345

35-
- After you published the package to npm registry you can then install the package via npm-cli:
6+
- Install the package via npm-cli:
367

378
``` node
38-
npm install -g <your package name here>
9+
npm i -g @topcoder/topcoder-cli
3910
```
4011

4112
# Usage
@@ -51,24 +22,6 @@ An example `.topcoderrc` file should conform to at least the following structure
5122
"30095545" // at least one item here
5223
],
5324
"username": "TonyJ",
54-
"password": "appirio123"
25+
"password": "******"
5526
}
5627
```
57-
58-
# test
59-
60-
## Prepare
61-
- Install dependencies `npm install`
62-
63-
## Unit test
64-
To run unit tests alone
65-
66-
```bash
67-
npm run test
68-
```
69-
70-
To run unit tests with coverage report
71-
72-
```bash
73-
npm run test:cov
74-
```

docs/Development.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
topcoder-cli
2+
===
3+
4+
# Dependencies
5+
- nodejs https://nodejs.org/en/ (v10)
6+
- npm https://www.npmjs.com/ (v6)
7+
8+
# Configuration
9+
Configuration for the application is at `config/default.js`.
10+
The following parameters can be set in config files or in env variables:
11+
12+
| Property | Environment varible | Default value | Description |
13+
| --- | --- | --- | --- |
14+
| LOG_LEVEL | LOG_LEVEL | info | control log level |
15+
| SUBMISSION_API_URL | TEST_SUBMISSION_API_URL | https://api.topcoder.com/v5/submissions | the TC submission API URL |
16+
| TC_AUTHN_URL | TC_AUTHN_URL | https://topcoder.auth0.com/oauth/ro | API that is used to fetch JWT token v2 |
17+
| TC_AUTHZ_URL | TC_AUTHZ_URL | https://api.topcoder.com/v3/authorizations | API that is used to fetch JWT token v3 |
18+
| TC_CLIENT_ID | TC_CLIENT_ID | 6ZwZEUo2ZK4c50aLPpgupeg5v2Ffxp9P | TC client ID |
19+
| TC_CLIENT_V2CONNECTION | CLIENT_V2CONNECTION | TC-User-Database | TC client connection protocol |
20+
21+
# Publish the package to npm
22+
- Create a npm account on https://www.npmjs.com/signup if you don't have one.
23+
- Use the account to sign in via cli: `npm login`
24+
- In the root directory of the project, run `npm publish --access=public` to publish the package to npm registry.
25+
26+
## Notes
27+
- In rare cases the module name would have been used by others. You may need to change the value of the `name` field in `package.json`
28+
to a unique one.
29+
- When you make changes to your code and want to update the package you'll need to update the version of the package.
30+
After that, run `npm publish` again to republish the package.
31+
- If you want to remove the package from npm registry anyway, run `npm unpublish --force` under the root directory of the project.
32+
33+
# test
34+
35+
## Prepare
36+
- Install dependencies `npm install`
37+
38+
## Unit test
39+
To run unit tests alone
40+
41+
```bash
42+
npm run test
43+
```
44+
45+
To run unit tests with coverage report
46+
47+
```bash
48+
npm run test:cov
49+
```

0 commit comments

Comments
 (0)