Skip to content

Commit

Permalink
更新项目结构。
Browse files Browse the repository at this point in the history
  • Loading branch information
OXOYO committed Mar 30, 2018
1 parent 3862770 commit 1c72ab2
Show file tree
Hide file tree
Showing 14 changed files with 11,817 additions and 44 deletions.
2 changes: 1 addition & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const createLintingRule = () => ({
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
app: './example/main.js'
},
output: {
path: config.build.assetsRoot,
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
template: 'example/index.html',
inject: true
}),
// copy custom static assets
Expand Down
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
Expand Down
36 changes: 36 additions & 0 deletions example/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

<template>
<div id="app">
<a href="https://github.com/OXOYO/X-Flowchart-Vue" target="_blank">
<img
style="position: absolute; top: 0; right: 0; border: 0; z-index: 5000"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
alt="Fork me on GitHub"
>
</a>
<img src="./assets/logo.png">
<!--<HelloWorld/>-->
<XFlowchart></XFlowchart>
</div>
</template>

<script>
import HelloWorld from './components/HelloWorld'
export default {
name: 'App',
components: {
HelloWorld
}
}
</script>
File renamed without changes
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions example/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Vue from 'vue'
import App from './App'

// 导入XFormEditor
import XFlowchart from '../src/index'
Vue.use(XFlowchart)

// Vue 全局配置
let isDev = process && process.env.NODE_ENV !== 'production'
Vue.config.debug = isDev
Vue.config.devtools = isDev
Vue.config.productionTip = isDev

/* eslint-disable no-new */
// 启动应用
new Vue({
render: h => h(App)
}).$mount('#app')
Loading

0 comments on commit 1c72ab2

Please sign in to comment.