onlybuild 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.2.1](https://github.com/neogeek/onlybuild/tree/v1.2.1) - (2024-05-07)
4
+
5
+ [Full Changelog](https://github.com/neogeek/onlybuild/compare/v1.2.0...v1.2.1)
6
+
7
+ - [hotfix] Fixed issue with getting version from package.json [#11](https://github.com/neogeek/onlybuild/pull/11)
8
+
3
9
  ## [v1.2.0](https://github.com/neogeek/onlybuild/tree/v1.2.0) - (2024-05-07)
4
10
 
5
11
  [Full Changelog](https://github.com/neogeek/onlybuild/compare/v1.1.0...v1.2.0)
@@ -1,3 +1,3 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node --no-warnings
2
2
  import 'dotenv/config';
3
3
  export {};
package/dist/bin/index.js CHANGED
@@ -1,17 +1,15 @@
1
- #!/usr/bin/env node
2
- import { readFile } from 'node:fs/promises';
3
- import { dirname, join } from 'node:path';
4
- import { fileURLToPath } from 'node:url';
1
+ #!/usr/bin/env node --no-warnings
5
2
  import 'dotenv/config';
6
3
  import { globby } from 'globby';
7
4
  import parseCmdArgs from 'parse-cmd-args';
8
5
  import { buildFiles } from '../src/build.js';
9
6
  import { copyFiles } from '../src/copy.js';
7
+ import pkg from '../package.json' assert { type: 'json' };
10
8
  const args = parseCmdArgs(null, {
11
9
  requireUserInput: false
12
10
  });
13
11
  if (args.flags['--version'] || args.flags['-v']) {
14
- process.stdout.write(`${JSON.parse(await readFile(join(dirname(fileURLToPath(import.meta.url)), '../package.json'), 'utf8')).version}\n`);
12
+ process.stdout.write(`${pkg.version}\n`);
15
13
  process.exit();
16
14
  }
17
15
  else if (args.flags['--help'] || args.flags['-h']) {
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "onlybuild",
3
+ "description": "A zero-config cli for building static websites.",
4
+ "version": "1.2.1",
5
+ "engines": {
6
+ "node": ">=20.x"
7
+ },
8
+ "type": "module",
9
+ "bin": {
10
+ "onlybuild": "dist/bin/index.js"
11
+ },
12
+ "exports": {
13
+ ".": "./dist/src/index.js",
14
+ "./build": "./dist/src/build.js",
15
+ "./copy": "./dist/src/copy.js"
16
+ },
17
+ "types": "./dist/src/index.d.ts",
18
+ "license": "MIT",
19
+ "dependencies": {
20
+ "dotenv": "16.4.5",
21
+ "globby": "14.0.1",
22
+ "parse-cmd-args": "5.0.2"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "20.12.10",
26
+ "tsx": "4.9.3",
27
+ "typescript": "5.4.5"
28
+ },
29
+ "scripts": {
30
+ "test": "node --import tsx --test ./src/*.test.ts",
31
+ "build": "rm -rf dist/ && tsc && chmod +x ./dist/bin/index.js",
32
+ "prepare": "npm run build"
33
+ },
34
+ "keywords": [
35
+ "javascript",
36
+ "build",
37
+ "static"
38
+ ],
39
+ "authors": [
40
+ {
41
+ "name": "Scott Doxey",
42
+ "email": "hello@scottdoxey.com",
43
+ "homepage": "http://scottdoxey.com/"
44
+ }
45
+ ],
46
+ "homepage": "https://github.com/neogeek/onlybuild",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git://github.com/neogeek/onlybuild.git"
50
+ }
51
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onlybuild",
3
3
  "description": "A zero-config cli for building static websites.",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "engines": {
6
6
  "node": ">=20.x"
7
7
  },