Skip to content

Commit

Permalink
Update nextjs-scheduler to export static files (#672)
Browse files Browse the repository at this point in the history
* Update nextjs-scheduler to export static files

* Update examples/README.md
  • Loading branch information
hackerwins committed Oct 20, 2023
1 parent 5fc5a20 commit a9325d6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ $ npm run dev
```

Open the browser and go to the URL that is printed in the terminal.

## Releasing an example to https://yorkie.dev

To release an example, the example should export static files to `./dist` directory when running `npm run build`.
After the example is merged to the `main` branch, it is automatically deployed to https://yorkie.dev/yorkie-js-sdk/examples/{EXAMPLE-NAME}.
8 changes: 6 additions & 2 deletions examples/nextjs-scheduler/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
output: 'export',
distDir: 'dist',
basePath: '/yorkie-js-sdk/examples/nextjs-scheduler',
};

module.exports = nextConfig
module.exports = nextConfig;
2 changes: 1 addition & 1 deletion examples/nextjs-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev -p 5173",
"build": "next build",
"build": "next build && touch ./dist/.nojekyll",
"start": "next start",
"lint": "next lint"
},
Expand Down

0 comments on commit a9325d6

Please sign in to comment.