Open boneskull opened 5 years ago
all constants should be in a file called constants.js
and re-exported from src/index.js
; otherwise we are likely to introduce cyclic dependencies, which Rollup is not fond of
I like constants.js
using named exports for the constants
Various packages have constants in them, and they should all export these in a similar shape.
It's absolutely useful to be able to iterate over a set of constants exported from a package. For example, names of formatters or transformers. If a package has a single entry point, then constants-as-named-exports won't get us there, because those exports may not all be constants!
I'm thinking this should be sufficient:
A consumer can: