Skip to content

Commit

Permalink
fix(core, js): Fix export files (#369)
Browse files Browse the repository at this point in the history
- Fix neon-core not referencing the correct export files
- Update package commands to use prod env for publishing
  • Loading branch information
snowypowers authored Dec 5, 2018
1 parent f2726fb commit 408326b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
command: yarn bootstrap
- run:
name: Build
command: yarn build
command: yarn build && yarn dist
- persist_to_workspace:
root: .
paths:
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"bootstrap": "lerna bootstrap",
"build": "tsc -b",
"dist": "lerna run dist",
"dist:prod": "lerna run dist:prod",
"lint": "tslint packages/**/src/**/*.ts packages/**/__tests__/**/*.ts packages/**/__integration__/**/*.ts",
"precommit": "yarn lint && yarn pretty",
"prestart": "yarn build && yarn dist",
"prepublishOnly": "yarn clean && yarn build && yarn dist:prod",
"pretty": "prettier --write --loglevel=warn \"**/{src,__{tests,integration}__}/**/*.ts\"",
"release": "yarn clean && yarn build && yarn dist && lerna publish",
"release": "yarn prepublishOnly && lerna publish",
"start": "jest --watch",
"test": "jest",
"test:integration": "jest /packages/.*/__integration__/.*",
Expand Down
9 changes: 5 additions & 4 deletions packages/neon-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
],
"author": "Yak Jun Xiang <[email protected]> (https://github.com/snowypowers)",
"license": "MIT",
"main": "lib/index.js",
"browser": "lib/browser.js",
"module": "src/index.js",
"main": "dist/index.js",
"browser": "dist/browser.js",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "tsc",
"clean": "rimraf ./lib ./dist",
"dist": "cross-env NODE_ENV=development webpack --mode development",
"dist:prod": "cross-env NODE_ENV=production webpack --mode production",
"prepublishOnly": "yarn clean && yarn build && yarn dist",
"prepublishOnly": "yarn clean && yarn build && yarn dist:prod",
"lint": "tslint src/**/*.ts __tests__/**/*.ts __integration__/**/*.ts",
"pretty": "prettier --write --loglevel=warn \"./{src,__{tests,integration}__}/**/*.ts\"",
"start": "jest --watch",
Expand Down Expand Up @@ -61,6 +61,7 @@
"webpack-cli": "3.1.2"
},
"files": [
"dist/",
"lib/",
"typings/"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/neon-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"clean": "rimraf ./lib ./dist",
"dist": "cross-env NODE_ENV=development webpack --mode development",
"dist:prod": "cross-env NODE_ENV=production webpack --mode production",
"prepublishOnly": "yarn clean && yarn build && yarn dist",
"prepublishOnly": "yarn clean && yarn build && yarn dist:prod",
"lint": "tslint src/**/*.ts __tests__/**/*.ts __integration__/**/*.ts",
"pretty": "prettier --write --loglevel=warn \"./{src,__{tests,integration}__}/**/*.ts\""
},
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@
dependencies:
"@types/bn.js" "*"

"@types/jest@^23.3.9":
"@types/[email protected]":
version "23.3.9"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.9.tgz#c16b55186ee73ae65e001fbee69d392c51337ad1"
integrity sha512-wNMwXSUcwyYajtbayfPp55tSayuDVU6PfY5gzvRSj80UvxdXEJOVPnUVajaOp7NgXLm+1e2ZDLULmpsU9vDvQw==
Expand Down Expand Up @@ -1702,7 +1702,7 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

clean-webpack-plugin@^1.0.0:
[email protected]:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-1.0.0.tgz#f184b9c26d12983d639828e0548ae2080e84b6a7"
integrity sha512-+f96f52UIET4tOFBbCqezx7KH+w7lz/p4fA1FEjf0hC6ugxqwZedBtENzekN2FnmoTF/bn1LrlkvebOsDZuXKw==
Expand Down Expand Up @@ -2014,7 +2014,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

cross-env@^5.2.0:
[email protected]:
version "5.2.0"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
Expand Down Expand Up @@ -3900,7 +3900,7 @@ jest-jasmine2@^23.6.0:
jest-util "^23.4.0"
pretty-format "^23.6.0"

jest-junit@^5.2.0:
[email protected]:
version "5.2.0"
resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-5.2.0.tgz#980401db7aa69999cf117c6d740a8135c22ae379"
integrity sha512-Mdg0Qpdh1Xm/FA1B/mcLlmEmlr3XzH5pZg7MvcAwZhjHijPRd1z/UwYwkwNHmCV7o4ZOWCf77nLu7ZkhHHrtJg==
Expand Down Expand Up @@ -4056,7 +4056,7 @@ jest-validate@^23.0.1, jest-validate@^23.6.0:
leven "^2.1.0"
pretty-format "^23.6.0"

jest-watch-typeahead@^0.2.0:
[email protected]:
version "0.2.0"
resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.2.0.tgz#dd0cef120360ac75b93c0afbcdcf21a54b3e43c9"
integrity sha512-8Odp2BLxkJByDAFVQk0fmP9DgRxA7quKw1ihBCEC+q7j9LKwZGp2LsnfDOUxoHrIBIdRbWfBBHHtnxIjeArG8A==
Expand All @@ -4083,7 +4083,7 @@ jest-worker@^23.2.0:
dependencies:
merge-stream "^1.0.1"

jest@^23.6.0:
[email protected]:
version "23.6.0"
resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d"
integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw==
Expand Down Expand Up @@ -4253,7 +4253,7 @@ left-pad@^1.3.0:
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==

lerna@^3.5.0:
[email protected]:
version "3.5.0"
resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.5.0.tgz#fd989b8992701e90e10aa5b3970d6f7a3512ba64"
integrity sha512-12kZb2yCJtx3rhLycepzHTbR6suqLaqky2hSldGQh9+B7FXFgvbQJXwzoi+Y7+1cstmKHHyockdRYFLiLmiEYA==
Expand Down Expand Up @@ -5452,7 +5452,7 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=

prettier@^1.15.2:
[email protected]:
version "1.15.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.2.tgz#d31abe22afa4351efa14c7f8b94b58bb7452205e"
integrity sha512-YgPLFFA0CdKL4Eg2IHtUSjzj/BWgszDHiNQAe0VAIBse34148whfdzLagRL+QiKS+YfK5ftB6X4v/MBw8yCoug==
Expand Down Expand Up @@ -5918,7 +5918,7 @@ retry@^0.10.0:
resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4"
integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=

rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
rimraf@2, rimraf@2.6.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==
Expand Down Expand Up @@ -6653,7 +6653,7 @@ trim-right@^1.0.1:
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=

ts-jest@^23.10.5:
[email protected]:
version "23.10.5"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-23.10.5.tgz#cdb550df4466a30489bf70ba867615799f388dd5"
integrity sha512-MRCs9qnGoyKgFc8adDEntAOP64fWK1vZKnOYU1o2HxaqjdJvGqmkLCPCnVq1/If4zkUmEjKPnCiUisTrlX2p2A==
Expand All @@ -6668,7 +6668,7 @@ ts-jest@^23.10.5:
semver "^5.5"
yargs-parser "10.x"

ts-loader@^5.3.1:
[email protected]:
version "5.3.1"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-5.3.1.tgz#70614c8ec4354a9c8b89c9f97b2becb7a98a3980"
integrity sha512-fDDgpBH3SR8xlt2MasLdz3Yy611PQ/UY/KGyo7TgXhTRU/6sS8uGG0nJYnU1OdFBNKcoYbId1UTNaAOUn+i41g==
Expand All @@ -6684,12 +6684,12 @@ tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==

tslint-config-prettier@^1.17.0:
[email protected]:
version "1.17.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.17.0.tgz#946ed6117f98f3659a65848279156d87628c33dc"
integrity sha512-NKWNkThwqE4Snn4Cm6SZB7lV5RMDDFsBwz6fWUkTxOKGjMx8ycOHnjIbhn7dZd5XmssW3CwqUjlANR6EhP9YQw==

tslint@^5.11.0:
[email protected]:
version "5.11.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed"
integrity sha1-mPMMAurjzecAYgHkwzywi0hYHu0=
Expand Down Expand Up @@ -6944,7 +6944,7 @@ webidl-conversions@^4.0.2:
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==

webpack-cli@^3.1.2:
[email protected]:
version "3.1.2"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.1.2.tgz#17d7e01b77f89f884a2bbf9db545f0f6a648e746"
integrity sha512-Cnqo7CeqeSvC6PTdts+dywNi5CRlIPbLx1AoUPK2T6vC1YAugMG3IOoO9DmEscd+Dghw7uRlnzV1KwOe5IrtgQ==
Expand All @@ -6968,7 +6968,7 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0:
source-list-map "^2.0.0"
source-map "~0.6.1"

webpack@^4.26.1:
[email protected]:
version "4.26.1"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.26.1.tgz#ff3a9283d363c07b3494dfa702d08f4f2ef6cb39"
integrity sha512-i2oOvEvuvLLSuSCkdVrknaxAhtUZ9g+nLSoHCWV0gDzqGX2DXaCrMmMUpbRsTSSLrUqAI56PoEiyMUZIZ1msug==
Expand Down

0 comments on commit 408326b

Please sign in to comment.