Skip to content

Commit eb396fd

Browse files
authored
Merge pull request #740 from hypothesis/multi-entry-point
Add individual exports for all utility modules
2 parents 7e56bbe + f9e6f99 commit eb396fd

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ gulp.task('test', () => runTests({
7575
// Project-specific tasks...
7676
```
7777
78+
Functions can be imported from the main export, or from individual ones if you
79+
don't want to install all optional peer dependencies:
80+
81+
```js
82+
import { buildJS, watchJS } from '@hypothesis/frontend-build/rollup';
83+
import { buildCSS } from '@hypothesis/frontend-build/sass';
84+
import { runTests } from '@hypothesis/frontend-build/tests';
85+
86+
```
87+
7888
## API reference
7989
8090
This section provides an overview of the functions in this package. See the

package.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,26 @@
33
"version": "3.2.2",
44
"description": "Hypothesis frontend build scripts",
55
"type": "module",
6-
"exports": "./index.js",
6+
"exports": {
7+
".": {
8+
"import": "./index.js"
9+
},
10+
"./manifest": {
11+
"import": "./lib/manifest.js"
12+
},
13+
"./rollup": {
14+
"import": "./lib/rollup.js"
15+
},
16+
"./run": {
17+
"import": "./lib/run.js"
18+
},
19+
"./sass": {
20+
"import": "./lib/sass.js"
21+
},
22+
"./tests": {
23+
"import": "./lib/tests.js"
24+
}
25+
},
726
"repository": "https://github.com/hypothesis/frontend-build",
827
"author": "Hypothesis developers",
928
"license": "BSD-2-Clause",

0 commit comments

Comments
 (0)