Skip to content

Commit 25106e5

Browse files
authored
Merge pull request #15 from 9renpoto/feature/travis
Added generate test
2 parents 115e796 + 1638b2c commit 25106e5

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
example/test-project
2+
13
# Logs
24
logs
35
*.log

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: node_js
2+
sudo: true
3+
node_js: stable
4+
env:
5+
matrix:
6+
- version=latest
7+
- version=current
8+
matrix:
9+
fast_finish: true
10+
allow_failures:
11+
- env: version=latest
12+
before_install:
13+
- sudo apt-get install expect
14+
install:
15+
- cd example
16+
- npm install --no-package-lock
17+
- ./initialize
18+
script:
19+
- cd test-project
20+
- npm install
21+
- 'if [ "$version" == "latest" ]; then
22+
npm update;
23+
fi'
24+
- npm run build
25+
notifications:
26+
email: false

example/initialize

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/expect
2+
set timeout 360
3+
4+
spawn ./node_modules/.bin/vue init ../ test-project
5+
6+
# This happens because of
7+
# https://github.com/vuejs/vue-cli/issues/291
8+
expect "name" { send "\n" }
9+
expect "author" { send "\n" }
10+
expect "vue-cli · Generated" { send "\n" }

example/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "example",
3+
"description": "example",
4+
"version": "1.0.0",
5+
"devDependencies": {
6+
"vue-cli": "^2.9.1"
7+
},
8+
"license": "UNLICENSED",
9+
"main": "n/a",
10+
"private": true,
11+
"repository": {
12+
"type": "git",
13+
"url": "git+ssh://[email protected]/nuxt-community/typescript-template.git"
14+
}
15+
}

0 commit comments

Comments
 (0)