Skip to content

Commit

Permalink
[chore] add types to bucket submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksteamdev committed Jan 15, 2021
1 parent ad78781 commit fcb7a93
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@
"module": "lib/index-esm.js",
"types": "types/index.d.ts",
"files": [
"bucket",
"jest",
"lib",
"types",
"jest"
"types"
],
"scripts": {
"prebuild": "rm -rf lib types hooks jest",
"prebuild": "rm -rf lib types hooks jest bucket",
"build": "run-p build:pro build:types build:copy",
"build:dev": "rollup -c --environment NODE_ENV:development",
"build:pro": "rollup -c --environment NODE_ENV:production",
"build:types": "tsc -p tsconfig.d.json",
"build:copy": "copyfiles -f src/jest/package.json jest",
"build:copy": "run-p build:copy:*",
"build:copy:jest": "copyfiles -f src/jest/package.json jest",
"build:copy:bucket": "copyfiles -f src/bucket/package.json bucket",
"prepublishOnly": "npm run build",
"postpublish": "rm -rf node_modules package-lock.json && pnpm i",
"start": "run-p start:*",
Expand Down Expand Up @@ -55,6 +58,7 @@
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"rollup": "^2.10.5",
"rollup-plugin-copy2": "^0.2.0",
"ts-jest": "^26.0.0",
"tslib": "^2.0.0",
"typescript": "^3.9.3"
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default [
plugins,
},
{
input: 'src/bucket.ts',
output: outputs('lib/bucket'),
input: 'src/bucket/index.ts',
output: outputs('bucket/index'),
external,
plugins,
},
Expand Down
6 changes: 3 additions & 3 deletions src/bucket.ts → src/bucket/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import chromep from 'chrome-promise'
import { chromepApi } from 'chrome-promise/chrome-promise'
import { concat, from, fromEventPattern, Observable } from 'rxjs'
import { filter, map, mergeMap } from 'rxjs/operators'
import { isKeyof, isNonNull } from './guards'
import { isKeyof, isNonNull } from '../guards'
import {
AreaName,
AtLeastOne,
Bucket,
Changes,
Getter,
} from './types'
import { invalidSetterReturn } from './validate'
} from '../types'
import { invalidSetterReturn } from '../validate'

export const getStorageArea = (
area: AreaName,
Expand Down
5 changes: 5 additions & 0 deletions src/bucket/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "./index-cjs.js",
"module": "./index-esm.js",
"types": "../types/bucket.d.ts"
}

0 comments on commit fcb7a93

Please sign in to comment.