- When Gatsby starts up, it will read
gatsby-config.js
first. - As you can see below, we use that file to
require('ts-node').register()
which registers a TypeScript evaluator that will be used when Gatsby reads all other API Javascript files. In other words, we only need to do this once in our entire codebase and not in other Gatsby files likegatsby-node.js
. - Our
gatsby-config.js
re-exports all the exported variables available ingatsby-config.ts
.
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
// .storybook/config.js | |
import { addParameters, configure } from '@storybook/react'; | |
import { storySort } from 'storybook-sort'; | |
addParameters({ | |
options: { | |
showRoots: true, | |
storySort: storySort({ order: ['Home', 'Pages', ['Projects', 'Community', 'Help'], 'Components']}), | |
}, |
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
// MyComponent.js | |
import { apiFunc } from 'some-project'; | |
const styles = { | |
base: { | |
color: '#fff', | |
':hover': { | |
backgroundColor: '#0074d9', | |
}, | |
}, |
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
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
.component, | |
%component { | |
content: 'component'; | |
&--variant { |
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
// Initialize the Sass variables and partials used in this project. | |
// Set the legacy IE support variables. We override the default values set by | |
// the compass/support partial, but let styles-ie8.scss override these values. | |
$legacy-support-for-ie6 : false !default; | |
$legacy-support-for-ie7 : false !default; // Note the use of !default. | |
$legacy-support-for-ie8 : false !default; | |
// Partials to be shared with all .scss files. |
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
hr { | |
height: 0; | |
border: none { | |
top: 1px solid black; | |
} | |
} |
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
a:link { | |
color: #93008e; | |
} | |
.comment { | |
margin-left: 2.5em; | |
} | |
blockquote { | |
margin: 1.5em 2.5em; |
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
// Sass (v3.2.10) | |
// Compass (v0.13.alpha.4) | |
ul.side-nav li { | |
a:link, | |
a:visited { | |
color: #0000cc; | |
} | |
a:focus, | |
a:hover, |
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
// Sass (v3.2.10) | |
// Compass (v0.13.alpha.4) | |
.button { | |
padding: 2px; | |
border: 1px solid #666; | |
border-radius: 5px; | |
color: #000; | |
background-color: #00adee; | |
} |
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
// Sass (v3.2.10) | |
// Compass (v0.13.alpha.4) | |
@import "compass" | |
/* Search form. | |
#search | |
border: 1px solid #666 | |
.button |
NewerOlder