Skip to content

Commit

Permalink
packaging: be more specific about files distributed in packed .tgz
Browse files Browse the repository at this point in the history
We previously included a few unnecessary files the ui-components .tgz
file. They weren't dangerous, but weren't really appropriate for
distribution. For example:

* .parcel-cache
* .sassrc.json
* .eslint.json
* .yarnrc

Use package.json's 'files' array (an allowlist) instead of .npmignore
(a denylist) to more carefully control what's included.

Besides removing those extra files, CSS and JS source-maps are now
included in the .tgz file distributed by NPM, which should make things
easier for consumers. Since this is an open-source project, there's no
significant drawback to including those maps.
  • Loading branch information
sjbarag committed Sep 21, 2023
1 parent cce0a45 commit d465afa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
19 changes: 0 additions & 19 deletions packages/ui-components/.npmignore

This file was deleted.

6 changes: 6 additions & 0 deletions packages/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"files": [
"dist/",
"package.json",
"README.md",
"LICENSE"
],
"scripts": {
"build": "npm-run-all build:typescript build:bundle",
"build:bundle": "parcel build",
Expand Down

0 comments on commit d465afa

Please sign in to comment.