diff --git a/.travis.yml b/.travis.yml
index 92e534cd0..f11c02a85 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,16 +1,7 @@
language: node_js
sudo: required
node_js:
-- 8.2.1
-cache:
- directories:
- - node_modules
-deploy:
- provider: pages
- skip-cleanup: true
- keep-history: true
- on:
- branch: master
+ - 8.2.1
script:
- bash ./scripts/deploy-to-gh-pages.sh
env:
diff --git a/examples/demo.vue b/examples/demo.vue
new file mode 100644
index 000000000..19ed4f550
--- /dev/null
+++ b/examples/demo.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
diff --git a/examples/index.js b/examples/index.js
index 7b4799599..cf1f9a502 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -8,7 +8,7 @@ Vue.use(VueRouter)
Vue.component(Md.name, Md)
const router = new VueRouter({
- mode: 'history',
+ mode: 'hash',
routes,
})
new Vue({
diff --git a/examples/routes.js b/examples/routes.js
index d5a5cc86d..02298b234 100644
--- a/examples/routes.js
+++ b/examples/routes.js
@@ -1,3 +1,4 @@
+import Demo from './demo'
const AsyncComp = () => {
const pathnameArr = window.location.pathname.split('/')
const com = pathnameArr[1] || 'button' // eslint-disable-line
@@ -7,5 +8,6 @@ const AsyncComp = () => {
}
}
export default [
- { path: '/*', component: AsyncComp },
+ { path: '/components/:name/:demo?', component: Demo },
+ // { path: '/*', component: AsyncComp },
]
diff --git a/scripts/deploy-to-gh-pages.sh b/scripts/deploy-to-gh-pages.sh
index 073462962..8a189114a 100644
--- a/scripts/deploy-to-gh-pages.sh
+++ b/scripts/deploy-to-gh-pages.sh
@@ -18,7 +18,7 @@ cd dist
git init
git add -f .
git commit -m "Travis build"
-git push --force --quiet https://${GITHUB_TOKEN}@github.com/vueComponent/ant-design.git master:gh-pages > /dev/null
+git push --force --quiet "https://${GITHUB_TOKEN}@github.com/vueComponent/ant-design.git" master:gh-pages > /dev/null
echo "Done updating gh-pages\n"
diff --git a/site/index.html b/site/index.html
new file mode 100644
index 000000000..314ab2220
--- /dev/null
+++ b/site/index.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/site/index.js b/site/index.js
new file mode 100644
index 000000000..cf1f9a502
--- /dev/null
+++ b/site/index.js
@@ -0,0 +1,17 @@
+import 'antd/style.js'
+import './index.less'
+import Vue from 'vue'
+import VueRouter from 'vue-router'
+import routes from './routes'
+import Md from './md'
+Vue.use(VueRouter)
+Vue.component(Md.name, Md)
+
+const router = new VueRouter({
+ mode: 'hash',
+ routes,
+})
+new Vue({
+ el: '#app',
+ router,
+})
diff --git a/site/index.less b/site/index.less
new file mode 100644
index 000000000..ac6ec4a44
--- /dev/null
+++ b/site/index.less
@@ -0,0 +1,3 @@
+#app {
+ padding: 50px;
+}
diff --git a/site/md.vue b/site/md.vue
new file mode 100644
index 000000000..c907d5dda
--- /dev/null
+++ b/site/md.vue
@@ -0,0 +1,24 @@
+
+
+
+
diff --git a/site/routes.js b/site/routes.js
new file mode 100644
index 000000000..d5a5cc86d
--- /dev/null
+++ b/site/routes.js
@@ -0,0 +1,11 @@
+const AsyncComp = () => {
+ const pathnameArr = window.location.pathname.split('/')
+ const com = pathnameArr[1] || 'button' // eslint-disable-line
+ const demo = pathnameArr[2] || 'index'
+ return {
+ component: import(`../components/card/demo/${demo}.vue`),
+ }
+}
+export default [
+ { path: '/*', component: AsyncComp },
+]