Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 27, 2020. It is now read-only.

🌳 Next@8.1, Styled-jsx, TypeScript, Jest, SEO

License

NotificationsYou must be signed in to change notification settings

deptno/next.js-typescript-starter-kit

Repository files navigation

samples

seeChangeLog

Feature

  • 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)

Load from CDN

  • font-awesome@5

Installation

git clone https://github.com/deptno/next.js-typescript-starter-kit my-projectcd my-projectrm -r .gityarn

Run 🚀

🚀 Test

yarntest# testyarn test:watchyarn test:coverage# report coverage
~~:rocket: StoryBook~~

🚀 StoryBook

yarn storybook# open browser localhost:6006
yarn build-storybook# Build storybook static assets

🚀 Development

yarn start:dev# run

🚀 Production

Serve

yarnyarn build# create .next directoryyarn start# start server

Build static HTML

yarnyarn build# create .next directoryyarnexport# create .out directory

Configuration

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

Usage

import*asclassnamesfrom'classnames'import*ascssfrom'./Home.css'exportconstJust=props=><divclassName={css.className}>exportconstMixed=props=><divclassName={classnames('row','home',css.home)}>

Styled-jsx

constLayout=props=><head><stylejsx global>{`      div > * {        font-size: 32px;      }    `}</style></head>
exportconstHome=props=><div><stylejsx>{`{      color: darkred;    }`}</style>home</div>

Others

Related

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp