-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
raihan-muhammad
committed
Oct 6, 2020
1 parent
f932145
commit 223a212
Showing
1 changed file
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,41 @@ | ||
# basic-typescript | ||
This is a repo for learning source code on the basics of typescript | ||
# Typescript | ||
|
||
TypeScript adalah bahasa pemrograman open source yang dikembangkan dan dikelola oleh Microsoft. Ini adalah superset sintaksis ketat dari JavaScript dan menambahkan pengetikan statis opsional ke bahasa. TypeScript dirancang untuk pengembangan aplikasi besar dan ditranskompilasi ke JavaScript. (Wikipedia) | ||
|
||
## Cara Penggunaan | ||
|
||
Lakukan perintah install terlebih dahulu | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
Untuk mengkompile file typescript ke JavaScript se kali kompile | ||
|
||
``` | ||
npm run tsc | ||
``` | ||
|
||
Untuk mengkompile file typescript ke JavaScript setiap kali ada perubahaan di file typescript | ||
|
||
``` | ||
npm run ts | ||
``` | ||
|
||
Untuk melakukan uji coba hasil compile | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
Note: tapi pastikan di script dev nya file dalam folder build yang ingin di testing sudah sesuai yang di inginkan | ||
|
||
``` | ||
"scripts": { | ||
"tsc": "rm -rf build/ && tsc", | ||
"ts": "rm -rf build/ && tsc -w", | ||
"dev": "nodemon ./build/nama-file-yg-ingin-kamu-coba.js" | ||
} | ||
``` | ||
|
||
Selamat Belajar! Semangat! |