[Parcel] Running TypeScript with parcel-bundler

TO get started with TypeScirpt quickly in your local computer is using parcel-bunlder:

npm i -g parcel-bundler

 

Create a index.html:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>

  <script src="./index.ts"></script>
</body>

</html>

 

Create a index.ts, put whatever you want.

Run:

parcel index.html

parcel run take care everything for you.

posted @ 2019-01-28 15:45  Zhentiw  阅读(203)  评论(0编辑  收藏  举报