I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fluid typography with 16-24px font size range based on the width of the viewport */ | |
/* reference - https://css-tricks.com/snippets/css/fluid-typography/ */ | |
:root { | |
--min-content-width: 320; | |
--max-content-width: 1600; | |
--min-font-size: 16; | |
--max-font-size: 24; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { shallow } from 'enzyme'; | |
import App from '../App'; | |
describe('App', () => { | |
it('should exist', () => { | |
expect(App).toBeDefined(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configure } from 'enzyme'; | |
import * as Adapter from 'enzyme-adapter-react-16'; | |
configure({ adapter: new Adapter() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jest": { | |
"transform": { | |
"^.+\\.tsx?$": "ts-jest" | |
}, | |
"setupTestFrameworkScriptFile": "./setupTests.ts", | |
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", | |
"moduleNameMapper": { | |
"\\.(css|jpg|png|svg)$": "<rootDir>/node_modules/jest-css-modules" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import * as styles from './App.module.css'; | |
const App: React.SFC<{}> = () => <div> | |
<h1 className={styles.heading}>My App</h1> | |
</div>; | |
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.heading { | |
color: purple | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
const App: React.SFC<{}> = () => <div> | |
<h1>My App</h1> | |
</div>; | |
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "esnext", | |
"strict": true, | |
"module": "es2015", | |
"moduleResolution": "node", | |
"jsx": "react" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
presets: [ | |
require('poi-preset-react')(), | |
require('poi-preset-typescript')() | |
] | |
} |
NewerOlder