Update project configuration and version to 1.0.5
- Add 'build/' to .gitignore - Refactor push script for improved directory management and build process - Update package.json and package-lock.json to version 1.0.5 - Change TypeScript module setting to CommonJS in tsconfig.json
This commit is contained in:
parent
a07d767a37
commit
bb8a36ad0d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
# TypeScript output
|
# TypeScript output
|
||||||
dist/
|
dist/
|
||||||
|
build/
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
# Node modules
|
# Node modules
|
||||||
|
|||||||
43
push
43
push
@ -1,27 +1,38 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# 🚪 Move into the NPM project directory
|
# 📁 Directories
|
||||||
cd "$(dirname "$0")/source"
|
ROOT_DIR="$(dirname "$0")"
|
||||||
|
SOURCE_DIR="$ROOT_DIR/source"
|
||||||
|
BUILD_DIR="$ROOT_DIR/build"
|
||||||
|
|
||||||
# 🔐 Load secrets from root .env
|
cd "$ROOT_DIR"
|
||||||
echo "📦 Loading .env from root dir"
|
|
||||||
export $(grep -v '^#' ../.env | xargs)
|
|
||||||
|
|
||||||
# 🧼 Clean (optional)
|
# 🔐 Load secrets
|
||||||
echo "🧹 Cleaning dist (if exists)..."
|
if [ -f .env ]; then
|
||||||
rm -rf dist || true
|
echo "📦 Loading .env..."
|
||||||
|
export $(grep -v '^#' .env | xargs)
|
||||||
# 🛠️ Build if tsc is present
|
|
||||||
if npx --no-install tsc --version > /dev/null 2>&1; then
|
|
||||||
echo "🛠️ Building with tsc..."
|
|
||||||
npx tsc
|
|
||||||
else
|
else
|
||||||
echo "⚠️ No TypeScript build step found. Skipping..."
|
echo "⚠️ .env file not found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 🚀 Publish to Gitea registry using token from .env
|
# 🧼 Reset build
|
||||||
echo "🚀 Publishing to Gitea NPM registry..."
|
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"/
|
||||||
|
|
||||||
|
# 🔧 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 \
|
npm publish \
|
||||||
--registry=https://git.chipperfluff.at/api/packages/projects/npm/ \
|
--registry=https://git.chipperfluff.at/api/packages/projects/npm/ \
|
||||||
--//git.chipperfluff.at/api/packages/projects/npm/:_authToken="$NPM_TOKEN"
|
--//git.chipperfluff.at/api/packages/projects/npm/:_authToken="$NPM_TOKEN"
|
||||||
|
|||||||
4
source/package-lock.json
generated
4
source/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "testosmaximus",
|
"name": "testosmaximus",
|
||||||
"version": "1.0.2",
|
"version": "1.0.5",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "testosmaximus",
|
"name": "testosmaximus",
|
||||||
"version": "1.0.2",
|
"version": "1.0.5",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.3"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "testosmaximus",
|
"name": "@testosmaximus/testosmaximus",
|
||||||
"version": "1.0.2",
|
"version": "1.0.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2020",
|
"target": "ES2020",
|
||||||
"module": "ESNext",
|
"module": "CommonJS",
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Node",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user