Skip to content

Commit 1b2b191

Browse files
committed
fix: move index.ts to bin/index.ts and update main file entry
Due to some reason, the installation of package executes `build/index.js` file, which in-turn re-generates the ace manifest file. Ideally, manifest should only be generate during the build and not after installation
1 parent 24ba80d commit 1b2b191

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

index.ts renamed to bin/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import { join } from 'path'
1111
import { fsReadAll } from '@poppinss/utils'
1212
import { Manifest } from '@adonisjs/ace'
1313

14-
new Manifest(__dirname).generate(
14+
new Manifest(join(__dirname, '..')).generate(
1515
fsReadAll(
16-
join(__dirname, './commands'),
16+
join(__dirname, '../commands'),
1717
(file) => !file.includes('Base') && file.endsWith('.js')
1818
).map(file => `./commands/${file}`)
1919
)

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
"name": "@adonisjs/assembler",
33
"version": "2.1.0",
44
"description": "Core commands to compiler and build AdonisJs project",
5-
"main": "build/index.js",
5+
"main": "build/ace-manifest.json",
66
"files": [
77
"build/commands",
88
"build/config",
99
"build/templates",
1010
"build/src",
11-
"build/ace-manifest.json",
12-
"build/index.d.ts",
13-
"build/index.js"
11+
"build/ace-manifest.json"
1412
],
1513
"scripts": {
1614
"mrm": "mrm --preset=@adonisjs/mrm-preset",
@@ -19,7 +17,7 @@
1917
"lint": "eslint . --ext=.ts",
2018
"clean": "del build",
2119
"compile": "npm run lint && npm run clean && tsc",
22-
"build": "npm run compile && node build/index.js && copyfiles \"templates/*\" build",
20+
"build": "npm run compile && node build/bin/index.js && copyfiles \"templates/*\" build",
2321
"commit": "git-cz",
2422
"release": "np",
2523
"version": "npm run build"

0 commit comments

Comments
 (0)