Skip to content

Commit

Permalink
fix(dist): build for node contained code for browser build
Browse files Browse the repository at this point in the history
  • Loading branch information
kalitine committed Sep 3, 2018
1 parent 05bbc26 commit b1b8333
Show file tree
Hide file tree
Showing 6 changed files with 1,113 additions and 1,476 deletions.
2,549 changes: 1,092 additions & 1,457 deletions package-lock.json

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,34 @@
"safe-any": "^1.0.2"
},
"peerDependencies": {
"rxjs": "^6.2.2"
"rxjs": "^6.3.1"
},
"devDependencies": {
"@commitlint/cli": "^7.0.0",
"@commitlint/config-conventional": "^7.0.1",
"@types/node": "^8.10.26",
"@commitlint/cli": "^7.1.1",
"@commitlint/config-conventional": "^7.1.1",
"@types/node": "^8.10.29",
"assert": "^1.4.1",
"ava": "^1.0.0-beta.7",
"ava": "^1.0.0-beta.8",
"commitizen": "^2.10.1",
"cz-conventional-changelog": "^2.1.0",
"husky": "^0.14.3",
"lint-staged": "^7.2.2",
"markdownlint-cli": "^0.13.0",
"prettier": "^1.14.2",
"protobufjs": "^6.8.8",
"rollup": "^0.64.1",
"rollup": "^0.65.0",
"rollup-plugin-cleanup": "^3.0.0",
"rollup-plugin-commonjs": "^9.1.5",
"rollup-plugin-commonjs": "^9.1.6",
"rollup-plugin-filesize": "^4.0.1",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-re": "^1.0.7",
"rollup-plugin-typescript2": "^0.16.1",
"semantic-release": "^15.9.9",
"travis-deploy-once": "^5.0.2",
"rollup-plugin-typescript2": "^0.17.0",
"rxjs": "^6.3.1",
"semantic-release": "^15.9.12",
"travis-deploy-once": "^5.0.7",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"typescript": "^3.0.1"
"typescript": "^3.0.3"
},
"ava": {
"files": [
Expand Down
6 changes: 3 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default [
],
},
{
input: 'src/index.ts',
input: 'src/index.browser.ts',
output: {
file: 'dist/mute-core.browser.es5.esm.js',
format: 'es',
Expand All @@ -75,7 +75,7 @@ export default [
plugins: [typescript(), resolve(), commonjs(), filesize(filesizeConfig), cleanup()],
},
{
input: 'src/index.ts',
input: 'src/index.browser.ts',
output: {
file: 'dist/mute-core.browser.es2015.esm.js',
format: 'es',
Expand All @@ -91,7 +91,7 @@ export default [
],
},
{
input: 'src/index.ts',
input: 'src/index.browser.ts',
output: {
file: 'dist/mute-core.browser.esnext.esm.js',
format: 'es',
Expand Down
5 changes: 5 additions & 0 deletions src/index.browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { env } from './misc'

env.crypto = window.crypto

export * from './index.common'
4 changes: 0 additions & 4 deletions src/index.ts → src/index.common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { env } from './misc'

env.crypto = window.crypto

export { ICollaborator } from './collaborators'
export { Position, MetaDataMessage, MetaDataType, TitleState, FixDataState } from './doc'
export { MuteCore } from './MuteCore'
Expand Down
2 changes: 1 addition & 1 deletion src/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ try {
console.error(err.message)
}

export * from '.'
export * from './index.common'

0 comments on commit b1b8333

Please sign in to comment.