speckle-server/packages/shared
Björn Steinhagen fd35e6653c
TEKLAS to TKL (#3486)
Change source app abbreviation from TEKLAS to TKL or something else
2024-11-13 16:42:27 +00:00
..
.tshy feat(shared): modularized package & node16 support (#2336) 2024-06-11 14:12:13 +03:00
src TEKLAS to TKL (#3486) 2024-11-13 16:42:27 +00:00
eslint.config.mjs chore: upgrade to eslint 9 (#2348) 2024-06-12 14:38:02 +03:00
package.json feat(webhook-service): learn to speak multi region (#3473) 2024-11-11 17:10:29 +01:00
pinoPrettyTransport.cjs feat(shared): modularized package & node16 support (#2336) 2024-06-11 14:12:13 +03:00
readme.md feat(shared): modularized package & node16 support (#2336) 2024-06-11 14:12:13 +03:00
tsconfig.json feat(shared): modularized package & node16 support (#2336) 2024-06-11 14:12:13 +03:00

readme.md

@speckle/shared

This package holds code that otherwise would be duplicated across @speckle packages, things like helpers, constants and TS types.

Usage

Peer dependencies

Some dependencies are marked as peer dependencies, to ensure that package consumers can manage their versions themselves. If you use any code from this package that relies on a specific peer dependency, make sure its installed.

How to use

import { Roles, RichTextEditor } from '@speckle/shared'

There are also "heavy" imports, that are not exported by default, like @speckle/shared/environment. These are used to avoid importing the whole package when only a small part of it is needed. If export maps don't work (due to a legacy TS configuration) you can always import from @speckle/shared/dist/** directly

Development

Do yarn build to build or yarn dev to build in watch mode

Code organization

Code should be organized according to areas of speckle, 'core' being the main one. Exports from areas other than "core" should be grouped under namespaces like "RichTextEditor".