Skip to content
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

Merged
merged 10 commits into from
Dec 26, 2022
Merged

Perform repo housekeeping #95

merged 10 commits into from
Dec 26, 2022

Conversation

tuliren
Copy link
Member

@tuliren tuliren commented Dec 25, 2022

Summary

cli

  • The cli package currently includes all the files in the cli directory, like tests and configurations, which are unnecessary. This PR updates the cli/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.
  • The cli/.prettierignore file is misnamed. It has been fixed.
  • Format code according to Prettier.

action

  • The Prettier config originally for the action package is moved to the root directory during the refactoring. So Prettier no longer works for the action package. This PR moves the files back.
  • Fix a few eslint warnings in pluginRunner.

@tuliren tuliren requested a review from jrhizor December 25, 2022 05:12
@stoat-app
Copy link

stoat-app bot commented Dec 25, 2022

Easy and customizable dashboards for your build system. Learn more about Stoat ↗︎

Static Hosting

Name Link Commit Status
Documentation Visit 7e798de
CLI Test Coverage Visit 5c3b408
Action Test Coverage Visit 5c3b408
Action Test Coverage (single file) Visit 5c3b408

Job Runtime

debug

"directories": {
"lib": "src",
"test": "__tests__"
},
Copy link
Member Author

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/**/*"
],
Copy link
Member Author

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",
Copy link
Member Author

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",
Copy link
Member Author

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.

@vercel
Copy link

vercel bot commented Dec 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
docs 🔄 Building (Inspect) Dec 25, 2022 at 8:26AM (UTC)

@tuliren
Copy link
Member Author

tuliren commented Dec 26, 2022

I will merge this now, since I am working on a new plugin that depends on this.

@tuliren tuliren merged commit fbd4ba4 into main Dec 26, 2022
@tuliren tuliren deleted the liren/prune-cli-package branch December 26, 2022 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant