1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-30 22:08:02 +00:00

ampのサンプル

This commit is contained in:
Nebel 2019-04-21 19:17:15 +09:00
commit a1c6251ee9
11 changed files with 11709 additions and 0 deletions

6
.babelrc Normal file
View file

@ -0,0 +1,6 @@
{
"presets": [
"next/babel",
"@zeit/next-typescript/babel"
]
}

20
.eslintrc.yml Normal file
View file

@ -0,0 +1,20 @@
env:
browser: true
es6: true
extends:
- plugin:prettier/recommended
- prettier/@typescript-eslint
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parser:
'@typescript-eslint/parser'
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: 2018
sourceType: module
plugins:
- react
- '@typescript-eslint'
rules: {}

91
.gitignore vendored Normal file
View file

@ -0,0 +1,91 @@
# Created by https://www.gitignore.io/api/node
# Edit at https://www.gitignore.io/?templates=node
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# End of https://www.gitignore.io/api/node

2
next.config.js Normal file
View file

@ -0,0 +1,2 @@
const withTypescript = require("@zeit/next-typescript");
module.exports = withTypescript();

6327
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

27
package.json Normal file
View file

@ -0,0 +1,27 @@
{
"name": "next-example",
"version": "1.0.0",
"author": "Kohei Watanabe <kou029w@gmail.com>",
"license": "MIT",
"private": true,
"dependencies": {
"@zeit/next-typescript": "^1.1.1",
"next": "^8.1.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"typescript": "^3.4.4"
},
"devDependencies": {
"@types/next": "^8.0.3",
"@types/react": "^16.8.14",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"prettier": "^1.17.0"
},
"scripts": {
"dev": "next"
}
}

4
pages/_app.ts Normal file
View file

@ -0,0 +1,4 @@
import App from "next/app";
import { withAmp } from "next/amp";
export default withAmp(App);

9
pages/about.tsx Normal file
View file

@ -0,0 +1,9 @@
import React from "react";
const About: React.FC = () => (
<article>
<h1>About</h1>
<a href="/">Back to Home</a>
</article>
);
export default About;

9
pages/index.tsx Normal file
View file

@ -0,0 +1,9 @@
import React from "react";
const Home: React.FC = () => (
<article>
<h1>Hello Next.js</h1>
<a href="/about">/about</a>
</article>
);
export default Home;

22
tsconfig.json Normal file
View file

@ -0,0 +1,22 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"jsx": "preserve",
"lib": [
"dom",
"es2017"
],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveConstEnums": true,
"removeComments": false,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "esnext"
}
}

5192
yarn.lock Normal file

File diff suppressed because it is too large Load diff