nwtgck / typescript-on-browser-starter

Starter for TypeScript on Web Browser

Home Page:https://typescript-on-browser-starter.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

typescript-on-browser-starter

Netlify Status

Starter for TypeScript on Web Browser

Purpose

For users who wants to try TypeScript on Web Browser easily and stress free

Feature

  • Simple as possible
  • Source map
  • Hot reload

Quick Start

# 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

How to change

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.

Build

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.

About

Starter for TypeScript on Web Browser

https://typescript-on-browser-starter.netlify.com/

License:MIT License


Languages

Language:JavaScript 61.2%Language:TypeScript 25.8%Language:HTML 13.0%