Skip to content

Commit

Permalink
add CI and some tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
HcySunYang committed Sep 26, 2018
1 parent cd1f5ed commit 386bd8a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
File renamed without changes.
24 changes: 24 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/node:latest
branches:
ignore:
- gh-pages # list of branches to ignore
- /release\/.*/ # or ignore regexes
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
- run:
name: install dependences
command: yarn
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- run:
name: test
command: yarn test
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
},
"scripts": {
"test": "yarn lint && jest",
"build": "bili",
"postbuild": "rm -rf dist/__test__",
"build": "yarn lint && bili",
"postbuild": "find dist -type d -name __test__ -exec rm -r {} +",
"prepublishOnly": "yarn build",
"toc": "markdown-toc -i README.md",
"lint": "tslint --fix"
"lint": "tslint --project tsconfig.json --fix"
},
"repository": "https://github.com/HcySunYang/vuese.git",
"author": "HcySunYang <HcySunYang@outlook.com>",
Expand Down
4 changes: 2 additions & 2 deletions src/__test__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sum from '../index'

test('works', function() {
expect(sum(2, 3)).toBe(5)
test('works', () => {
expect(sum(2, 4)).toBe(6)
})
9 changes: 4 additions & 5 deletions src/utils/__test__/sfcToEstree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import sfcToEstree from '../sfcToEstree'
import * as path from 'path'
import * as fs from 'fs'

const p: string = path.resolve(__dirname, './__fixtures__/common.vue')
const source: string = fs.readFileSync(p, 'utf-8')
const p = path.resolve(__dirname, '../../../__fixtures__/common.vue')
const source = fs.readFileSync(p, 'utf-8')

test('works', () => {
const ast = sfcToEstree(source)
console.log(ast)
test('works2', () => {
console.log(sfcToEstree(source))
})

0 comments on commit 386bd8a

Please sign in to comment.