This repository was archived by the owner on Aug 27, 2020. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork56
🌳 Next@8.1, Styled-jsx, TypeScript, Jest, SEO
License
NotificationsYou must be signed in to change notification settings
deptno/next.js-typescript-starter-kit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
seeChangeLog
- TypeScript
- Styled-jsx
- Module css(PostCSS - cssnext, nested, import)
- SEO & analytics(Google Analytics, Facebook Pixel,
Naver Analytics) Storybook(support module css)- Jest & Enzyme(support module css)
- font-awesome@5
git clone https://github.com/deptno/next.js-typescript-starter-kit my-projectcd my-projectrm -r .gityarnyarntest# testyarn test:watchyarn test:coverage# report coverage
~~:rocket: StoryBook~~
yarn storybook# open browser localhost:6006yarn build-storybook# Build storybook static assetsyarn start:dev# runyarnyarn build# create .next directoryyarn start# start server
yarnyarn build# create .next directoryyarnexport# create .out directory
Set SEO & analytics variables
src/constants/env.ts
exportconstGA_TRACKING_ID=''exportconstFB_TRACKING_ID=''exportconstSENTRY_TRACKING_ID=''// for meta tag <og & twitter>exportconstSITE_NAME=''exportconstSITE_TITLE=''exportconstSITE_DESCRIPTION=''exportconstSITE_IMAGE=''
If each variable evaluated false, it does not load related library
Module CSS (src/components/Home.tsx)
import*asclassnamesfrom'classnames'import*ascssfrom'./Home.css'exportconstJust=props=><divclassName={css.className}>exportconstMixed=props=><divclassName={classnames('row','home',css.home)}>
Global scope (src/components/Layout.tsx)
constLayout=props=><head><stylejsx global>{` div > * { font-size: 32px; } `}</style></head>
Local scope (src/components/Home.tsx)
exportconstHome=props=><div><stylejsx>{`{ color: darkred; }`}</style>home</div>
- typescript-monorepo-next-example - Next.js version
About
🌳 Next@8.1, Styled-jsx, TypeScript, Jest, SEO
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.
