forked from contentful/field-editors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doczrc.js
44 lines (40 loc) · 1.13 KB
/
doczrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* global process */
import fs from 'fs';
import tokens from '@contentful/forma-36-tokens';
const forma36Styles = fs.readFileSync(
process.cwd() + '/node_modules/@contentful/forma-36-react-components/dist/styles.css'
);
const pikadayStyles = fs.readFileSync(process.cwd() + '/packages/date/styles/styles.css');
export default {
title: 'Contentful Field Editors',
description: 'React components and extensions for building Contentful entry editor',
src: './packages/',
files: '**/*.mdx',
typescript: true,
port: 9000,
codeSandbox: false,
themeConfig: {
colors: {
primary: tokens.colorBlueBase,
secondary: tokens.colorIceMid,
gray: tokens.colorElementMid,
},
},
htmlContext: {
head: {
raw: `<style>${forma36Styles}</style><style>${pikadayStyles}</style>`,
},
},
menu: ['Introduction', 'Editors', 'Shared'],
modifyBabelRc: (babelrc) => {
const newBabelRc = {
...babelrc,
plugins: [
...babelrc.plugins,
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
],
};
return newBabelRc;
},
};