Skip to content

Commit

Permalink
rm pkg and update node version
Browse files Browse the repository at this point in the history
  • Loading branch information
cupcakearmy committed Mar 4, 2024
1 parent 39a9ac0 commit eb76fe0
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 527 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.19.1
v20.11.1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FRONTEND
FROM node:18-alpine as client
FROM node:20-alpine as client
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cryptgeon"
version = "2.5.0"
version = "2.5.1"
authors = ["cupcakearmy <[email protected]>"]
edition = "2021"
rust-version = "1.76"
Expand Down
11 changes: 3 additions & 8 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cryptgeon",
"version": "2.5.0",
"version": "2.5.1",
"homepage": "https://github.com/cupcakearmy/cryptgeon",
"repository": {
"type": "git",
Expand All @@ -9,10 +9,7 @@
},
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
".": "./dist/index.mjs"
},
"types": "./dist/index.d.ts",
"bin": {
Expand All @@ -23,9 +20,8 @@
],
"scripts": {
"bin": "run-s build package",
"build": "tsc && ./scripts/build.js",
"build": "rm -rf dist && tsc && ./scripts/build.js",
"dev": "./scripts/build.js --watch",
"package": "./scripts/package.js",
"prepublishOnly": "run-s build"
},
"devDependencies": {
Expand All @@ -39,7 +35,6 @@
"inquirer": "^9.2.15",
"mime": "^4.0.1",
"occulto": "^2.0.3",
"pkg": "^5.8.1",
"pretty-bytes": "^6.1.1",
"typescript": "^5.3.3"
},
Expand Down
35 changes: 19 additions & 16 deletions packages/cli/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,32 @@
import { build, context } from 'esbuild'
import pkg from '../package.json' assert { type: 'json' }

const options = {
entryPoints: ['./src/cli.ts'],
const common = {
bundle: true,
minify: true,
platform: 'node',
outfile: './dist/cli.cjs',
define: { VERSION: `"${pkg.version}"` },
}

const cliOptions = {
...common,
entryPoints: ['./src/cli.ts'],
format: 'cjs',
outfile: './dist/cli.cjs',
}

const indexOptions = {
...common,
entryPoints: ['./src/index.ts'],
outfile: './dist/index.mjs',
format: 'esm',
}

const watch = process.argv.slice(2)[0] === '--watch'
if (watch) {
;(await context(options)).watch()
const ctx = await context(cliOptions)
ctx.watch()
} else {
await build(options)

// Also build internals to expose
await build({
entryPoints: ['./src/index.ts'],
bundle: true,
minify: true,
platform: 'node',
format: 'esm',
outfile: './dist/index.js',
define: { VERSION: `"${pkg.version}"` },
})
await build(cliOptions)
await build(indexOptions)
}
17 changes: 0 additions & 17 deletions packages/cli/scripts/package.js

This file was deleted.

Loading

0 comments on commit eb76fe0

Please sign in to comment.