diff --git a/index.js b/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/push b/push new file mode 100755 index 0000000..a18a96b --- /dev/null +++ b/push @@ -0,0 +1,27 @@ +#!/bin/bash +set -e + +# πŸšͺ Move into the NPM project directory +cd "$(dirname "$0")/source" + +# πŸ” Load secrets from root .env +echo "πŸ“¦ Loading .env from root dir" +export $(grep -v '^#' ../.env | xargs) + +# 🧼 Clean (optional) +echo "🧹 Cleaning dist (if exists)..." +rm -rf dist || true + +# πŸ› οΈ Build if tsc is present +if npx --no-install tsc --version > /dev/null 2>&1; then + echo "πŸ› οΈ Building with tsc..." + npx tsc +else + echo "⚠️ No TypeScript build step found. Skipping..." +fi + +# πŸš€ Publish to Gitea registry using token from .env +echo "πŸš€ Publishing to Gitea NPM registry..." +npm publish \ + --registry=https://git.chipperfluff.at/api/packages/projects/npm/ \ + --//git.chipperfluff.at/api/packages/projects/npm/:_authToken="$NPM_TOKEN" diff --git a/.npmignore b/source/.npmignore similarity index 100% rename from .npmignore rename to source/.npmignore diff --git a/source/.npmrc b/source/.npmrc new file mode 100644 index 0000000..96738d2 --- /dev/null +++ b/source/.npmrc @@ -0,0 +1,3 @@ +source .env +npm set registry https://git.chipperfluff.at/api/packages/projects/npm/ +npm set //git.chipperfluff.at/api/packages/projects/npm/:_authToken=$GITEA_TOKEN diff --git a/source/README.md b/source/README.md new file mode 100644 index 0000000..e3cee8e --- /dev/null +++ b/source/README.md @@ -0,0 +1,62 @@ +# 🧠 testosMaximus + +> *Infused with maximus testus energy.* + +testosMaximus is a TypeScript-powered nut-cracker module forged in the sacred tree hollows of fluffy vengeance. +Designed for one purpose: **to break things**. Like nuts. And maybe reality. + +--- + +## 🌰 Usage + +```ts +import { crackNut } from "testosmaximus"; + +console.log(crackNut("pecan")); +// β†’ *CRACK!* The pecan has been broken by pure TypeScript violence. +```` + +--- + +## πŸš€ Features + +* ⚑ Written in TypeScript (because normal JS was too weak) +* πŸ’₯ Cracks any nut, figuratively or literally +* πŸ§ͺ Powered by maximus testus energy (patent pending) +* 🐿️ Developed by a possibly overcaffeinated squirrel + +--- + +## πŸ“¦ Install + +If you're brave enough: + +```bash +npm install testosmaximus +``` + +Or from your private squirrel registry: + +```bash +npm install --registry=http://localhost:4873 testosmaximus +``` + +--- + +## πŸ”¬ API + +### `crackNut(nut: string): string` + +Cracks the given nut and returns a glorious message of destruction. + +--- + +## πŸͺ΅ License + +MIT – Break whatever you want. Just clean up after. + +--- + +## 🐿️ Author + +testosMaximus, child of the forest, breaker of shells, wielded by Maximus Testus Energyβ„’ diff --git a/source/package-lock.json b/source/package-lock.json new file mode 100644 index 0000000..01cc235 --- /dev/null +++ b/source/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "testosmaximus", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "testosmaximus", + "version": "1.0.0", + "license": "ISC" + } + } +} diff --git a/package.json b/source/package.json similarity index 63% rename from package.json rename to source/package.json index ea66e53..e950206 100644 --- a/package.json +++ b/source/package.json @@ -8,5 +8,8 @@ }, "keywords": [], "author": "", - "license": "ISC" + "license": "ISC", + "publishConfig": { + "registry": "https://git.chipperfluff.at/api/packages/projects/npm/" + } } diff --git a/src/index.ts b/source/src/index.ts similarity index 100% rename from src/index.ts rename to source/src/index.ts diff --git a/test.ts b/source/test.ts similarity index 100% rename from test.ts rename to source/test.ts diff --git a/tsconfig.json b/source/tsconfig.json similarity index 100% rename from tsconfig.json rename to source/tsconfig.json