Skip to content
This repository was archived by the owner on Aug 27, 2020. It is now read-only.

Commit 2a4a6dc

Browse files
authored
Merge pull request #21 from deptno/next/7
Next/7
2 parents 91a4762 + 4257ad1 commit 2a4a6dc

File tree

11 files changed

+2004
-4343
lines changed

11 files changed

+2004
-4343
lines changed

.babelrc.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# changelog
22

3+
### 7.0.1
4+
- replace npm with yarn in `README.me`
5+
- remove storybook
6+
- apply postcss-preset-env
7+
- typescript@3.1.1
8+
- next@7.0.1
9+
- react@16.5
10+
311
### 6.1.1
412
- typescript@3.0.1
513
- next@6.1.1

README.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Start with sample
66

77
### Latest update
8-
- typescript@3.0.1
9-
- next@6.1.1
10-
- react@16.4
8+
- **REMOVED storybook** (conflict with TypeScript, Next), you can use via old version [v6.0.1](https://github.com/deptno/next.js-typescript-starter-kit/releases/tag/6.0.1)
9+
- typescript@3.1.1, next@7.0.1, react@16.5
10+
- applied postcss-preset-env
1111

1212
> see **[ChangeLog](CHANGELOG.md)**
1313
@@ -16,16 +16,9 @@ Start with sample
1616
- Styled-jsx
1717
- Module css **(PostCSS - cssnext, nested, import)**
1818
- SEO & analytics(Google Analytics, Facebook Pixel, <s>Naver Analytics</s>)
19-
- Storybook **(support module css)**
19+
- ~~Storybook **(support module css)**~~
2020
- Jest & Enzyme **(support module css)**
2121

22-
### Packages
23-
- next@6.1.1
24-
- react@16.4
25-
- redux-thunk
26-
- react-ga
27-
- redux-persist@4
28-
2922
### Load from CDN
3023
- font-awesome@5
3124

@@ -35,47 +28,53 @@ Start with sample
3528
git clone https://github.com/deptno/next.js-typescript-starter-kit my-project
3629
cd my-project
3730
rm -r .git
38-
npm install
31+
yarn
3932
```
4033

4134
## Run :rocket:
4235

4336
#### :rocket: Test
4437
```bash
45-
npm run test # test
46-
npm run test:watch
47-
npm run test:coverage # report coverage
38+
yarn test # test
39+
yarn test:watch
40+
yarn test:coverage # report coverage
4841
```
4942

43+
<details><summary>~~:rocket: StoryBook~~</summary>
44+
<p>
45+
5046
#### :rocket: StoryBook
5147
```bash
52-
npm run storybook # open browser localhost:6006
48+
yarn storybook # open browser localhost:6006
5349
```
5450

5551
```bash
56-
npm run build-storybook # Build storybook static assets
52+
yarn build-storybook # Build storybook static assets
5753
```
5854

55+
</p>
56+
</details>
57+
5958
### :rocket: Development
6059

6160
```bash
62-
npm run start:dev # run
61+
yarn start:dev # run
6362
```
6463

6564
### :rocket: Production
6665

6766
#### Serve
6867
```bash
69-
npm install
70-
npm run build # create .next directory
71-
npm start # start server
68+
yarn
69+
yarn build # create .next directory
70+
yarn start # start server
7271
```
7372

7473
#### Build static HTML
7574
```bash
76-
npm install
77-
npm run build # create .next directory
78-
npm run export # create .out directory
75+
yarn
76+
yarn build # create .next directory
77+
yarn export # create .out directory
7978
```
8079

8180
## Configuration

babel.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = (api) => {
2+
api.cache(true)
3+
return {
4+
presets: [
5+
'next/babel',
6+
'@zeit/next-typescript/babel'
7+
],
8+
plugins: [
9+
'@babel/proposal-class-properties',
10+
'@babel/proposal-object-rest-spread',
11+
['transform-define', {
12+
'process.env.NODE_ENV': process.env.NODE_ENV
13+
}]
14+
]
15+
}
16+
}

next.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
const path = require('path')
21
const withTypescript = require('@zeit/next-typescript')
32
const withCSS = require('@zeit/next-css')
4-
const {exportPathMap} = require('nextjs-export-path-map')
53
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer')
64

75
module.exports = withTypescript(
@@ -17,6 +15,5 @@ module.exports = withTypescript(
1715
return config
1816
},
1917
cssModules: true,
20-
exportPathMap: exportPathMap.bind(null, path.join(__dirname, 'pages')),
2118
})
2219
)

package.json

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next.js-typescript-starter-kit",
3-
"version": "6.1.1",
3+
"version": "7.0.1",
44
"main": "index.js",
55
"repository": "https://github.com/deptno/next.js-typescript-starter-kit",
66
"author": "Bonggyun Lee <deptno@gmail.com>",
@@ -15,16 +15,14 @@
1515
"test": "jest",
1616
"test:watch": "jest --watch",
1717
"test:coverage": "jest --coverage",
18-
"storybook": "start-storybook -p 6006",
19-
"build-storybook": "build-storybook",
2018
"ts:check": "tsc --noEmit"
2119
},
2220
"dependencies": {
23-
"classnames": "^2.2.5",
24-
"moment": "^2.22.1",
25-
"next": "^6.1.1",
26-
"react": "^16.4.2",
27-
"react-dom": "^16.4.2",
21+
"classnames": "^2.2.6",
22+
"moment": "^2.22.2",
23+
"next": "^7.0.1",
24+
"react": "^16.5.2",
25+
"react-dom": "^16.5.2",
2826
"react-ga": "^2.5.3",
2927
"react-redux": "^5.0.7",
3028
"redux": "^4.0.0",
@@ -33,40 +31,25 @@
3331
"redux-thunk": "^2.3.0"
3432
},
3533
"devDependencies": {
36-
"@storybook/addon-actions": "^3.4.7",
37-
"@storybook/addon-info": "^3.4.7",
38-
"@storybook/addon-links": "^3.4.7",
39-
"@storybook/addons": "^3.4.7",
40-
"@storybook/react": "^3.4.7",
41-
"@types/classnames": "^2.2.3",
34+
"@types/classnames": "^2.2.6",
4235
"@types/enzyme": "^3.1.10",
4336
"@types/enzyme-adapter-react-16": "^1.0.2",
44-
"@types/jest": "^22.2.3",
37+
"@types/jest": "^23.3.3",
4538
"@types/node": "^8.10.14",
4639
"@types/react": "^16.3.14",
4740
"@types/react-redux": "^6.0.0",
48-
"@zeit/next-css": "^0.2.0",
49-
"@zeit/next-typescript": "^1.1.0",
50-
"awesome-typescript-loader": "4",
51-
"babel-loader": "^7.1.4",
41+
"@zeit/next-css": "^1.0.1",
42+
"@zeit/next-typescript": "^1.1.1",
43+
"babel-loader": "^8.0.4",
5244
"babel-plugin-transform-define": "^1.3.0",
53-
"cssnano": "^3.10.0",
54-
"enzyme": "^3.3.0",
55-
"enzyme-adapter-react-16": "^1.1.1",
56-
"jest": "^22.4.3",
57-
"nextjs-export-path-map": "^0.1.2",
58-
"postcss": "^6.0.23",
59-
"postcss-browser-reporter": "^0.5.0",
60-
"postcss-cssnext": "^3.1.0",
61-
"postcss-import": "^11.1.0",
62-
"postcss-loader": "^2.1.5",
63-
"postcss-nested": "^3.0.0",
64-
"postcss-reporter": "^5.0.0",
65-
"postcss-url": "^7.3.2",
66-
"react-docgen-typescript-webpack-plugin": "^1.1.0",
67-
"ts-jest": "^22.4.6",
68-
"typescript": "^3.0.1",
69-
"webpack-bundle-analyzer": "^2.11.2"
45+
"enzyme": "^3.7.0",
46+
"enzyme-adapter-react-16": "^1.6.0",
47+
"jest": "^23.6.0",
48+
"postcss": "^7.0.5",
49+
"postcss-preset-env": "^6.0.10",
50+
"ts-jest": "^23.10.3",
51+
"typescript": "^3.1.1",
52+
"webpack-bundle-analyzer": "^3.0.2"
7053
},
7154
"jest": {
7255
"moduleFileExtensions": [
@@ -82,8 +65,8 @@
8265
],
8366
"globals": {
8467
"ts-jest": {
85-
"useBabelrc": true,
86-
"tsConfigFile": "jest.tsconfig.json"
68+
"babelConfig": true,
69+
"tsConfig": "jest.tsconfig.json"
8770
}
8871
},
8972
"coveragePathIgnorePatterns": [

postcss.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
module.exports = {
22
plugins: [
3-
require('postcss-import'),
4-
require('postcss-url'),
5-
require('postcss-cssnext'),
6-
require('postcss-nested'),
7-
require('postcss-browser-reporter'),
8-
require('cssnano')({autoprefixer: false})
3+
require('postcss-preset-env')()
94
]
105
}

stories/examples/.githolder

Whitespace-only changes.

stories/index.stories.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

tsconfig.storybook.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)