Skip to content

Commit

Permalink
Prepare to start exloring the autoupdate implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
henrycatalinismith committed Jan 26, 2025
1 parent 411c430 commit f94c39d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
10 changes: 5 additions & 5 deletions bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import { Command } from "commander";
import { dirname } from "path";
import { fileURLToPath } from "url";
import { readFileSync } from "fs";
import { version } from "./version";
import { sandbox } from "./sandbox";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const pkg = JSON.parse(readFileSync(`${__dirname}/../package.json`, "utf8"));

const program = new Command();
program.name(pkg.name).description("Starter Node project").version(pkg.name);
program.name(pkg.name).description(pkg.description).version(pkg.name);

program
.command("version")
.description("Show version")
.command("sandbox")
.description("Testing")
.action(async () => {
process.stdout.write(`${await version()}\n`);
await sandbox();
});

program.parse(process.argv);
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
{
"author": "Henry Catalini Smith <[email protected]>",
"bin": {
"node": "./bin.js"
},
"dependencies": {
"commander": "^13.1.0"
},
"description": "Automatic update tooling for work environment data",
"devDependencies": {
"@types/node": "^20",
"tsx": "^4.19.2",
"typedoc": "^0.27.6",
"typescript": "^5"
},
"files": [
"bin.js",
"version.js"
],
"name": "@arbetsmarknad/node",
"name": "@arbetsmiljo/autoupdate",
"scripts": {
"build": "tsc",
"node": "tsx ./bin.ts"
"autoupdate": "tsx ./bin.ts",
"build": "tsc"
},
"typedocOptions": {
"entryPoints": [
"./version.ts"
]
"entryPoints": []
},
"version": "0.0.0"
}
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# node
# autoupdate

Node starter project.
Automatic update tooling for work environment data.

## License

[MIT](https://github.com/arbetsmarknad/node/blob/main/license)
[MIT](https://github.com/arbetsmiljo/autoupdate/blob/main/license)
3 changes: 3 additions & 0 deletions sandbox.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export async function sandbox() {
console.log("sandbox");
}

0 comments on commit f94c39d

Please sign in to comment.