-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
What was the reasoning behind throwing an error in queries/index.ts and components/index.ts?
roamjs-components/src/queries/index.ts
Lines 1 to 5 in a6cbd49
| throw new Error( | |
| `Do not import from roamjs-components/queries directly. Instead import the *query* you need directly. For example: | |
| import getTextByBlockUid from "roamjs-components/queries/getTextByBlockUid;"` | |
| ); |
vs
roamjs-components/src/dom/index.ts
Lines 1 to 5 in a6cbd49
| export * from "./constants"; | |
| export { default as addBlockCommand } from "./addBlockCommand"; | |
| export { default as addOldRoamJSDependency } from "./addOldRoamJSDependency"; | |
| export { default as addRoamJSDependency } from "./addRoamJSDependency"; | |
| export { default as addScriptAsDependency } from "./addScriptAsDependency"; |
roamjs-components/src/date/index.ts
Lines 1 to 3 in a6cbd49
| export { default as parseNlpDate } from "./parseNlpDate"; | |
| export { default as parseRoamDateUid } from "./parseRoamDateUid"; | |
| export * from "./constants"; |
Bundle size? or something else?
Going forward, should the following be kept up to date with the default exports?
dom/index.ts
date/index.ts
util/index.ts
writes/index.ts
While queries/index.ts and components/index.ts remain as granular imports?
Metadata
Metadata
Assignees
Labels
No labels