@genspectrum/dashboard-components 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/dist/assets/{mutationOverTimeWorker-DPS3tmOd.js.map → mutationOverTimeWorker-BRPqAM5Z.js.map} +1 -1
- package/dist/components.d.ts +10 -10
- package/dist/components.js +18 -12
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +10 -10
- package/package.json +1 -1
- package/src/preact/wastewater/mutationsOverTime/__mockData__/detailsAminAcidNonSegmented.json +88 -0
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +34 -0
- package/src/query/queryWastewaterMutationsOverTime.ts +1 -1
- package/src/utils/mutations.ts +18 -10
- package/standalone-bundle/assets/{mutationOverTimeWorker-Dp-A14AP.js.map → mutationOverTimeWorker-DtFX4Ihx.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +2009 -2008
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/README.md
CHANGED
|
@@ -179,6 +179,26 @@ Node.js [subpath imports](https://nodejs.org/api/packages.html#subpath-imports),
|
|
|
179
179
|
from [storybook](https://storybook.js.org/docs/writing-stories/mocking-data-and-modules/mocking-modules). This ensures
|
|
180
180
|
that when importing the worker in the component, the mock worker is used inside Storybook instead of the real worker.
|
|
181
181
|
|
|
182
|
-
###
|
|
182
|
+
### How The Release Build Works
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
The `"exports"` field in `package.json` defines which files a user of the package can import using the normal module systems.
|
|
185
|
+
`"files"` defines which files are included in the package when it is published to npm.
|
|
186
|
+
Obviously, `"files"` must include everything that is referenced in `"exports"`,
|
|
187
|
+
but we also include `src/` for best practice so that users can see non-built files if they want to.
|
|
188
|
+
|
|
189
|
+
We use Vite to build the entry point files that are referenced in `"exports"`: [vite.release.config.ts](./vite.release.config.ts).
|
|
190
|
+
Important points to note:
|
|
191
|
+
|
|
192
|
+
- We need to build the code since we need to convert TypeScript to JavaScript.
|
|
193
|
+
- We also include type declarations.
|
|
194
|
+
- We do not minify the code. That's up to the user of the package.
|
|
195
|
+
- We exclude dependencies. Users should download them via their own package manager. Our libraries should not be in the build output.
|
|
196
|
+
- We also build a ["standalone" version](vite.release-standalone.config.ts) of the components that includes all dependencies.
|
|
197
|
+
This can be used without a package manager (and it's not supposed to be used if you are using a package manager).
|
|
198
|
+
|
|
199
|
+
If you add code that's supposed to be used by the users of the package,
|
|
200
|
+
you need to make sure that it is exported from one of the entry points defined in `"exports"`.
|
|
201
|
+
Currently, we have two entry points:
|
|
202
|
+
|
|
203
|
+
- [components](src/componentsEntrypoint.ts): Supposed to be used in the browser. This file registers all web components when it's imported.
|
|
204
|
+
- [util](src/utilEntrypoint.ts): Can also be used in a non-browser environment. Exports some code and types so that users can reuse some of our logic.
|