Skip to content

Commit

Permalink
Update deps and remove ts compile
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Feb 9, 2022
1 parent 0109e06 commit 5578d67
Show file tree
Hide file tree
Showing 12 changed files with 222 additions and 1,016 deletions.
43 changes: 0 additions & 43 deletions .github/scripts/build.mjs

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm i
- run: npm run build
- run: npm ci
- run: npm test
- run: echo "//wombat-dressing-room.appspot.com/:_authToken=$AUTH_TOKEN" >> .npmrc
env:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm run build
- run: npm ci
- run: npm test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/node_modules/
/.idea/
/dist/
yarn.lock
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,32 @@ void async function () {
}()
```
Compile the TypeScript to JS and run it. Or use something like ts-node.
Use [ts-node](https://github.com/TypeStrong/ts-node#native-ecmascript-modules) as
a esm node [loader](https://nodejs.org/api/esm.html#esm_experimental_loaders).
```bash
ts-node script.ts
node --loader ts-node/esm script.ts
```
You must set [`"type": "module"`](https://nodejs.org/api/packages.html#packages_type)
in `package.json` and [`"module": "ESNext"`](https://www.typescriptlang.org/tsconfig/#module)
in `tsconfig.json`.
```json
{
"type": "module"
}
```
```json
{
"compilerOptions": {
"module": "ESNext"
}
}
```
#### Executing remote scripts
If the argument to the `zx` executable starts with `https://`, the file will be
Expand Down
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as _fs from 'fs-extra'
import * as _globby from 'globby'
import * as _os from 'os'
import * as _path from 'path'
import * as _chalk from 'chalk'
import {ChalkInstance} from 'chalk'
import * as _yaml from 'yaml'
import _fetch from 'node-fetch'
import {ParsedArgs} from 'minimist'
Expand Down Expand Up @@ -62,7 +62,7 @@ type sleep = (ms: number) => Promise<void>
export const $: $
export const argv: ParsedArgs
export const cd: cd
export const chalk: typeof _chalk
export const chalk: ChalkInstance
export const fetch: typeof _fetch
export const YAML: typeof _yaml
export const fs: typeof _fs
Expand Down
Loading

0 comments on commit 5578d67

Please sign in to comment.