@athenna/tsconfig 4.7.0 → 4.8.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/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/tsconfig",
3
- "version": "4.7.0",
3
+ "version": "4.8.1",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/tsconfig",
3
- "version": "4.7.0",
3
+ "version": "4.8.1",
4
4
  "description": "Exports the base TypeScript configuration for Athena applications and packages.",
5
5
  "license": "MIT",
6
6
  "author": "João Lenon <lenon@athenna.io>",
package/src/build.js CHANGED
@@ -7,17 +7,32 @@
7
7
  * file that was distributed with this source code.
8
8
  */
9
9
 
10
- import { sep } from 'node:path'
11
- import { spawn } from 'node:child_process'
10
+ import copyfiles from 'copyfiles'
12
11
 
13
- const bin = `${process.cwd()}${sep}node_modules${sep}.bin`
12
+ import { tsc } from './tsc.js'
13
+ import { rimraf } from 'rimraf'
14
14
 
15
- const tsc = `${bin}${sep}tsc`
16
- const rimraf = `${bin}${sep}rimraf`
17
- const copyfiles = `${bin}${sep}copyfiles`
15
+ /**
16
+ * Delete old build folder.
17
+ */
18
+ rimraf('build')
18
19
 
19
- const options = { shell: true, stdio: 'inherit' }
20
+ /**
21
+ * Run tsc compiler.
22
+ */
23
+ await tsc()
20
24
 
21
- spawn(`${rimraf} build`, options)
22
- spawn(`${tsc} --project node_modules/@athenna/tsconfig/tsconfig.lib-build.json`, options)
23
- spawn(`${copyfiles} templates configurer package.json package-lock.json LICENSE.md README.md build`, options)
25
+ /**
26
+ * Copy default files to build folder.
27
+ */
28
+ copyfiles([
29
+ 'templates',
30
+ 'configurer',
31
+ 'package.json',
32
+ 'package-lock.json',
33
+ 'LICENSE.md',
34
+ 'README.md',
35
+ 'build'
36
+ ], '', (err) => {
37
+ if (err) throw err
38
+ })
package/src/tsc.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @athenna/tsconfig
3
+ *
4
+ * (c) João Lenon <lenon@athenna.io>
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
9
+
10
+ export async function tsc() {
11
+ process.argv.push('--project', 'node_modules/@athenna/tsconfig/tsconfig.lib-build.json')
12
+
13
+ await import('typescript/lib/tsc.js')
14
+ }