archy-framework 1.0.1

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.
@@ -0,0 +1,47 @@
1
+ name: Fluxur Commit Notifier
2
+
3
+ on:
4
+ push:
5
+
6
+ jobs:
7
+ notify:
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - name: Send clean message to Fluxer
12
+ env:
13
+ WEBHOOK_URL: ${{ secrets.FLUXUR_WEBHOOK }}
14
+ REPO: ${{ github.repository }}
15
+ ACTOR: ${{ github.actor }}
16
+ COMMIT_MSG: ${{ github.event.head_commit.message }}
17
+ COMMIT_URL: ${{ github.event.head_commit.url }}
18
+ run: |
19
+ curl -X POST "$WEBHOOK_URL" \
20
+ -H "Content-Type: application/json" \
21
+ -d "{
22
+ \"content\": \"🚀 New commit pushed\nRepo: $REPO\nAuthor: $ACTOR\nCommit: $COMMIT_MSG\nURL: $COMMIT_URL\",
23
+ \"username\": \"GitHub Bot\"
24
+ }"name: Fluxur Commit Notifier
25
+
26
+ on:
27
+ push:
28
+
29
+ jobs:
30
+ notify:
31
+ runs-on: ubuntu-latest
32
+
33
+ steps:
34
+ - name: Send clean message to Fluxer
35
+ env:
36
+ WEBHOOK_URL: ${{ secrets.FLUXUR_WEBHOOK }}
37
+ REPO: ${{ github.repository }}
38
+ ACTOR: ${{ github.actor }}
39
+ COMMIT_MSG: ${{ github.event.head_commit.message }}
40
+ COMMIT_URL: ${{ github.event.head_commit.url }}
41
+ run: |
42
+ curl -X POST "$WEBHOOK_URL" \
43
+ -H "Content-Type: application/json" \
44
+ -d "{
45
+ \"content\": \"🚀 New commit pushed\nRepo: $REPO\nAuthor: $ACTOR\nCommit: $COMMIT_MSG\nURL: $COMMIT_URL\",
46
+ \"username\": \"GitHub Bot\"
47
+ }"
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 C3real
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ <p align="center">
2
+ <img src="public/assets/logo.png" alt="Logo" width="200">
3
+ </p>
4
+
5
+ ![Status](https://img.shields.io/badge/STATUS-Good-brightgreen)
6
+ ![NPM](https://img.shields.io/badge/VERSION-1.0.0-blue)
7
+ ![License](https://img.shields.io/badge/LICENSE-MIT-green)
8
+
9
+ # Archy.JS
10
+ Archy.JS is a utility framework mainly focused on improving understandability, and readability, as well as giving it a more professional look. Some features may be irrelevant, but still provide important functions.
11
+
12
+ ## What happened to Vector.js?
13
+ There's already a framework named Vector.js.
14
+
15
+ ## Example
16
+
17
+ ```javascript
18
+ import { app } from "../src/index.js";
19
+ import "../src/api/archy.js"
20
+
21
+ app.getDomID("test").innerText = "Hello World!";
22
+ ````
23
+
24
+ ## Developer Notice
25
+ To test out a feature via http server, run:
26
+ ```bash
27
+ archy start
28
+ ```
29
+
30
+
package/bin/archy.js ADDED
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { exec, spawn } from "child_process";
4
+ import fs from "fs";
5
+ import path from "path";
6
+
7
+ const args = process.argv.slice(2);
8
+ const latest_build_version = "1.0.1"
9
+
10
+ const command = args[0];
11
+ const flag = args[1];
12
+
13
+ if (command === "-start") {
14
+
15
+ console.log("[Archy] Starting dev server on port 8000...");
16
+
17
+ const server = spawn(
18
+ "python3",
19
+ ["-m", "http.server", "8000"],
20
+ {
21
+ stdio: "inherit"
22
+ }
23
+ );
24
+
25
+ server.on("close", (code) => {
26
+ console.log(`[Archy] Server exited with code ${code}`);
27
+ });
28
+
29
+ }
30
+
31
+ if (command == "-version") {
32
+ console.log(`[Archy] version ${latest_build_version}`);
33
+ }
34
+
35
+ if (command == "-plugins") {
36
+ try {
37
+ const pluginsDir = path.join(process.cwd(), "plugins");
38
+
39
+ if (!fs.existsSync(pluginsDir)) {
40
+ console.log('[Archy] No plugins directory found at ./plugins/');
41
+ } else {
42
+ const entries = fs.readdirSync(pluginsDir, { withFileTypes: true });
43
+ const pluginNames = entries
44
+ .filter(e => e.isDirectory() || e.isFile())
45
+ .map(e => e.name);
46
+
47
+ if (pluginNames.length === 0) {
48
+ console.log('[Archy] No plugins found in ./plugins/');
49
+ } else {
50
+ console.log('[Archy] Plugins:');
51
+ pluginNames.forEach(n => console.log(` - ${n}`));
52
+ }
53
+ }
54
+ } catch (err) {
55
+ console.error('[Archy] Error reading plugins:', err.message || err);
56
+ }
57
+ }
58
+
59
+ if (command == "help") {
60
+ console.log("[Archy]: archy -start to start a server");
61
+ console.log("[Archy]: archy -version to see current version");
62
+ console.log("[Archy]: archy -plugins to see all plugins in ./plugins/");
63
+ console.log("[Archy]: archy -commit to commit changes to git");
64
+ }
65
+
66
+ if (command == "-commit") {
67
+ spawn("./scripts/commit.sh", [], { stdio: "inherit" });
68
+ }
@@ -0,0 +1,9 @@
1
+ You may introduce your self here by displaying your name or username, email, and country/state.
2
+ Suggest using this format below for a clean and organized display:
3
+
4
+ name/userame - country, state
5
+ username@gmail.com
6
+
7
+
8
+ crashcourse14 - Texas, The States.
9
+ haydyncm@gmail.com
@@ -0,0 +1,10 @@
1
+ import { archy } from "../src/index.js";
2
+ import "../lib/lib.js"
3
+
4
+ archy.getDomID("title").innerText = "Vector.JS";
5
+
6
+ archy.setClassList({
7
+ id: "title",
8
+ classList: "important"
9
+ })
10
+
package/help.md ADDED
@@ -0,0 +1,52 @@
1
+ # HELP
2
+ Use this as a reference if you want to learn, or simply forget how to do something.
3
+
4
+ ## DOM API
5
+ ```javascript
6
+
7
+ const a = app.getDomID(id);
8
+ const b = app.getDomsID(id);
9
+ const c = app.getDomClass(class);
10
+ const d = app.getDomsClass(class);
11
+ const e = app.getDomsTag(tag);
12
+
13
+ app.addClassList({
14
+ id: "id",
15
+ classList: "class"
16
+ });
17
+
18
+ app.rmvClassList({
19
+ id: "id"
20
+ classList: "class"
21
+ });
22
+
23
+ ```
24
+
25
+ ## SCAFFOLDING
26
+
27
+ ```javascript
28
+
29
+ app.const("Human", {
30
+ name: "John",
31
+ age: "30"
32
+ //add more things about this constant
33
+ });
34
+
35
+ app.function("name", (name) => {
36
+ //function
37
+ });
38
+
39
+ app.function.name(arg); //if you want to use the app.const constant, use: ${app.constant.name.argument}
40
+
41
+ ```
42
+
43
+ ## MATH
44
+
45
+ ```javascript
46
+
47
+ const f = app.ceil(number);
48
+ const g = app.round(number);
49
+ const h = app.trunc(number);
50
+ const i = app.floor(number);
51
+
52
+ ```
package/lib/lib.js ADDED
@@ -0,0 +1,16 @@
1
+ export * from "../src/api/getDomClass.js"
2
+ export * from "../src/api/getDomsClass.js"
3
+ export * from "../src/api/getDomID.js"
4
+ export * from "../src/api/getDomsID.js"
5
+ export * from "../src/api/createDom.js"
6
+ export * from "../src/api/getDomsTag.js"
7
+ export * from "../src/api/setClassList.js"
8
+ export * from "../src/api/rmvClassList.js"
9
+ export * from "../src/window/openWindow.js"
10
+ export * from "../src/math/round.js"
11
+ export * from "../src/math/floor.js"
12
+ export * from "../src/math/ceil.js"
13
+ export * from "../src/math/trunc.js"
14
+ export * from "../src/scaffold/function.js"
15
+ export * from "../src/scaffold/constant.js"
16
+
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "archy-framework",
3
+ "version": "1.0.1",
4
+ "description": "A lightweight JavaScript framework for DOM and networking utilities.",
5
+ "main": "src/index.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "start": "archy -start",
9
+ "version": "archy -version",
10
+ "build": "archy -start",
11
+ "plugins": "archy -plugins",
12
+ "commit": "archy -commit"
13
+ },
14
+ "bin": {
15
+ "archy": "./bin/archy.js"
16
+ },
17
+ "keywords": [
18
+ "framework",
19
+ "javascript",
20
+ "dom",
21
+ "networking",
22
+ "archy"
23
+ ],
24
+ "author": "C3realCodes",
25
+ "license": "MIT",
26
+ "dependencies": {},
27
+ "devDependencies": {}
28
+ }
@@ -0,0 +1,11 @@
1
+
2
+ //NEEDED or else it WON'T WORK.
3
+ import { app } from "../src/index.js";
4
+
5
+ export const AUTHOR = "C3real";
6
+ export const DESCRIPTION = "This is an example plugin for Archy.JS. It adds a simple alert function to the app.";
7
+
8
+ //Start off by defining "app" then the function as in app.function.
9
+ app.alert = function(message) {
10
+ alert(message);
11
+ }
@@ -0,0 +1,2 @@
1
+ ## How to use a plugin
2
+ Add the file(s) to this directory, then go to your main file, and add a import statment from the plugin files you're using.
Binary file
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Vector Test</title>
5
+ <link rel="stylesheet" href="style.css">
6
+ </head>
7
+ <body>
8
+
9
+ <h1 id="title">Hello World</h1>
10
+ <h1 id="title2">Hello World</h1>
11
+ <h1 id="title3">Hello World</h1>
12
+
13
+ <script type="module" src="script.js"></script>
14
+
15
+ </body>
16
+ </html>
@@ -0,0 +1,33 @@
1
+ import { app } from "../src/index.js";
2
+ import "../lib/lib.js"
3
+
4
+ // This is from the plugin
5
+ import "../plugins/example.js"
6
+ app.alert("hello") //Should probably make this native to the app, but for now it's just an example of how to use plugins.
7
+
8
+ app.getDomID("title").innerText = "Archy.JS";
9
+
10
+ app.setClassList({
11
+ id: "title",
12
+ classList: "important"
13
+ })
14
+
15
+ app.const("Human", {
16
+ name: "John",
17
+ age: "30"
18
+ //more things about human
19
+ });
20
+
21
+ app.function("greet", (name) => {
22
+ alert(`Hello, ${name}!`);
23
+ });
24
+
25
+ //app.function.greet(app.const.Human.name);
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
@@ -0,0 +1,4 @@
1
+ .important {
2
+ font-size: 40px;
3
+ color: blue;
4
+ }
@@ -0,0 +1,10 @@
1
+ author=$(git log -1 --pretty=%an)
2
+
3
+ echo "Commit Message:"
4
+ read COMMIT_MSG
5
+
6
+ git init
7
+ git add .
8
+ git commit -m "[$author]: $COMMIT_MSG"
9
+
10
+ git push
@@ -0,0 +1,22 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.createDom = function({id, className }) {
4
+
5
+ const element = document.createElement("div");
6
+
7
+ if (id) {
8
+ element.id = id;
9
+ } else {
10
+ throw new Error("[createDom] [VDAPI] createDom return an ID that is null!");
11
+ }
12
+
13
+ if (className) {
14
+ element.className = className;
15
+ } else {
16
+ throw new Error("[createDom] [VDAPI] createDom return a class name that is null!");
17
+ }
18
+
19
+ document.body.appendChild(element);
20
+
21
+ return element;
22
+ };
@@ -0,0 +1,11 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.getDomClass = function(className) {
4
+ const element = document.getElementByClassName(className);
5
+
6
+ if (!element) {
7
+ throw new Error(`[getDomClass] [VDAPI] archy.getDomClass returned a null class!`);
8
+ }
9
+
10
+ return element;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.getDomID = function(id) {
4
+ const element = document.getElementById(id);
5
+
6
+ if (!element) {
7
+ throw new Error(`[getDomID] [VDAPI] archy.getDomID returned null`);
8
+ }
9
+
10
+ return element;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.getDomClass = function(className) {
4
+ const element = document.getElementsByClassName(className);
5
+
6
+ if (!element) {
7
+ throw new Error(`[getDomClass] [VDAPI] archy.getDomsClass returned (a) null class(es)!`);
8
+ }
9
+
10
+ return element;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.getDomID = function(id) {
4
+ const element = document.getElementById(id);
5
+
6
+ if (!element) {
7
+ throw new Error(`[getDomsID] [VDAPI] archy.getDomsID returned (a) null id(s)`);
8
+ }
9
+
10
+ return element;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.getDomTags = function(tagNames) {
4
+ const element = document.getElementsByTagName(tagNames);
5
+
6
+ if (!element) {
7
+ throw new Error(`[getDomsTag] [VDAPI] archy.getDomsTag returned (a) null tag(s)!`)
8
+ }
9
+
10
+ return element;
11
+ }
@@ -0,0 +1,13 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.rmvClassList = function({id, classListName}) {
4
+ const element = document.getElementById(id);
5
+
6
+ if (!id) {
7
+ throw new Error(`[setClassList] [VAPI] archy.setClassList returned an ID that is null!`);
8
+ }
9
+
10
+ element.classList.remove(classListName);
11
+
12
+ return element;
13
+ }
@@ -0,0 +1,13 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.setClassList = function({id, classList}) {
4
+ const element = document.getElementById(id);
5
+
6
+ if (!id) {
7
+ throw new Error(`[setClassList] [VAPI] archy.setClassList returned an ID that is null!`);
8
+ }
9
+
10
+ element.classList.add(classList);
11
+
12
+ return element;
13
+ }
package/src/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export const app = {};
2
+ export const archy = {};
@@ -0,0 +1,9 @@
1
+ import { archy } from "../index.js"
2
+
3
+ archy.ceil = function(number) {
4
+ if (typeof number !== "number") {
5
+ throw new Error(`[ceil] [VMATH] archy.ceil expected a number!`);
6
+ }
7
+
8
+ return Math.ceil(number);
9
+ }
@@ -0,0 +1,10 @@
1
+ import { archy } from "../index.js"
2
+
3
+ archy.floor = function(number) {
4
+
5
+ if (typeof number !== "number") {
6
+ throw new Error(`[floor] [VMATH] expected a number in archy.floor() but it returned null.`)
7
+ }
8
+
9
+ return Math.floor(number);
10
+ }
@@ -0,0 +1,10 @@
1
+ import { archy } from "../index.js"
2
+
3
+ archy.round = function(number) {
4
+
5
+ if (typeof number !== "number") {
6
+ throw new Error(`[round] [VMATH] expected a number in archy.round() but it returned null.`)
7
+ }
8
+
9
+ return Math.round(number);
10
+ }
@@ -0,0 +1,10 @@
1
+ import { archy } from "../index.js"
2
+
3
+ archy.trunc = function(number) {
4
+
5
+ if (typeof number !== "number") {
6
+ throw new Error(`[trunc] [VMATH] expected a number in archy.trunc() but it returned null.`)
7
+ }
8
+
9
+ return Math.trunc(number);
10
+ }
@@ -0,0 +1,3 @@
1
+ app.function hello(argument) {
2
+
3
+ }
@@ -0,0 +1,14 @@
1
+ import { app } from "../index.js";
2
+
3
+ app.const = function(name, value) {
4
+ if (app.const[name]) {
5
+ throw new Error(`[const] [VDAPI] app.const returned a duplicate constant!`);
6
+ }
7
+
8
+ Object.defineProperty(app.const, name, {
9
+ value: value,
10
+ writable: false,
11
+ configurable: false
12
+ });
13
+ }
14
+
@@ -0,0 +1,14 @@
1
+ import { app } from "../index.js";
2
+
3
+ app.function = function(name, fn) {
4
+ if (app.function[name]) {
5
+ throw new Error(`[function] [Archy] app.function returned a duplicate function!`);
6
+ }
7
+
8
+ Object.defineProperty(app.function, name, {
9
+ value: fn,
10
+ writable: false,
11
+ configurable: false
12
+ });
13
+ }
14
+
@@ -0,0 +1,12 @@
1
+ import { app } from "../index.js"
2
+
3
+ app.openWindow = function({url, args}) {
4
+
5
+ if (!args) {
6
+ return;
7
+ }
8
+
9
+ return window.open(url, "_blank", args);
10
+ }
11
+
12
+