Skip to content

Commit

Permalink
updated wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
shysolocup committed Sep 30, 2024
1 parent ae8be4f commit 0d6a828
Show file tree
Hide file tree
Showing 31 changed files with 1,093 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish-wiki.yml
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/package-lock.json
/config.json
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/prog
/assets
/node_modules
/.github
/.vscode
/wiki
/tests
17 changes: 17 additions & 0 deletions .vscode/launch.json
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"
}
]
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# aepl 🍎
<a href="https://www.npmjs.com/package/aepl"><img src="https://img.shields.io/npm/v/aepl?style=flat&color=red&logo=npm&logoColor=white" alt="version" />
<a href="https://www.npmjs.com/package/aepl"><img src="https://img.shields.io/npm/dt/aepl?style=flat&color=green&logo=docusign&logoColor=white" alt="downloads" />
<a href="https://github.com/paishee/aepl/wiki"><img src="https://img.shields.io/badge/documentation-tapel?color=blue&logo=gitbook&logoColor=white" alt="docs" /></a>
<img src="https://github.com/paishee/aepl/actions/workflows/publish-shit.yml/badge.svg" alt="publish">
<a href="https://github.com/shysolocup/aepl/wiki"><img src="https://img.shields.io/badge/documentation-tapel?color=blue&logo=gitbook&logoColor=white" alt="docs" /></a>
<img src="https://github.com/shysolocup/aepl/actions/workflows/publish-shit.yml/badge.svg" alt="publish">

aepl is a Node.JS multi-layered class creation package with built-in parenting systems that let you get info from classes above as well as better function and property makers for easier to read and understand development and modding support inspired by Roblox's Studio API.
- Open source
Expand All @@ -16,7 +16,7 @@ aepl is a Node.JS multi-layered class creation package with built-in parenting s
npm i aepl
```
```console
npm i paishee/aepl
npm i shysolocup/aepl
```


Expand Down
23 changes: 23 additions & 0 deletions tests/bulkwiki.js
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);
});
53 changes: 53 additions & 0 deletions wiki/AsyncChore.md
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
50 changes: 50 additions & 0 deletions wiki/Chore.md
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
> ```
36 changes: 36 additions & 0 deletions wiki/Classes.md
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();
> ```
52 changes: 52 additions & 0 deletions wiki/Function.md
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"
> ```
8 changes: 8 additions & 0 deletions wiki/Home.md
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>
6 changes: 6 additions & 0 deletions wiki/Installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```console
npm i aepl
```
```console
npm i paishee/aepl
```
55 changes: 55 additions & 0 deletions wiki/Property.md
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
> ```
Loading

0 comments on commit 0d6a828

Please sign in to comment.