Skip to content

Commit

Permalink
WikiployLite
Browse files Browse the repository at this point in the history
  • Loading branch information
Eccenux committed Dec 21, 2023
1 parent 1d2012d commit d8a603f
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions README-wikiploy-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

This could be your `wikiploy.mjs`
```js
import { DeployConfig, Wikiploy } from 'wikiploy';
import { DeployConfig, WikiployLite } from 'wikiploy';

const ployBot = new Wikiploy();
import * as botpass from './bot.config.mjs';
const ployBot = new WikiployLite(botpass);

// run asynchronusly to be able to wait for results
(async () => {
Expand All @@ -32,15 +33,20 @@ Let's walk through above code.

This code is just to import classes defined in the Wikiploy.
```js
import { DeployConfig, Wikiploy } from 'wikiploy';
import { DeployConfig, WikiployLite } from 'wikiploy';
```

This just creates and instance of the `Wikiploy` class. Note that I'm using `const` from new-ish JavaScript (ES6).
This imports config to a `botpass` object.
```js
const ployBot = new Wikiploy();
import * as botpass from './bot.config.mjs';
```

This just creates and instance of the `WikiployLite` class. Note that I'm using `const` from new-ish JavaScript (ES6/ES2015).
```js
const ployBot = new WikiployLite(botpass);
```

This is just a bit fancy way to run asynchronously and catch errors. The `process.exit` here might be needed to finish the puppeteer process.
The next `async` part is just a bit fancy way to run asynchronously and catch errors. The `process.exit` here might be needed to finish wikiploy process (originally important for Puppeteer subprocess).
```js
(async () => {
...
Expand All @@ -57,7 +63,7 @@ This adds a single configuration (deployment specification):
dst: 'User:Nux/test-jsbot--test.js',
}));
```
You can have any number of configurations. Seriously, you could deploy a file to 100 destinations. It should just work. Wikiploy has quite robust caching, which should partially work even if you upload to multiple Wikimedia projects. And if you will use `WikiployLite` then it will be even faster.
You can have any number of configurations. Seriously, you could deploy your files to 100 destinations. It should just work.

And finally this runs deployments:
```js
Expand Down

0 comments on commit d8a603f

Please sign in to comment.