Skip to content

Commit 8a57c28

Browse files
authored
feat: add typings (#88)
* big commit 💪 * make a lot work still work to do * fix tiny typescript issue * move cypress to typescript * fix highlight typescript in sfc * fix & build test * run prettier on all files * add prettierignore * fixes to make it typescript possible * add gitignore and restore code * generate typings of vue-live * build demo in ci * update dependencies * add runtime as a dev dependency
1 parent 3c35891 commit 8a57c28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5615
-25846
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Lint & Test
1+
name: Build & Test
22
on:
33
pull_request:
4-
types: [opened,synchronize]
5-
branches: master
4+
types: [opened, synchronize]
5+
branches: master
66

77
concurrency:
88
group: test-${{ github.ref }}
@@ -19,11 +19,14 @@ jobs:
1919
- name: Install
2020
run: npm ci
2121

22-
- name: List
23-
run: npm run lint
22+
- name: Check types
23+
run: npm run types:check
2424

2525
- name: Test unit
26-
run: npm run test:unit -- --runInBand
27-
26+
run: npm run test:unit
27+
28+
- name: Build Demo
29+
run: npm run build:demo
30+
2831
- name: Test e2e
29-
run: npm run test:e2e -- --headless
32+
run: npm run test:e2e

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Release
22
on:
33
push:
4-
branches: [master,next]
4+
branches: [master, next]
55

66
concurrency:
77
group: release-${{ github.ref }}
@@ -40,16 +40,19 @@ jobs:
4040
if: ${{ github.ref == 'refs/heads/master' }}
4141
uses: dswistowski/surge-sh-action@v1
4242
with:
43-
domain: 'vue-live.surge.sh'
44-
project: './dist/'
43+
domain: "vue-live.surge.sh"
44+
project: "./dist/"
4545
login: ${{ secrets.SURGE_LOGIN }}
4646
token: ${{ secrets.SURGE_TOKEN }}
4747

4848
- name: Build
49-
run: npm run build
49+
run: npm run lib:build
50+
51+
- name: Typings
52+
run: npm run lib:types
5053

5154
- name: Release
5255
run: npx semantic-release
5356
env:
5457
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
58+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ yarn-error.log*
2323
*.njsproj
2424
*.sln
2525
*.sw?
26+
cypress/videos
27+
*tsbuildinfo

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore artifacts:
2+
lib
3+
dist
4+
demo/assets/PureTemplate.html

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,7 @@ When the template compilation and the script evaluation succeed, the `@success`
139139

140140
```vue
141141
<template>
142-
<VueLive
143-
:code="code"
144-
@success="error = undefined"
145-
/>
142+
<VueLive :code="code" @success="error = undefined" />
146143
</template>
147144
```
148145

babel.config.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

babel.rollup.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)