-
Notifications
You must be signed in to change notification settings - Fork 10
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
Changed npmrc template name and updated gitignore content #91
Conversation
@@ -86,7 +93,7 @@ class InitCommand extends Command { | |||
let shouldCreateGit = gitFlagOptions[flags.git]; | |||
let packageManagerChoice = flags.packageManager; | |||
const packageJsonTemplate = `${getAppRootDir()}/src/templates/package.json`; | |||
const dotNpmrcPath = `${getAppRootDir()}/src/templates/.npmrc`; |
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.
why change from .npmrc to npmrc?
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.
While publishing .
files are not published. For instance, here is the latest published package on npm, as you can see none of the .
files are published
Similarly, template/.npmrc
is also missing which wont let the init command to complete the setup
Hence changing it to npmrc
instead. But while writing it into the user's inited folder, it will be named as .npmrc
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 is from the npm docs, it says .npmrc
along with a bunch of other files is always ignored https://docs.npmjs.com/cli/v9/configuring-npm/package-json#files
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.
ahh. This requires a .npmignore file and you can then specify the files you want in it like so
{
"files": ["index.js", "/lib"]
}
This whitelists everything inside and you can test it out by running npm pack
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.
But .npmrc
is always ignored irrespective of files
array or .npmignore
Description
Changed .npmrc to npmrc and updated gitignore file contents.
Types of changes
Checklist: