Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save DaneTheory/43ce4ae8208ef16c7d04aab7d4a80894 to your computer and use it in GitHub Desktop.

Select an option

Save DaneTheory/43ce4ae8208ef16c7d04aab7d4a80894 to your computer and use it in GitHub Desktop.
The Package (dot) JSON: A story of love, triumph, and general witchcraft/wizardry - InitFields: Files (Assets)
[{
"npm:current": {
"ref": "",
"source": [
]
},
"npm:legacy": {
"ref": "",
"source": [
]
},
"yarn:current": {
"ref": "https://yarnpkg.com/configuration/manifest#files",
"source": [
"Some special files and directories are also included or excluded regardless of whether they exist in the files array.",
"You can also provide a '.npmignore' file in the root of your package or in subdirectories, which will keep files from being included. The '.npmignore' file works just like a '.gitignore'. If there is a '.gitignore' file, and '.npmignore' is missing, '.gitignore'’s contents will be used instead. The files field overrides '.npmignore' and '.gitignore'."
"_example_:{ \n \"files\": [ \n \"dist/**/*\", \n \"lib/**/*\" \n ] \n }:_example_"
]
},
"yarn:legacy": {
"ref": "https://classic.yarnpkg.com/en/docs/package-json/#toc-files",
"source": [
"These are files that are included in your project. You can specify single files, whole directories or use wildcards to include files that meet a certain criteria.",
"_example_:{ \n \"files\": [\"filename.js\", \"directory/\", \"glob/*.{js,json}\"] \n }:_example_"
]
}
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment