Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable annotations sourcemaps while linked #1184

Merged
merged 5 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build/webpack.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const { BannerPlugin, DefinePlugin, NormalModuleReplacementPlugin } = require('w
const license = require('./license');
const pkg = require('../package.json');

const isLinked = process.env.IS_LINKED === '1';
const getAnnotationsPath = () =>
ConradJChan marked this conversation as resolved.
Show resolved Hide resolved
isLinked ? /.*box-annotations\/dist\/.*/ : path.resolve('node_modules/box-annotations');

/* eslint-disable global-require */
/* eslint-disable import/no-dynamic-require */
module.exports = language => {
Expand All @@ -25,7 +29,7 @@ module.exports = language => {
use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader'],
include: [
path.resolve('src/lib'),
path.resolve('node_modules/box-annotations'),
getAnnotationsPath(),
path.resolve('node_modules/box-ui-elements'),
],
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"babel-plugin-istanbul": "^5.2.0",
"babel-plugin-react-remove-properties": "^0.3.0",
"babel-plugin-transform-require-ignore": "^0.1.1",
"box-annotations": "^2.3.0",
"box-annotations": "^3.13.0",
ConradJChan marked this conversation as resolved.
Show resolved Hide resolved
"box-ui-elements": "^12.0.0-beta.10",
"chai": "^4.2.0",
"chai-dom": "^1.8.1",
Expand Down Expand Up @@ -141,6 +141,7 @@
"setup": "yarn install",
"start": "yarn setup && yarn build:dev --watch",
"start:dev": "yarn build:i18n && LANGUAGE=en-US BABEL_ENV=dev NODE_ENV=dev yarn webpack-dev-server --config build/webpack.config.js",
"start:dev:linked": "f() { yarn link ${@:-box-annotations} && IS_LINKED=1 yarn start:dev; }; f",
ConradJChan marked this conversation as resolved.
Show resolved Hide resolved
"test": "yarn setup && yarn clean && yarn build:i18n && NODE_ENV=test yarn karma start build/karma.conf.js",
"test:e2e": "npm-run-all -p -r start:dev cy:run",
"test:e2e:open": "npm-run-all -p -r start:dev cy:open",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2309,10 +2309,10 @@ [email protected]:
dependencies:
hoek "4.x.x"

box-annotations@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/box-annotations/-/box-annotations-2.3.0.tgz#5cac38171f7f8d9283659e2b243310f19d5ab7d3"
integrity sha512-Ea7tPgyJjX7vcnmZIfCorbzHd6oYx/OHVMPnZVQL/dUHR5vRKhLM0610xqwmVlUpk627sqHw5x/APaa+kt4SXg==
box-annotations@^3.13.0:
version "3.13.0"
resolved "https://registry.yarnpkg.com/box-annotations/-/box-annotations-3.13.0.tgz#053a34ef2ad7d5796beac811f481e2d1f4eee130"
integrity sha512-TRTrMprLfaBUwPJJ2bDpiLPv1/EopPhMCWmQPEhaiwrvfwYiI+uC6Aa0h0wREZpeqpcbxbc1AH8yMYSS7+vtwg==

box-ui-elements@^12.0.0-beta.10:
version "12.0.0-beta.10"
Expand Down