Skip to content

Commit

Permalink
fix: npmignore not needed as we use pkg.files
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored and snorrees committed Nov 3, 2022
1 parent a0718b5 commit 28a085d
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 69 deletions.
9 changes: 0 additions & 9 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ If the plugin is shared across multiple "private" studios: register an organizat
Also; you cannot easily remove modules/versions from npm once published.
Take a good look at your `package.json` to see that the fields in there makes sense to you,
and make sure there are no "secrets" (authorization tokens, API keys or similar) in the plugin directory -
anything not listed in `.npmignore` will be part of the published module.
any files within folders defined in the `files` field inside `package.json` will be included with your module.

When you're ready to publish, run `npm publish` (or `yarn publish` if you prefer).
The `prepublishOnly` task should kick in and compile the source files, then verify the built output to ensure it looks good.
Expand Down
9 changes: 0 additions & 9 deletions assets/inject/npmignore

This file was deleted.

1 change: 0 additions & 1 deletion src/actions/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ async function writeStaticAssets(options: InjectOptions) {

const files: FromTo[] = [
{from: 'editorconfig', to: '.editorconfig'},
{from: 'npmignore', to: '.npmignore'},
{from: 'sanity.json', to: 'sanity.json'},
{from: 'v2-incompatible.js.template', to: 'v2-incompatible.js'},
{
Expand Down
9 changes: 0 additions & 9 deletions test/fixtures/inject/valid/.npmignore

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions test/fixtures/verify-package/fresh-v2-movie-studio/.npmignore

This file was deleted.

9 changes: 0 additions & 9 deletions test/fixtures/verify-package/invalid-eslint/.npmignore

This file was deleted.

9 changes: 0 additions & 9 deletions test/fixtures/verify-package/valid/.npmignore

This file was deleted.

1 change: 0 additions & 1 deletion test/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ tap.test('plugin-kit init --force in empty directory', async (t) => {
'lint-staged.config.js',
'*.js'
)
await fileContains('.npmignore', '/test')
await fileContains('.prettierrc.js', 'semi: false')
await fileContains('sanity.json', '"path": "./v2-incompatible.js"')
await fileContains('v2-incompatible.js', 'showIncompatiblePluginDialog')
Expand Down

0 comments on commit 28a085d

Please sign in to comment.