-
Create a Gatsby site.
Use the Gatsby CLI to create a new site, specifying the hello-world starter.
# create a new Gatsby site using the hello-world starter gatsby new my-hello-world-starter https://github.com/hdorgeval/gatsby-starter-ts-hello-world -
Start developing.
Navigate into your new site’s directory and start it up.
cd my-hello-world-starter/ npm start -
Open the source code and start editing!
Your site is now running at
http://localhost:8000!Note: You'll also see a second link:
http://localhost:8000/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.Open the
my-hello-world-starterdirectory in your code editor of choice and editsrc/pages/index.tsx. Save your changes and the browser will update in real time!
Looking for more guidance? Full documentation for Gatsby lives on the website. Here are some places to start:
-
For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
-
To dive straight into code samples, head to our documentation. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.
Run script:
npm run css-watchThis will automatically create/update a .d.ts typings file whenever you add or modify a .css file.
This will enable you to import .css file in any .tsx file, like for example:
import styles from './index.module.css';Plus added support of IntelliSense in VSCode ;
To update/create all .css.d.ts files in one shot:
npm run create-types-for-css-modulesRun script:
npm run sass-watchThis will automatically create/update a .d.ts typings file whenever you add or modify a .scss file.
This will enable you to import .scss file in any .tsx file, like for example:
import styles from './index.module.scss';Plus added support of IntelliSense in VSCode ;
To update/create all .scss.d.ts files in one shot:
npm run create-types-for-sass-modules