Skip to content

Commit 86e87d0

Browse files
committed
Add instructions for global installation.
1 parent b4d8ace commit 86e87d0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ In the meantime, first install [node](https://nodejs.org/en/download/) and
1515
git clone https://github.com/mkantor/code-from-ts-playground-url.git
1616
cd code-from-ts-playground-url
1717
npm install
18-
npm start https://www.typescriptlang.org/play?#code/MYewdgzgLgBAHgLhtATgSzAcxgXhgIgAkBTAG1JABoYAVATwAdiBlYdBqAQnyA
18+
npm start "https://www.typescriptlang.org/play?#code/MYewdgzgLgBAHgLhtATgSzAcxgXhgIgAkBTAG1JABoYAVATwAdiBlYdBqAQnyA"
1919
```
2020

2121
You should see this output:
2222
```ts
2323
const x: string = "Hello, TypeScript!"
2424
```
25+
26+
To install globally:
27+
```sh
28+
cd code-from-ts-playground-url
29+
npm install && npm run build && npm install -g .
30+
code-from-ts-playground-url "https://www.typescriptlang.org/play?#code/O4SwdgJg9sB0A2UDGBDALiKZYAsBOApgGYAEAvCQEQ5poAOAzgFwD0LAnlAK5pewBGBFhACKwACzAAnAHUA5gA0kIykA"
31+
```

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"code-from-ts-playground-url": "./index.js"
77
},
88
"scripts": {
9-
"start": "tsc --build --clean && tsc --build && ./index.js"
9+
"build": "tsc --build --clean && tsc --build",
10+
"start": "npm run build && ./index.js"
1011
},
1112
"dependencies": {
1213
"lz-string": "^1.4.4"

0 commit comments

Comments
 (0)