-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae8be4f
commit 0d6a828
Showing
31 changed files
with
1,093 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Publish wiki | ||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- wiki/** | ||
- .github/workflows/publish-wiki.yml | ||
concurrency: | ||
group: publish-wiki | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
publish-wiki: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Andrew-Chen-Wang/github-wiki-action@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
/package-lock.json | ||
/config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/prog | ||
/assets | ||
/node_modules | ||
/.github | ||
/.vscode | ||
/wiki | ||
/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/tests/bulkwiki.js" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const fs = require('fs'); | ||
const pages = fs.readdirSync('wiki'); | ||
|
||
console.log(pages); | ||
|
||
pages.forEach(p => { | ||
let content = fs.readFileSync(`wiki/${p}`, 'utf8'); | ||
|
||
let replacers = { | ||
"paigeroid": "shysolocup", | ||
"paishee": "shysolocup", | ||
"revameg": "shysolocup", | ||
"nutmeg": "shysolocup" | ||
}; | ||
|
||
for (let [r, w] of Object.entries(replacers)) { | ||
while (content.includes(r)) { | ||
content = content.replace(r, w) | ||
} | ||
} | ||
|
||
fs.writeFileSync(`wiki/${p}`, content); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Async Chores are async functions made from strings.<br> | ||
These can be beneficial to know for some occasions | ||
```js | ||
const Class = require('aepl'); | ||
|
||
|
||
// creates a new class named Example | ||
new Class("Example", class { | ||
constructor() { | ||
this.data = [1, 2, 3]; | ||
} | ||
|
||
sleep(time) { | ||
return new Promise(resolve => setTimeout(resolve, time*1000)); | ||
} | ||
}); | ||
|
||
|
||
// creates a new chore named add using a string with function data | ||
new Example.AsyncChore("add", "number", ` | ||
console.log(this.data); // [1, 2, 3] | ||
await this.sleep(3); // waits for 3 seconds | ||
this.data.push(number); | ||
console.log(this.data); // [1, 2, 3, 4] | ||
`); | ||
|
||
|
||
// creates a new instance of the class | ||
let example = new Example(); | ||
|
||
(async () => { | ||
await example.add(4); | ||
})(); | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class.AsyncChore | ||
> description: creates a new async chore <br> | ||
> calls: | ||
> - AsyncChore/asyncChore | ||
> - AChore/aChore | ||
> | ||
> parameters: | ||
> - name `String`: name of the async chore | ||
> - ...?parameters `String`: parameters for the async chore | ||
> - value `String`: what the async chore does | ||
> | ||
> <br> | ||
> | ||
> note: too lazy to add any example for this you get it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Chores are functions made from strings.<br> | ||
These can be beneficial to know for some occasions | ||
```js | ||
const Class = require('aepl'); | ||
|
||
|
||
// creates a new class named Example | ||
new Class("Example", class { | ||
constructor() { | ||
this.data = [1, 2, 3]; | ||
} | ||
}); | ||
|
||
|
||
// creates a new chore named add using a string with function data | ||
new Example.Chore("add", "number", "this.data.push(number)"); | ||
|
||
|
||
// creates a new instance of the class | ||
let example = new Example(); | ||
|
||
console.log(example.data); // [1, 2, 3] | ||
|
||
example.add(4); | ||
|
||
console.log(example.data); // [1, 2, 3, 4] | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class.Chore | ||
> description: creates a new chore <br> | ||
> calls: | ||
> - Chore/chore | ||
> | ||
> parameters: | ||
> - name `String`: name of the chore | ||
> - ...?parameters `String`: parameters for the chore | ||
> - value `String`: what the chore does | ||
> ```js | ||
> new Class("Example", class { /* class info */ }); | ||
> | ||
> new Example.Chore("a", "function data"); | ||
> new Example.Chore("b", "arg1", "arg2" "function data"); | ||
> | ||
> let example = new Example(); | ||
> | ||
> example.a(); // runs whatever's in the function | ||
> example.b(1, 2); // runs whatever's in the function | ||
> ``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Class is the export from aepl and it's used to make new aepl classes<br> | ||
When new classes are created it automatically defines it for you unless you tell it not to | ||
```js | ||
const Class = require('aepl'); | ||
|
||
|
||
// creates a new class named Main | ||
new Class("Main", class { | ||
constructor() { | ||
this.data = [ 1, 2, 3 ]; | ||
} | ||
}); | ||
|
||
|
||
// creates a new instance of the Main class | ||
let main = new Main(); | ||
|
||
|
||
console.log(main.data); // [ 1, 2, 3 ] | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class | ||
> description: creates a new aepl class<br> | ||
> parameters: | ||
> - name `String`: name of the class | ||
> - class `Class`: class to create using | ||
> - ?autodefine `Boolean`: if the class should automatically define or not | ||
> ```js | ||
> new Class("Example1", class { /* class info */ }); | ||
> let Example2 = new Class("Example2", class { /* class info */ }, false); | ||
> | ||
> let ex1 = new Example1(); | ||
> let ex2 = new Example2(); | ||
> ``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Function is used to create new functions for your class | ||
```js | ||
const Class = require('aepl'); | ||
|
||
|
||
// creates a new class named Example | ||
new Class("Example", class { | ||
constructor() { | ||
this.data = [1, 2, 3]; | ||
} | ||
}); | ||
|
||
|
||
// creates a new function for the Example class | ||
new Example.Function("add", function(number) { | ||
return this.data.push(number); | ||
}); | ||
|
||
|
||
// creates a new instance of the class | ||
let example = new Example(); | ||
|
||
console.log(example.data); // [1, 2, 3] | ||
|
||
example.add(4); | ||
|
||
console.log(example.data); // [1, 2, 3, 4] | ||
``` | ||
|
||
<br> | ||
|
||
|
||
> ## Class.Function | ||
> description: creates a new function <br> | ||
> calls: | ||
> - Function/function | ||
> - Func/func | ||
> | ||
> parameters: | ||
> - name `String`: name of the function | ||
> - value `Any`: what the function does (usually a function but can be a normal value) | ||
> ```js | ||
> new Class("Example", class { /* class info */ }); | ||
> | ||
> new Example.Function("a", function() { /* function info */ }); | ||
> new Example.Function("b", "value"); | ||
> | ||
> let example = new Example(); | ||
> | ||
> example.a(); // runs whatever's in the function | ||
> example.b(); // returns "value" | ||
> ``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div align="center" text-align="center"> | ||
<h1>aepl wiki 🍎</h1> | ||
|
||
Welcome to the aepl wiki pages, where you can find documentation about pretty much everything.<br><br> | ||
|
||
If you have any issues, bugs or suggestions report them [here](https://github.com/paigeroid/aepl/issues) | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```console | ||
npm i aepl | ||
``` | ||
```console | ||
npm i paishee/aepl | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Properties are just good old variables inside of classes. <br> | ||
If you put a function in while creating a property it'll run that function everytime that the value is gotten<br> | ||
They can be set by overwriting them with a new value or by using Class.setProp() | ||
```js | ||
const Class = require('aepl'); | ||
|
||
|
||
// creates a new class named Example | ||
new Class("Example", class { | ||
constructor() { | ||
this.data = [1, 2, 3, 4]; | ||
} | ||
}); | ||
|
||
|
||
// creates a new property named thing that'll return "thing" | ||
new Example.Property("thing", "thing"); | ||
|
||
|
||
// creates a new property named reversed that'll return a reversed version of the data | ||
new Example.Property("reversed", function() { | ||
return this.data.reverse(); | ||
}); | ||
|
||
|
||
// creates a new instance of the class | ||
let example = new Example(); | ||
|
||
|
||
console.log(example.thing); // "thing" | ||
console.log(example.reversed); // [4, 3, 2, 1] | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class.Property | ||
> description: creates a new property <br> | ||
> calls: | ||
> - Property/property | ||
> - Prop/prop | ||
> | ||
> parameters: | ||
> - name `String`: name of the property | ||
> - value `Any`: value of the property (can be a function) | ||
> ```js | ||
> new Class("Example", class { /* class info */ }); | ||
> | ||
> new Example.Property("a", "value"); | ||
> new Example.Property("b", function() { /* property info */ }); | ||
> | ||
> let example = new Example(); | ||
> | ||
> example.a; // returns "value" | ||
> example.b; // returns whatever's in the function | ||
> ``` |
Oops, something went wrong.