Starter for TypeScript on Web Browser
For users who wants to try TypeScript on Web Browser easily and stress free
- Simple as possible
- Source map
- Hot reload
# You can change app name
APP_NAME="myapp"
git clone https://github.com/nwtgck/typescript-on-browser-starter.git $APP_NAME && \
cd $APP_NAME && \
rm -rf .git && \
sed -i '' "s/typescript-on-browser-starter/${APP_NAME}/" package.json && \
sed -i '' "s/Starter for TypeScript on Web Browser/${APP_NAME}/" package.json && \
echo -e "# $APP_NAME" > README.md && \
sed -i '' "s/2019/$(date -u "+%Y")/" LICENSE && \
npm i
First, you can serve a develop server as follows.
npm install
npm run serve
Then, you can access to http://localhost:8080/, which will be loaded automatically if file changes detected.
You can modify src/index.ts as you want.
npm install
npm run build
Then, you get ./dist
directory. The file structure should be the following.
dist/
├── bundle.js
├── index.html
└── src
└── index.d.ts
bundle.js
includes an inline source map.