Skip to content

Commit 94ad9b8

Browse files
authored
feat(TU-7813): Add index.html to ./dist directory (#9)
It will be served on https://btn.typeform.com/ and redirects to the Github repository.
1 parent d2b9fd8 commit 94ad9b8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"scripts": {
1010
"build": "esbuild index=src/index.ts button=src/browser.ts --bundle --format=esm --minify --sourcemap",
1111
"watch": "yarn build --watch",
12-
"dist": "yarn build --outdir=dist",
12+
"add-dist-index": "echo \"<!DOCTYPE html><html><head><meta http-equiv='refresh' content='1; url=https://github.com/Typeform/button' /></head><body><p>Please follow <a href='https://github.com/Typeform/button'>this link</a> for button SDK.</p></body></html>\" > ./dist/index.html",
13+
"dist": "yarn build --outdir=dist && yarn add-dist-index",
1314
"start": "yarn watch --serve=1337 --servedir=demo --outdir=demo/dist",
1415
"lint": "eslint src --ext .js,.ts,.jsx,.tsx --max-warnings=0 && yarn prettier-check",
1516
"prettier-check": "prettier --check . --ignore-path .eslintignore",

0 commit comments

Comments
 (0)