wikiploy 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEV.md +49 -0
- package/package.json +2 -2
package/DEV.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Development
|
|
2
|
+
==========================
|
|
3
|
+
|
|
4
|
+
Wikiploy is a Node.js project and is configured to use VSCode for development.
|
|
5
|
+
|
|
6
|
+
## Prepararion
|
|
7
|
+
|
|
8
|
+
### Install Node
|
|
9
|
+
Obviously you'll need [Node.JS](https://nodejs.org/en).
|
|
10
|
+
Node 12+ should be fine, but I would probably recommend latest LTS version.
|
|
11
|
+
|
|
12
|
+
Note that you can use [NVM-windows](https://github.com/coreybutler/nvm-windows) if you need multiple Node.js versions installed on Windows.
|
|
13
|
+
|
|
14
|
+
### Install modules
|
|
15
|
+
Run first `npm i`.
|
|
16
|
+
You might want to run `npm up` to update some scripts too.
|
|
17
|
+
|
|
18
|
+
Recomended global modules/tools:
|
|
19
|
+
```
|
|
20
|
+
npm install -g eslint
|
|
21
|
+
npm install -g mocha
|
|
22
|
+
```
|
|
23
|
+
You mostly need above if you will be using your shell (command line).
|
|
24
|
+
|
|
25
|
+
## Running tests
|
|
26
|
+
To run tests in your shell you can use npm: `npm test`. Or just run `mocha`.
|
|
27
|
+
|
|
28
|
+
Better yet install [VSCode](https://code.visualstudio.com/download) and the recommended extenstions. It will make things easier (especially for debugging tests).
|
|
29
|
+
|
|
30
|
+
In VSC, you should see a laboratory flask icon on the sidebar. From there, you can run individual tests or all at once.
|
|
31
|
+
Note that you might need to reload the testing sidebar to see all tests, especially after adding new test files.
|
|
32
|
+
To view output of individual tests use the testing sidebar. Navigate to the test and click on it.
|
|
33
|
+
|
|
34
|
+
You can also run (and debug) each test case directly from a test file. You might need to press reload in the sidebar if you don't see buttons to run and debug tests.
|
|
35
|
+
|
|
36
|
+
## Publishing
|
|
37
|
+
|
|
38
|
+
Step. 1. Check.
|
|
39
|
+
```
|
|
40
|
+
npm test
|
|
41
|
+
```
|
|
42
|
+
Step. 2. Change version in the package.
|
|
43
|
+
|
|
44
|
+
Step. 3. Final commands.
|
|
45
|
+
```
|
|
46
|
+
npm up
|
|
47
|
+
npm test
|
|
48
|
+
npm publish
|
|
49
|
+
```
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiploy",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "User scripts and gadgets deployment for MediaWiki (Wikipedia).",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "
|
|
8
|
+
"test": "mocha"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|