Initial commit

This commit is contained in:
Projects 2025-07-18 17:52:18 +00:00
commit 3e4f067c08
9 changed files with 143 additions and 0 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# TypeScript output
dist/
build/
*.tsbuildinfo
# Node modules
node_modules/
# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# System files
.DS_Store
Thumbs.db
# IDE stuff
.vscode/
.idea/
*.swp
# Env stuff
.env

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# template npm module
wapwapfly woooooooooooooooooooooo

39
push Executable file
View File

@ -0,0 +1,39 @@
#!/bin/bash
set -e
# 📁 Directories
ROOT_DIR="$(dirname "$0")"
SOURCE_DIR="$ROOT_DIR/source"
BUILD_DIR="$ROOT_DIR/build"
cd "$ROOT_DIR"
# 🔐 Load secrets
if [ -f .env ]; then
echo "📦 Loading .env..."
export $(grep -v '^#' .env | xargs)
else
echo "⚠️ .env file not found."
fi
# 🧼 Reset build
echo "🧹 Cleaning build dir..."
rm -rf "$BUILD_DIR"
mkdir -p "$BUILD_DIR"
# 📦 Copy entire source
echo "📁 Copying full source into build..."
cp -r "$SOURCE_DIR"/* "$BUILD_DIR"/
cp -r "$ROOT_DIR"/README.md "$BUILD_DIR"/
# 🔧 Build inside build dir
cd "$BUILD_DIR"
echo "🛠 Building in build dir..."
rm -rf dist
npx --yes tsc
# 🚀 Publish
echo "🚀 Publishing to Gitea registry..."
npm publish \
--registry=https://git.chipperfluff.at/api/packages/projects/npm/ \
--//git.chipperfluff.at/api/packages/projects/npm/:_authToken="$NPM_TOKEN"

5
source/.npmignore Normal file
View File

@ -0,0 +1,5 @@
src/
test.ts
tsconfig.json
*.log
node_modules/

30
source/package-lock.json generated Normal file
View File

@ -0,0 +1,30 @@
{
"name": "testosmaximus",
"version": "1.0.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "testosmaximus",
"version": "1.0.8",
"license": "ISC",
"devDependencies": {
"typescript": "^5.8.3"
}
},
"node_modules/typescript": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
}
}
}

22
source/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "@testosmaximus/testosmaximus",
"version": "1.0.8",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsc"
},
"keywords": [],
"author": "",
"license": "ISC",
"publishConfig": {
"registry": "https://git.chipperfluff.at/api/packages/projects/npm/"
},
"devDependencies": {
"typescript": "^5.8.3"
}
}

3
source/src/index.ts Normal file
View File

@ -0,0 +1,3 @@
export function crackNut(nut: string): string {
return `*CRACK!* The ${nut} has been broken by pure TypeScript violence.`;
}

3
source/test.ts Normal file
View File

@ -0,0 +1,3 @@
import { crackNut } from './src/index';
console.log(crackNut('hazelnut'));

14
source/tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"moduleResolution": "Node",
"outDir": "dist",
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
},
"include": ["src"]
}