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

chore: remove lib dir from source-code & fix dev scripts #98

Merged
merged 4 commits into from
May 7, 2022

Conversation

YassinEldeeb
Copy link
Contributor

@YassinEldeeb YassinEldeeb commented Apr 8, 2022

Improvements

  1. The lib directory which contains the compiled TS shouldn't be included in the actual source code of the project.
  2. Add prepack script which runs on npm publish and before packing up the package tarball. And the prepack script just builds the package so that when npm publishes your package, It'll build the package first into a lib directory before publishing.
  3. In schema.prisma mongoDB should be removed from the previewFeatures array because in the latest Prisma release it's considered now as GA.
  4. Instead of excluding the tests folder in package.json from the package tarball, It's better to exclude it in tsconfig.json to skip compiling it which will also result in faster builds.
  5. Add removeComments: true option in tsconfig.json to remove unnecessary comments from the build which will result in a smaller tarball size.
  6. Rename start script to dev cause usually start means a script to run an app in a production environment but in this case, It's for development(not a big deal though 😅)
  7. Remove the project directory arg from tsc -p . cause it defaults to the current directory.
  8. Remove sudo from the local script cause developers on windows won't be able to use this script if it was prefixed with sudo (me included), If you have some issues on mac/linux when running this command without sudo that's usually a permissions issue in your home directory which can be fixed by reclaiming the ownership of the .npm directory

Copy link
Owner

@sabinadams sabinadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for these updates, love it!

@sabinadams sabinadams merged commit 187eb7a into sabinadams:master May 7, 2022
@YassinEldeeb
Copy link
Contributor Author

Always happy to contribute to cool dev tools.

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.

None yet

2 participants