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

Commit

Permalink
feat: add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
eyworldwide committed Nov 10, 2022
1 parent 89dabd5 commit 2db872c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ yarn playground
```bash
$ yarn build
```
## Deploy
```bash
$ yarn deploy
```

## Q&A
#### How to insert a playground in markdown
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Oasis Engine - 移动优先的高性能 Web 互动引擎</title>
<title>Oasis Engine - Mobile first high performance web interactive engine</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"scripts": {
"dev": "vite --host",
"build": "vite build",
"test": "node scripts/test.js",
"deploy": "gh-pages -d dist",
"playground": "vite serve playground/.dev --config playground/.dev/vite.config.js"
},
"eslintConfig": {
Expand Down Expand Up @@ -89,6 +89,7 @@
"@types/react-scroll": "^1.8.4",
"@types/react-syntax-highlighter": "^15.5.5",
"fs-extra": "^10.1.0",
"gh-pages": "^4.0.0",
"less": "^4.1.3",
"sass": "^1.55.0"
},
Expand Down
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function replaceCDN() {
fs.writeFileSync(entryHTML, text, {
encoding: 'utf8'
});

fs.copyFileSync('CNAME', 'dist/CNAME')
}
}
}
Expand Down

0 comments on commit 2db872c

Please sign in to comment.