Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit ff4aee9

Browse files
haydenyoungaphelionz
authored andcommitted
chore: Move source to src. Generate ts type declarations.
1 parent 49c25b7 commit ff4aee9

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
"type": "module",
44
"version": "2.1.0",
55
"description": "IO helper module for orbit-db",
6-
"main": "index.js",
7-
"types": "./types/index.d.ts",
6+
"main": "dist",
7+
"types": "dist",
88
"exports": {
9-
"import": "./index.js"
9+
"import": "src/index.js"
1010
},
1111
"scripts": {
12-
"build": "npx ipjs build --main --tests",
12+
"build:types": "npx -p typescript tsc src/*.js --declaration --allowJs --emitDeclarationOnly --outDir dist",
13+
"build": "npx ipjs build --main --tests && npm run build:types",
1314
"test": "npm run build && TEST=all nyc mocha dist/esm/node-test",
1415
"coverage": "TEST=all nyc mocha",
1516
"lint": "standard"

index.js renamed to src/index.js

File renamed without changes.

test/io.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env mocha */
22

33
import { strict as assert } from 'assert'
4-
import { read, write } from '../index.js'
4+
import { read, write } from '../src/index.js'
55

66
// Test utils
77
import {

0 commit comments

Comments
 (0)