diff --git a/example/javascript/README.md b/example/javascript/README.md deleted file mode 100644 index 7d19c19..0000000 --- a/example/javascript/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# JavaScript example - -JavaScript microcms-js-sdk sample. - -[Getting Started](https://document.microcms.io/tutorial/javascript/javascript-getting-started) diff --git a/example/javascript/index.html b/example/javascript/index.html deleted file mode 100644 index de6c310..0000000 --- a/example/javascript/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - microCMS SDK - - -

- - - - - diff --git a/example/next/.gitignore b/example/next/.gitignore deleted file mode 100644 index 1437c53..0000000 --- a/example/next/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local - -# vercel -.vercel diff --git a/example/next/README.md b/example/next/README.md deleted file mode 100644 index 7471f05..0000000 --- a/example/next/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Next.js example - -Next.js microcms-js-sdk sample. - -[Getting Started](https://document.microcms.io/tutorial/next/next-getting-started) diff --git a/example/next/libs/client.js b/example/next/libs/client.js deleted file mode 100644 index b536d07..0000000 --- a/example/next/libs/client.js +++ /dev/null @@ -1,6 +0,0 @@ -import { createClient } from 'microcms-js-sdk'; - -export const client = createClient({ - serviceDomain: 'service-domain', - apiKey: 'api-key', -}); diff --git a/example/next/package.json b/example/next/package.json deleted file mode 100644 index 8ca7dba..0000000 --- a/example/next/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "next", - "version": "1.0.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "microcms-js-sdk": "latest", - "next": "10.2.0", - "react": "17.0.2", - "react-dom": "17.0.2" - }, - "devDependencies": { - "prettier": "^2.3.0" - } -} diff --git a/example/next/pages/_app.js b/example/next/pages/_app.js deleted file mode 100644 index 1e1cec9..0000000 --- a/example/next/pages/_app.js +++ /dev/null @@ -1,7 +0,0 @@ -import '../styles/globals.css' - -function MyApp({ Component, pageProps }) { - return -} - -export default MyApp diff --git a/example/next/pages/api/hello.js b/example/next/pages/api/hello.js deleted file mode 100644 index 9987aff..0000000 --- a/example/next/pages/api/hello.js +++ /dev/null @@ -1,5 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction - -export default (req, res) => { - res.status(200).json({ name: 'John Doe' }) -} diff --git a/example/next/pages/index.js b/example/next/pages/index.js deleted file mode 100644 index 40bcc8d..0000000 --- a/example/next/pages/index.js +++ /dev/null @@ -1,33 +0,0 @@ -import Head from 'next/head'; -import styles from '../styles/Home.module.css'; -import { client } from '../libs/client'; - -export default function Home({ data }) { - return ( -
- - Create Next App - - - -
-

{data.text}

-

- Get started by editing pages/index.js -

-
-
- ); -} - -export const getStaticProps = async () => { - const data = await client.get({ - endpoint: 'hello', - }); - - return { - props: { - data, - }, - }; -}; diff --git a/example/next/public/favicon.ico b/example/next/public/favicon.ico deleted file mode 100644 index 4965832..0000000 Binary files a/example/next/public/favicon.ico and /dev/null differ diff --git a/example/next/public/vercel.svg b/example/next/public/vercel.svg deleted file mode 100644 index fbf0e25..0000000 --- a/example/next/public/vercel.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/example/next/styles/Home.module.css b/example/next/styles/Home.module.css deleted file mode 100644 index 35454bb..0000000 --- a/example/next/styles/Home.module.css +++ /dev/null @@ -1,121 +0,0 @@ -.container { - min-height: 100vh; - padding: 0 0.5rem; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - height: 100vh; -} - -.main { - padding: 5rem 0; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -.footer { - width: 100%; - height: 100px; - border-top: 1px solid #eaeaea; - display: flex; - justify-content: center; - align-items: center; -} - -.footer a { - display: flex; - justify-content: center; - align-items: center; - flex-grow: 1; -} - -.title a { - color: #0070f3; - text-decoration: none; -} - -.title a:hover, -.title a:focus, -.title a:active { - text-decoration: underline; -} - -.title { - margin: 0; - line-height: 1.15; - font-size: 4rem; -} - -.title, -.description { - text-align: center; -} - -.description { - line-height: 1.5; - font-size: 1.5rem; -} - -.code { - background: #fafafa; - border-radius: 5px; - padding: 0.75rem; - font-size: 1.1rem; - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; -} - -.grid { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - max-width: 800px; - margin-top: 3rem; -} - -.card { - margin: 1rem; - padding: 1.5rem; - text-align: left; - color: inherit; - text-decoration: none; - border: 1px solid #eaeaea; - border-radius: 10px; - transition: color 0.15s ease, border-color 0.15s ease; - width: 45%; -} - -.card:hover, -.card:focus, -.card:active { - color: #0070f3; - border-color: #0070f3; -} - -.card h2 { - margin: 0 0 1rem 0; - font-size: 1.5rem; -} - -.card p { - margin: 0; - font-size: 1.25rem; - line-height: 1.5; -} - -.logo { - height: 1em; - margin-left: 0.5rem; -} - -@media (max-width: 600px) { - .grid { - width: 100%; - flex-direction: column; - } -} diff --git a/example/next/styles/globals.css b/example/next/styles/globals.css deleted file mode 100644 index e5e2dcc..0000000 --- a/example/next/styles/globals.css +++ /dev/null @@ -1,16 +0,0 @@ -html, -body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; -} - -a { - color: inherit; - text-decoration: none; -} - -* { - box-sizing: border-box; -} diff --git a/example/node/README.md b/example/node/README.md deleted file mode 100644 index bd59b29..0000000 --- a/example/node/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Node.js example - -Node.js microcms-js-sdk sample. - -[Getting Started](https://document.microcms.io/tutorial/javascript/javascript-getting-started) diff --git a/example/node/index.js b/example/node/index.js deleted file mode 100644 index 2a6f1a5..0000000 --- a/example/node/index.js +++ /dev/null @@ -1,10 +0,0 @@ -const { createClient } = require('microcms-js-sdk'); - -const client = createClient({ serviceDomain: 'service-domain', apiKey: 'api-key' }); - -client - .get({ - endpoint: 'hello', - }) - .then((res) => console.log(res)) - .catch((err) => console.log(err)); diff --git a/example/node/package.json b/example/node/package.json deleted file mode 100644 index ee6e777..0000000 --- a/example/node/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "node", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "microcms-js-sdk": "latest" - } -} \ No newline at end of file diff --git a/example/nuxt/README.md b/example/nuxt/README.md deleted file mode 100644 index 18e9fcc..0000000 --- a/example/nuxt/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Nuxt.js example - -When using SDK with Nuxt.js, it is recommended to use nuxt-microcms-module. - -[nuxt-microcms-module](https://github.com/microcmsio/nuxt-microcms-module) - -This Getting Started is compatible with nuxt-microcms-module. - -[Getting Started](https://document.microcms.io/tutorial/nuxt/nuxt-getting-started)