0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

コピペで練習 typescript

Posted at
# npm 初期化
npm --version
npm init # package.json 作成

# typescript インストール
# -g オプションは使いたくない
npm install --save-dev typescript # package-lock.json 作成

# greeter.ts 作成
# greeter.html 作成
# https://qiita.com/Futo_Horio/items/de182639b7e4261c9606

# パス指定で実行
./node_modules/.bin/tsc --version  # tsc バージョン確認
./node_modules/.bin/tsc --init     # tsconfig.json 作成
./node_modules/.bin/tsc greeter.ts # コンパイル

# npm run は使い物にならない
npm run --version      # npx バージョン確認
npm run tsc --version  # tsc バージョン確認
npm run tsc --init     # 動作しない
npm run tsc greeter.ts # 動作しない

# npx は使える
npx --version      # npx バージョン確認
npx tsc --version  # tsc バージョン確認
npx tsc --init     # tsconfig.json 作成
npx tsc greeter.ts # コンパイル

# greeter.html を開いてみる
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?