-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perform repo housekeeping #95
Conversation
"directories": { | ||
"lib": "src", | ||
"test": "__tests__" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directories
is for information only.
"files": [ | ||
"dist/**/*", | ||
"public/**/*" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field configures what files are included in the final package.
@@ -2,17 +2,25 @@ | |||
"name": "stoat", | |||
"version": "0.0.8", | |||
"description": "Stoat CLI", | |||
"main": "src/index.ts", | |||
"main": "dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The src/index.ts
file will be included in the final package if it is the main
. However, a ts
file is not usable in the package. So I think technically the correct main is dist/index.js
.
"lint": "eslint src/**/*.ts", | ||
"create": "npm run build && npm run test", | ||
"build": "ncc build --source-map --license licenses.txt", | ||
"build": "ncc build src/index.ts --source-map --license licenses.txt", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the main
is a file in the dist
, which does not exist before the build
is run, we need to manually feed in the actual main
file to build.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I will merge this now, since I am working on a new plugin that depends on this. |
Summary
cli
cli
package currently includes all the files in thecli
directory, like tests and configurations, which are unnecessary. This PR updates thecli/package.json
file to package only the necessary files. I have checked locally that everything works. Please double check that the output is correct during the review or the next release.cli/.prettierignore
file is misnamed. It has been fixed.action
action
package is moved to the root directory during the refactoring. So Prettier no longer works for theaction
package. This PR moves the files back.pluginRunner
.