onlybuild 2.0.0 → 2.0.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
+ ## [v2.0.1](https://github.com/neogeek/onlybuild/tree/v2.0.1) - (2026-02-23)
4
+
5
+ [Full Changelog](https://github.com/neogeek/onlybuild/compare/v2.0.0...v2.0.1)
6
+
7
+ - [hotfix] Fixed issue with ignorefile not working. [#41](https://github.com/neogeek/onlybuild/pull/41)
8
+
3
9
  ## [v2.0.0](https://github.com/neogeek/onlybuild/tree/v2.0.0) - (2026-02-21)
4
10
 
5
11
  [Full Changelog](https://github.com/neogeek/onlybuild/compare/v1.6.6...v2.0.0)
package/dist/bin/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env -S node --no-warnings
2
2
  import 'tsx/esm';
3
- import { glob } from 'node:fs/promises';
3
+ import { glob, readFile } from 'node:fs/promises';
4
+ import { existsSync } from 'node:fs';
4
5
  import { parseArgs } from 'node:util';
5
6
  import chalk from 'chalk';
6
7
  import '../src/env.js';
@@ -39,6 +40,9 @@ const [buildDir = 'build/'] = [args.values.out].filter(Boolean).map(String);
39
40
  const [ignoreFile = '.onlyignore'] = [args.values.ignore]
40
41
  .filter(Boolean)
41
42
  .map(String);
43
+ const filesToIgnore = existsSync(ignoreFile)
44
+ ? (await readFile(ignoreFile, 'utf8')).split(/\n+/g).filter(Boolean)
45
+ : [];
42
46
  const filesToBuild = (await Array.fromAsync(glob(['**/*.mjs', '**/*.jsx', '**/*.ts', '**/*.tsx'].filter(Boolean), {
43
47
  exclude: ['node_modules/', '_*/**/*', buildDir, ignoreFile],
44
48
  cwd: args.positionals[0]
@@ -54,7 +58,8 @@ const filesToCopy = (await Array.fromAsync(glob(['**/*'], {
54
58
  'package-lock.json',
55
59
  'node_modules/',
56
60
  buildDir,
57
- ignoreFile
61
+ ignoreFile,
62
+ ...filesToIgnore
58
63
  ],
59
64
  cwd: args.positionals[0]
60
65
  }))).filter(path => path.includes('.'));
package/dist/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": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "engines": {
6
6
  "node": ">=22.22"
7
7
  },
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": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "engines": {
6
6
  "node": ">=22.22"
7
7
  },