Skip to content

Commit

Permalink
Merge pull request #1 from wellcometrust/task/8710-integrate-ds-into-…
Browse files Browse the repository at this point in the history
…wellcome-dot-org

8710 task: Integrate Design System into wellcome.org
  • Loading branch information
creido-welly authored Jul 9, 2021
2 parents 8df908e + cd7d571 commit 367f138
Show file tree
Hide file tree
Showing 11 changed files with 383 additions and 13 deletions.
1 change: 1 addition & 0 deletions .storybook/styles/storybook-app.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'styles/core';
@import 'styles/theme';
@import 'styles/common';
@import './storybook-global';
@import './storybook-icons';
17 changes: 16 additions & 1 deletion config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import autoprefixer from 'autoprefixer';
import babel from '@rollup/plugin-babel';
import calc from 'postcss-calc';
import commonjs from '@rollup/plugin-commonjs';
import copy from 'rollup-plugin-copy';
import ignoreImport from 'rollup-plugin-ignore-import';
import json from '@rollup/plugin-json';
import nodeResolve from '@rollup/plugin-node-resolve'; // resolves all the node dependencies
Expand All @@ -28,7 +29,8 @@ export default (async () => ([
*/
{
input: [
'src/styles/core.ts'
'src/styles/core.ts',
'src/styles/theme.ts'
],
output: {
dir: 'dist',
Expand Down Expand Up @@ -161,6 +163,19 @@ export default (async () => ([
commonjs(),
ignoreImport({
extensions: ['.scss', '.css']
}),

/**
* 5. Copy and rename dist/index to provide correct type defs
* for named exports
*
* This is included here to separate it from the previous process which
* runs the virtual index build, to ensure that process completes and
* the index file is generated before attempting to copy.
*/
copy({
targets: [{ src: 'dist/index.js', dest: 'dist/', rename: 'index.d.ts' }],
verbose: true
})
]
},
Expand Down
294 changes: 294 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"react-docgen-typescript-loader": "^3.6.0",
"react-dom": "16.12.0",
"rollup": "^2.28.2",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-ignore-import": "^1.3.2",
"rollup-plugin-styles": "^3.14.1",
"rollup-plugin-terser": "^5.2.0",
Expand Down
Loading

0 comments on commit 367f138

Please sign in to comment.