Skip to content

Commit cc6aed2

Browse files
committed
some brief changes (C) whatthecommit.com
1 parent c5b9cee commit cc6aed2

File tree

6 files changed

+136
-21
lines changed

6 files changed

+136
-21
lines changed

.travis.yml

+51-21
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ before_install:
4343
jobs:
4444
include:
4545

46+
- stage: test
47+
name: component-01-in-browser
48+
env:
49+
- SUB_PROJECT=component-01-in-browser
50+
before_script:
51+
- cd $TRAVIS_BUILD_DIR/$SUB_PROJECT && npm i -E
52+
- cd $TRAVIS_BUILD_DIR/$SUB_PROJECT && npm start
53+
- cd $TRAVIS_BUILD_DIR/$SUB_PROJECT && npm run logs &
54+
- wait_for 1234
55+
script:
56+
- http :1234
57+
after_script:
58+
- cd ${root}/vuesax-example && npm stop
59+
4660
- stage: test
4761
name: vuesax-example
4862
before_script:
@@ -213,15 +227,15 @@ jobs:
213227
- if [ -f npm-debug.log ]; then cat npm-debug.log; fi;
214228
- npm run build -- --report
215229

216-
- stage: test
217-
node_js: lts/*
218-
name: template
219-
script:
220-
- cd ${root}/template
221-
- npm install
222-
- npm run predeploy
223-
- if [ -f npm-debug.log ]; then cat npm-debug.log; fi;
224-
- npm run build -- --report
230+
# - stage: test
231+
# node_js: lts/*
232+
# name: template
233+
# script:
234+
# - cd ${root}/template
235+
# - npm install
236+
# - npm run predeploy
237+
# - if [ -f npm-debug.log ]; then cat npm-debug.log; fi;
238+
# - npm run build -- --report
225239

226240
## - stage: test
227241
## node_js: lts/*
@@ -313,29 +327,45 @@ jobs:
313327

314328
- stage: deploy
315329
jdk: openjdk11
330+
env:
331+
- SUB_PROJECT=component-01-in-browser
316332
name: GitHub release and GitHub pages deployment (openjdk11)
317333
script: skip
318334
if: branch = "master" AND type NOT IN (pull_request)
319335
before_deploy:
320-
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ ".$TRAVIS_BRANCH" != ".master" ] ; then exit 0 ; fi
321-
- env
322-
# publish tag release
323-
- set -e
324-
#- cd ${root}
325-
- ./mvnw -Pdocs >/dev/null
326-
- ls .
327-
- ls target/generated-docs
336+
- cd $TRAVIS_BUILD_DIR/$SUB_PROJECT && npm i
337+
- cd $TRAVIS_BUILD_DIR/$SUB_PROJECT && npm run gh
328338
deploy:
329339
provider: pages
330340
skip-cleanup: true
331-
# travis encrypt GITHUB_TOKEN=<your github repo token> --add
332-
github-token: "$GITHUB_TOKEN"
333341
keep-history: true
342+
target_branch: gh-pages
343+
github-token: "$GITHUB_TOKEN"
344+
local-dir: $TRAVIS_BUILD_DIR/$SUB_PROJECT/dist
334345
on:
335346
branch: master
336-
local-dir: target/generated-docs
337-
target_branch: gh-pages
338347

348+
# - stage: deploy
349+
# jdk: openjdk11
350+
# name: GitHub release and GitHub pages deployment (openjdk11)
351+
# script: skip
352+
# if: branch = "master" AND type NOT IN (pull_request)
353+
# before_deploy:
354+
# - if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ ".$TRAVIS_BRANCH" != ".master" ] ; then exit 0 ; fi
355+
# - env
356+
# - set -e
357+
# - ./mvnw -Pdocs >/dev/null
358+
# - ls .
359+
# - ls target/generated-docs
360+
# deploy:
361+
# provider: pages
362+
# skip-cleanup: true
363+
# keep-history: true
364+
# target_branch: gh-pages
365+
# github-token: "$GITHUB_TOKEN"
366+
# local-dir: target/generated-docs
367+
# on:
368+
# branch: master
339369
cache:
340370
npm: true
341371
packages: true

component-01-in-browser/package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "vue-examples",
3+
"version": "1.0.0",
4+
"description": "Starter",
5+
"main": "src/index.html",
6+
"scripts": {
7+
"gh": "npm run build -- --public-url='/vue-examples/'",
8+
"build": "parcel build src/index.html --no-cache",
9+
"start": "pm2 start 'npm run dev' --name app",
10+
"dev": "parcel src/index.html --open --no-cache",
11+
"restart": "pm2 restart app",
12+
"stop": "pm2 kill",
13+
"logs": "pm2 logs"
14+
},
15+
"keywords": [
16+
"pm2",
17+
"parcel",
18+
"starter"
19+
],
20+
"author": "daggerok",
21+
"license": "MIT",
22+
"devDependencies": {
23+
"@types/node": "13.1.4",
24+
"parcel-bundler": "1.12.4",
25+
"pm2": "4.2.1",
26+
"typescript": "3.7.4",
27+
"webfontloader": "1.6.28"
28+
},
29+
"dependencies": {
30+
"vue": "2.6.11"
31+
}
32+
}
1.12 KB
Binary file not shown.
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport"
6+
content="width=device-width initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Vue examples</title>
9+
<link rel="stylesheet" href="./main.css">
10+
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
11+
</head>
12+
<body>
13+
<div id="app">
14+
<clicker></clicker>
15+
</div>
16+
<script src="./main.ts"></script>
17+
</body>
18+
</html>

component-01-in-browser/src/main.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
font-family: Roboto, sans-serif;
3+
padding: 0;
4+
margin: 0;
5+
}

component-01-in-browser/src/main.ts

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import WebFont from 'webfontloader';
2+
3+
WebFont.load({
4+
google: {
5+
families: [
6+
// 'Roboto:300,400,500,600,700',
7+
'Roboto:400,100,‌​100italic,300,300ita‌​lic,400italic,500,50‌​0italic,700,700itali‌​c,900italic,900',
8+
],
9+
},
10+
});
11+
12+
import Vue from 'vue/dist/vue.js';
13+
14+
Vue.component('clicker', {
15+
template: `
16+
<button @click="increment">clicked {{ counter }} times</button>
17+
`,
18+
data() {
19+
return { counter: 0 };
20+
},
21+
methods: {
22+
increment() {
23+
this.counter += 1;
24+
},
25+
},
26+
});
27+
28+
new Vue({
29+
el: '#app',
30+
});

0 commit comments

Comments
 (0)