Skip to content

Commit 367f138

Browse files
authored
Merge pull request #1 from wellcometrust/task/8710-integrate-ds-into-wellcome-dot-org
8710 task: Integrate Design System into wellcome.org
2 parents 8df908e + cd7d571 commit 367f138

File tree

11 files changed

+383
-13
lines changed

11 files changed

+383
-13
lines changed

.storybook/styles/storybook-app.scss

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import 'styles/core';
2+
@import 'styles/theme';
23
@import 'styles/common';
34
@import './storybook-global';
45
@import './storybook-icons';

config/rollup.config.js

+16-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import autoprefixer from 'autoprefixer';
22
import babel from '@rollup/plugin-babel';
33
import calc from 'postcss-calc';
44
import commonjs from '@rollup/plugin-commonjs';
5+
import copy from 'rollup-plugin-copy';
56
import ignoreImport from 'rollup-plugin-ignore-import';
67
import json from '@rollup/plugin-json';
78
import nodeResolve from '@rollup/plugin-node-resolve'; // resolves all the node dependencies
@@ -28,7 +29,8 @@ export default (async () => ([
2829
*/
2930
{
3031
input: [
31-
'src/styles/core.ts'
32+
'src/styles/core.ts',
33+
'src/styles/theme.ts'
3234
],
3335
output: {
3436
dir: 'dist',
@@ -161,6 +163,19 @@ export default (async () => ([
161163
commonjs(),
162164
ignoreImport({
163165
extensions: ['.scss', '.css']
166+
}),
167+
168+
/**
169+
* 5. Copy and rename dist/index to provide correct type defs
170+
* for named exports
171+
*
172+
* This is included here to separate it from the previous process which
173+
* runs the virtual index build, to ensure that process completes and
174+
* the index file is generated before attempting to copy.
175+
*/
176+
copy({
177+
targets: [{ src: 'dist/index.js', dest: 'dist/', rename: 'index.d.ts' }],
178+
verbose: true
164179
})
165180
]
166181
},

package-lock.json

+294
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"react-docgen-typescript-loader": "^3.6.0",
112112
"react-dom": "16.12.0",
113113
"rollup": "^2.28.2",
114+
"rollup-plugin-copy": "^3.4.0",
114115
"rollup-plugin-ignore-import": "^1.3.2",
115116
"rollup-plugin-styles": "^3.14.1",
116117
"rollup-plugin-terser": "^5.2.0",

0 commit comments

Comments
 (0)