mattmilburn / strapi-plugin-preview-button

A plugin for Strapi CMS that adds a preview button and live view button to the content manager edit view.
MIT License
100 stars 35 forks source link

Add .npmignore file #134

Closed dekhanov closed 4 months ago

dekhanov commented 5 months ago

Hi there!

While using your fantastic plugin, I noticed that there are some redundant development dependencies, such as ESLint and Prettier configurations, that have been published with the package. These are not necessary for end users and their inclusion increases the package size and installation time.

To address this, I've added an .npmrc file to exclude these files from the final NPM package. This change should not affect the functionality of the plugin.

Here is the diff between the files that were published earlier and those that will be published with the .npmrc file:

-npm notice 249B    .editorconfig
-npm notice 69B     .eslintignore
-npm notice 822B    .eslintrc.back.js
-npm notice 700B    .eslintrc.base.js
-npm notice 2.9kB   .eslintrc.front.js
-npm notice 447B    .eslintrc.js
-npm notice 69B     .husky/pre-commit
-npm notice 56B     .prettierignore
-npm notice 208B    .prettierrc.js
-npm notice 29B     .yarnrc.yml
 npm notice 1.1kB   LICENSE.md
 npm notice 8.0kB   MIGRATION.md
 npm notice 15.6kB  README.md
 npm notice 1.5kB   admin/src/components/CopyLinkButton/index.js
 npm notice 968B    admin/src/components/EditViewRightLinks/index.js
 npm notice 324B    admin/src/components/index.js
 npm notice 3.5kB   admin/src/components/ListViewColumn/index.js
 npm notice 1.2kB   admin/src/components/PreviewButton/index.js
 npm notice 815B    admin/src/components/PreviewButtonGroup/index.js
 npm notice 306B    admin/src/constants.js
 npm notice 981B    admin/src/contentManagerHooks/add-preview-column.js
 npm notice 68B     admin/src/contentManagerHooks/index.js
 npm notice 134B    admin/src/hooks/index.js
 npm notice 1.3kB   admin/src/hooks/use-plugin-config.js
 npm notice 1.5kB   admin/src/hooks/use-preview-button.js
 npm notice 1.3kB   admin/src/index.js
 npm notice 507B    admin/src/reducers/config.js
 npm notice 151B    admin/src/reducers/index.js
 npm notice 257B    admin/src/translations/en.json
 npm notice 278B    admin/src/translations/es.json
 npm notice 297B    admin/src/translations/fr.json
 npm notice 358B    admin/src/translations/ja.json
 npm notice 372B    admin/src/translations/ru.json
 npm notice 941B    admin/src/utils/__tests__/get-publish-state-config.spec.js
 npm notice 421B    admin/src/utils/__tests__/interpolate.spec.js
 npm notice 2.0kB   admin/src/utils/__tests__/parse-url.spec.js
 npm notice 504B    admin/src/utils/__tests__/trim-slashes.spec.js
 npm notice 418B    admin/src/utils/get-publish-state-config.js
 npm notice 107B    admin/src/utils/get-trad.js
 npm notice 398B    admin/src/utils/index.js
 npm notice 461B    admin/src/utils/interpolate.js
 npm notice 1.1kB   admin/src/utils/parse-url.js
 npm notice 86B     admin/src/utils/plugin-id.js
 npm notice 93B     admin/src/utils/plugin-name.js
 npm notice 94B     admin/src/utils/trim-slashes.js
-npm notice 1.2kB   jest.config.js
 npm notice 3.0kB   package.json
 npm notice 161.0kB public/list-view.png
 npm notice 67.9kB  public/logo-2x.png
 npm notice 17.1kB  public/logo.jpg
 npm notice 23.7kB  public/logo.png
 npm notice 181.1kB public/screenshot.png
 npm notice 1.3kB   server/config.js
 npm notice 124B    server/controllers/index.js
 npm notice 189B    server/controllers/preview-button.js
 npm notice 340B    server/index.js
 npm notice 244B    server/routes/admin-api.js
 npm notice 98B     server/routes/index.js
 npm notice 277B    server/services/config.js
 npm notice 84B     server/services/index.js
 npm notice 155B    server/utils/get-service.js
 npm notice 150B    server/utils/index.js
 npm notice 105B    server/utils/plugin-id.js
 npm notice 64B     strapi-admin.js
 npm notice 53B     strapi-server.js
mattmilburn commented 5 months ago

@dekhanov Ah, thank you for this! 🎉 I will check it out very soon and follow up :)