Skip to content

Commit 3ab6ada

Browse files
committed
chore: add basic ci config
1 parent 24e541b commit 3ab6ada

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

.circleci/config.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
version: 2.1
2+
3+
executors:
4+
default:
5+
docker:
6+
- image: circleci/node:10
7+
working_directory: ~/project
8+
environment:
9+
YARN_CACHE_FOLDER: "~/.cache/yarn"
10+
11+
jobs:
12+
install-dependencies:
13+
executor: default
14+
steps:
15+
- checkout
16+
- attach_workspace:
17+
at: ~/project
18+
- restore_cache:
19+
keys:
20+
- yarn-{{ checksum "package.json" }}
21+
- yarn-
22+
- run:
23+
name: Install dependencies
24+
command: |
25+
yarn install --frozen-lockfile
26+
- save_cache:
27+
key: yarn-{{ checksum "package.json" }}
28+
paths: ~/.cache/yarn
29+
- persist_to_workspace:
30+
root: .
31+
paths: .
32+
lint:
33+
executor: default
34+
steps:
35+
- attach_workspace:
36+
at: ~/project
37+
- run:
38+
name: Lint
39+
command: |
40+
yarn lint
41+
typescript:
42+
executor: default
43+
steps:
44+
- attach_workspace:
45+
at: ~/project
46+
- run:
47+
name: Typecheck
48+
command: |
49+
yarn typescript
50+
build-package:
51+
executor: default
52+
steps:
53+
- attach_workspace:
54+
at: ~/project
55+
- run:
56+
name: Compile
57+
command: |
58+
yarn prepare
59+
60+
workflows:
61+
build-and-test:
62+
jobs:
63+
- install-dependencies
64+
- lint:
65+
requires:
66+
- install-dependencies
67+
- typescript:
68+
requires:
69+
- install-dependencies
70+
- build-package:
71+
requires:
72+
- install-dependencies

src/targets/typescript.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ export default async function build({
8080

8181
let tsc = options?.tsc
8282
? path.resolve(root, options.tsc)
83-
: path.join(root, 'node_modules') + (platform() === 'win32' ? '.cmd' : '');
83+
: path.join(root, 'node_modules') +
84+
(platform() === 'win32' ? '.cmd' : '');
8485

8586
if (!(await fs.pathExists(tsc))) {
8687
tsc = spawn.sync('which', ['tsc']).stdout.toString().trim();

0 commit comments

Comments
 (0)