Browse Source

Test writing framework sidebar

Weiming 2 years ago
parent
commit
a4cc3c57e4

+ 1
- 0
.gitignore View File

@@ -1 +1,2 @@
1 1
 .idea/
2
+WebContent/node_modules/

+ 71
- 0
WebContent/build/utils.js View File

@@ -0,0 +1,71 @@
1
+var path = require('path')
2
+var config = require('../config')
3
+var ExtractTextPlugin = require('extract-text-webpack-plugin')
4
+
5
+exports.assetsPath = function (_path) {
6
+  var assetsSubDirectory = process.env.NODE_ENV === 'production'
7
+    ? config.build.assetsSubDirectory
8
+    : config.dev.assetsSubDirectory
9
+  return path.posix.join(assetsSubDirectory, _path)
10
+}
11
+
12
+exports.cssLoaders = function (options) {
13
+  options = options || {}
14
+
15
+  var cssLoader = {
16
+    loader: 'css-loader',
17
+    options: {
18
+      minimize: process.env.NODE_ENV === 'production',
19
+      sourceMap: options.sourceMap
20
+    }
21
+  }
22
+
23
+  // generate loader string to be used with extract text plugin
24
+  function generateLoaders (loader, loaderOptions) {
25
+    var loaders = [cssLoader]
26
+    if (loader) {
27
+      loaders.push({
28
+        loader: loader + '-loader',
29
+        options: Object.assign({}, loaderOptions, {
30
+          sourceMap: options.sourceMap
31
+        })
32
+      })
33
+    }
34
+
35
+    // Extract CSS when that option is specified
36
+    // (which is the case during production build)
37
+    if (options.extract) {
38
+      return ExtractTextPlugin.extract({
39
+        use: loaders,
40
+        fallback: 'vue-style-loader'
41
+      })
42
+    } else {
43
+      return ['vue-style-loader'].concat(loaders)
44
+    }
45
+  }
46
+
47
+  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
48
+  return {
49
+    css: generateLoaders(),
50
+    postcss: generateLoaders(),
51
+    less: generateLoaders('less'),
52
+    sass: generateLoaders('sass', { indentedSyntax: true }),
53
+    scss: generateLoaders('sass'),
54
+    stylus: generateLoaders('stylus'),
55
+    styl: generateLoaders('stylus')
56
+  }
57
+}
58
+
59
+// Generate loaders for standalone style files (outside of .vue)
60
+exports.styleLoaders = function (options) {
61
+  var output = []
62
+  var loaders = exports.cssLoaders(options)
63
+  for (var extension in loaders) {
64
+    var loader = loaders[extension]
65
+    output.push({
66
+      test: new RegExp('\\.' + extension + '$'),
67
+      use: loader
68
+    })
69
+  }
70
+  return output
71
+}

+ 12
- 0
WebContent/build/vue-loader.conf.js View File

@@ -0,0 +1,12 @@
1
+var utils = require('./utils');
2
+var config = require('./../config/index');
3
+var isProduction = process.env.NODE_ENV === 'production';
4
+
5
+module.exports = {
6
+  loaders: utils.cssLoaders({
7
+    sourceMap: isProduction
8
+      ? config.build.productionSourceMap
9
+      : config.dev.cssSourceMap,
10
+    extract: isProduction
11
+  })
12
+};

+ 6
- 0
WebContent/config/dev.env.js View File

@@ -0,0 +1,6 @@
1
+var merge = require('webpack-merge')
2
+var prodEnv = require('./prod.env')
3
+
4
+module.exports = merge(prodEnv, {
5
+  NODE_ENV: '"development"'
6
+})

+ 38
- 0
WebContent/config/index.js View File

@@ -0,0 +1,38 @@
1
+// see http://vuejs-templates.github.io/webpack for documentation.
2
+var path = require('path')
3
+
4
+module.exports = {
5
+  build: {
6
+    env: require('./prod.env'),
7
+    index: path.resolve(__dirname, '../dist/index.html'),
8
+    assetsRoot: path.resolve(__dirname, '../dist'),
9
+    assetsSubDirectory: 'static',
10
+    assetsPublicPath: '/',
11
+    productionSourceMap: true,
12
+    // Gzip off by default as many popular static hosts such as
13
+    // Surge or Netlify already gzip all static assets for you.
14
+    // Before setting to `true`, make sure to:
15
+    // npm install --save-dev compression-webpack-plugin
16
+    productionGzip: false,
17
+    productionGzipExtensions: ['js', 'css'],
18
+    // Run the build command with an extra argument to
19
+    // View the bundle analyzer report after build finishes:
20
+    // `npm run build --report`
21
+    // Set to `true` or `false` to always turn it on or off
22
+    bundleAnalyzerReport: process.env.npm_config_report
23
+  },
24
+  dev: {
25
+    env: require('./dev.env'),
26
+    port: 8080,
27
+    autoOpenBrowser: true,
28
+    assetsSubDirectory: 'static',
29
+    assetsPublicPath: '/',
30
+    proxyTable: {},
31
+    // CSS Sourcemaps off by default because relative paths are "buggy"
32
+    // with this option, according to the CSS-Loader README
33
+    // (https://github.com/webpack/css-loader#sourcemaps)
34
+    // In our experience, they generally work as expected,
35
+    // just be aware of this issue when enabling this option.
36
+    cssSourceMap: false
37
+  }
38
+}

+ 3
- 0
WebContent/config/prod.env.js View File

@@ -0,0 +1,3 @@
1
+module.exports = {
2
+  NODE_ENV: '"production"'
3
+}

+ 6
- 0
WebContent/config/test.env.js View File

@@ -0,0 +1,6 @@
1
+var merge = require('webpack-merge')
2
+var devEnv = require('./dev.env')
3
+
4
+module.exports = merge(devEnv, {
5
+  NODE_ENV: '"testing"'
6
+})

+ 2
- 2
WebContent/index-backup.html View File

@@ -30,7 +30,7 @@
30 30
 			<!-- Collect the nav links, forms, and other content for toggling -->
31 31
 			<div class="collapse navbar-collapse" id="navbar-collapse">
32 32
 				<ul class="nav navbar-nav">
33
-					<li><a href="index.html">Inventory Management</a></li>
33
+					<li><a href="src/index.html">Inventory Management</a></li>
34 34
 				</ul>
35 35
 				<ul class="nav navbar-nav navbar-right">
36 36
 					<li class="dropdown"><a href="#" class="dropdown-toggle"
@@ -53,7 +53,7 @@
53 53
 	</nav>
54 54
 
55 55
 	<div class="container">
56
-		<form action="index.html" class="form-inline text-center">
56
+		<form action="src/index.html" class="form-inline text-center">
57 57
 			<div class="form-group">
58 58
 				<label>Warehouse</label> <select name="q1" class="form-control">
59 59
 					<option value="0">All</option>

+ 3
- 137
WebContent/index.html View File

@@ -1,19 +1,6 @@
1 1
 <!DOCTYPE html>
2 2
 <html>
3 3
 <head>
4
-	<link href="css/google-material-icons.css" rel="stylesheet">
5
-	<link href="css/vuetify.min.css" rel="stylesheet">
6
-
7
-	<script src="lib/jquery.js"></script>
8
-	<!--<script src="lib/bootstrap.js"></script>-->
9
-	<script src="lib/alasql.js"></script>
10
-	<script src="lib/purl.js"></script>
11
-	<script src="js/db.js"></script>
12
-
13
-	<script src="lib/vue.js"></script>
14
-	<script src="lib/vuex.js"></script>
15
-    <script src="lib/vuetify.min.js"></script>
16
-
17 4
 	<meta charset="utf-8">
18 5
 	<meta http-equiv="Pragma" content="no-cache">
19 6
 	<meta http-equiv="Cache-Control" content="no-cache">
@@ -21,128 +8,7 @@
21 8
 	<title>E-Commerce Inventory</title>
22 9
 </head>
23 10
 <body>
24
-	<v-app id="example-3" class="elevation-1" top-toolbar left-sidebar>
25
-		<!--<v-toolbar>-->
26
-			<!--<v-toolbar-side-icon class="hidden-lg-and-up" @click.native.stop="sidebar4 = !sidebar4" />-->
27
-			<!--<v-toolbar-logo class="text-xs-right">Logo</v-toolbar-logo>-->
28
-		<!--</v-toolbar>-->
29
-		<main>
30
-			<v-sidebar v-model="sidebar4" height="auto">
31
-				<v-list dense>
32
-					<template v-for="(item,i) in itemGroup">
33
-						<v-list-group v-if="item.items">
34
-							<v-list-item slot="item">
35
-								<v-list-tile ripple>
36
-									<v-list-tile-title v-text="item.title" />
37
-									<v-list-tile-action>
38
-										<v-icon>keyboard_arrow_down</v-icon>
39
-									</v-list-tile-action>
40
-								</v-list-tile>
41
-							</v-list-item>
42
-							<v-list-item v-for="(subItem,i) in item.items" :key="i">
43
-								<v-list-tile ripple>
44
-									<v-list-tile-title v-text="subItem.title" />
45
-								</v-list-tile>
46
-							</v-list-item>
47
-						</v-list-group>
48
-						<v-subheader v-else-if="item.header" v-text="item.header" />
49
-						<v-divider v-else-if="item.divider" light />
50
-						<v-list-item v-else>
51
-							<v-list-tile ripple>
52
-								<v-list-tile-title v-text="item.title" />
53
-							</v-list-tile>
54
-						</v-list-item>
55
-					</template>
56
-				</v-list>
57
-			</v-sidebar>
58
-			<v-content>
59
-				<v-container fluid></v-container>
60
-			</v-content>
61
-		</main>
62
-	</v-app>
63
-
64
-
65
-	<nav class="navbar navbar-default">
66
-		<div class="container">
67
-			<!-- Brand and toggle get grouped for better mobile display -->
68
-			<div class="navbar-header">
69
-				<button type="button" class="navbar-toggle collapsed"
70
-					data-toggle="collapse" data-target="#navbar-collapse">
71
-					<span class="sr-only">Toggle navigation</span> <span
72
-						class="icon-bar"></span> <span class="icon-bar"></span> <span
73
-						class="icon-bar"></span>
74
-				</button>
75
-				<a class="navbar-brand">COMPANY</a>
76
-			</div>
77
-
78
-			<!-- Collect the nav links, forms, and other content for toggling -->
79
-			<div class="collapse navbar-collapse" id="navbar-collapse">
80
-				<ul class="nav navbar-nav">
81
-					<li><a href="index.html">Inventory Management</a></li>
82
-				</ul>
83
-				<ul class="nav navbar-nav navbar-right">
84
-					<li class="dropdown"><a href="#" class="dropdown-toggle"
85
-						data-toggle="dropdown"><span class="glyphicon glyphicon-cog"></span>
86
-							Settings <span class="caret"></span></a>
87
-						<ul class="dropdown-menu">
88
-							<li><a onclick="window.location.reload(true);"><span
89
-									class="glyphicon glyphicon-refresh"></span> Reload</a></li>
90
-							<li><a onclick="DB.init();"><span
91
-									class="glyphicon glyphicon-repeat"></span> Init DB</a></li>
92
-							<li role="separator" class="divider"></li>
93
-							<li><a onclick="DB.remove();"><span
94
-									class="glyphicon glyphicon-trash"></span> Delete DB</a></li>
95
-						</ul></li>
96
-				</ul>
97
-			</div>
98
-			<!-- /.navbar-collapse -->
99
-		</div>
100
-		<!-- /.container-fluid -->
101
-	</nav>
102
-
103
-	<div class="container">
104
-		<form action="index.html" class="form-inline text-center">
105
-			<div class="form-group">
106
-				<label>Warehouse</label> <select name="q1" class="form-control">
107
-					<option value="0">All</option>
108
-				</select>
109
-			</div>
110
-			<div class="form-group">
111
-				<label>Classification</label> <select name="q2" class="form-control">
112
-					<option value="0">All</option>
113
-				</select>
114
-			</div>
115
-			<div class="form-group">
116
-				<label>Code</label> <input name="q3" type="text"
117
-					class="form-control" placeholder="Prefix Search">
118
-			</div>
119
-			<button type="submit" class="btn btn-primary">
120
-				<span class="glyphicon glyphicon-search"></span> Search
121
-			</button>
122
-		</form>
123
-		<hr>
124
-
125
-		<div class="clearfix" style="margin: 10px 0;">
126
-			<a href="stock-form.html" class="btn btn-sm btn-success pull-right"><span
127
-				class="glyphicon glyphicon-plus"></span> New</a>
128
-		</div>
129
-
130
-		<table class="table table-hover table-condensed">
131
-			<thead>
132
-				<tr>
133
-					<th>Warehouse</th>
134
-					<th>Classification</th>
135
-					<th>Code</th>
136
-					<th>Maker</th>
137
-					<th>Detail</th>
138
-					<th>Price</th>
139
-					<th>In Stock</th>
140
-					<th>Unit</th>
141
-				</tr>
142
-			</thead>
143
-			<tbody id="tbody-stocks"></tbody>
144
-		</table>
145
-	</div>
146
-	<script src="js/index.js"></script>
147
-</body>
11
+	<div id="app"></div>
12
+	<!--<v-app id="app" class="elevation-1" top-toolbar left-sidebar></v-app>-->
13
+<script type="text/javascript" src="js/app.js"></script></body>
148 14
 </html>

+ 375
- 0
WebContent/js/app.js
File diff suppressed because it is too large
View File


+ 21
- 0
WebContent/js/index.js View File

@@ -5,6 +5,27 @@
5 5
 Vue.use(Vuetify);
6 6
 
7 7
 var app = new Vue({
8
+    el: '#app',
9
+    data: {
10
+        message: 'Hello Vue!'
11
+    }
12
+})
13
+
14
+var app2 = new Vue({
15
+    el: '#app-2',
16
+    data: {
17
+        message: 'You loaded this page on ' + new Date()
18
+    }
19
+})
20
+
21
+var app3 = new Vue({
22
+    el: '#app-3',
23
+    data: {
24
+        seen: true
25
+    }
26
+})
27
+
28
+var app3 = new Vue({
8 29
     el: '#example-3',
9 30
     data () {
10 31
         return {

+ 38
- 0
WebContent/package.json View File

@@ -0,0 +1,38 @@
1
+{
2
+  "name": "inventory-system",
3
+  "version": "1.0.0",
4
+  "description": "",
5
+  "scripts": {
6
+    "dev": "webpack -d --watch"
7
+  },
8
+  "dependencies": {
9
+    "vue": "^2.2.6",
10
+    "vue-router": "^2.4.0"
11
+  },
12
+  "author": "Weiming <wingalong@gmail.com>",
13
+  "license": "ISC",
14
+  "bugs": {
15
+    "url": "https://github.com/weimingwill/vue-tut/issues"
16
+  },
17
+  "homepage": "https://github.com/weimingwill/vue-tut#readme",
18
+  "devDependencies": {
19
+    "autoprefixer": "^6.7.7",
20
+    "babel-core": "^6.24.1",
21
+    "babel-loader": "^6.4.1",
22
+    "babel-preset-env": "^1.4.0",
23
+    "css-loader": "^0.28.0",
24
+    "extract-text-webpack-plugin": "^2.1.0",
25
+    "file-loader": "^0.11.1",
26
+    "html-webpack-plugin": "^2.28.0",
27
+    "style-loader": "^0.16.1",
28
+    "url-loader": "^0.5.8",
29
+    "vue": "^2.2.6",
30
+    "vue-loader": "^11.3.4",
31
+    "vue-router": "^2.4.0",
32
+    "vue-style-loader": "^3.0.0",
33
+    "vue-template-compiler": "^2.2.6",
34
+    "vuetify": "^0.10.4",
35
+    "webpack": "^2.4.1",
36
+    "webpack-merge": "^4.1.0"
37
+  }
38
+}

+ 80
- 0
WebContent/src/App.vue View File

@@ -0,0 +1,80 @@
1
+<template>
2
+  <v-app id="example-3" class="elevation-1" top-toolbar left-sidebar>
3
+    <v-toolbar>
4
+      <v-toolbar-side-icon class="hidden-lg-and-up" @click.native.stop="sidebar4 = !sidebar4" />
5
+      <v-toolbar-logo class="text-xs-right">Logo</v-toolbar-logo>
6
+    </v-toolbar>
7
+    <main>
8
+      <v-sidebar v-model="sidebar4" height="auto">
9
+        <v-list dense>
10
+          <template v-for="(item,i) in itemGroup">
11
+            <v-list-group v-if="item.items">
12
+              <v-list-item slot="item">
13
+                <v-list-tile ripple>
14
+                  <v-list-tile-title v-text="item.title" />
15
+                  <v-list-tile-action>
16
+                    <v-icon>keyboard_arrow_down</v-icon>
17
+                  </v-list-tile-action>
18
+                </v-list-tile>
19
+              </v-list-item>
20
+              <v-list-item v-for="(subItem,i) in item.items" :key="i">
21
+                <v-list-tile ripple>
22
+                  <v-list-tile-title v-text="subItem.title" />
23
+                </v-list-tile>
24
+              </v-list-item>
25
+            </v-list-group>
26
+            <v-subheader v-else-if="item.header" v-text="item.header" />
27
+            <v-divider v-else-if="item.divider" light />
28
+            <v-list-item v-else>
29
+              <v-list-tile ripple>
30
+                <v-list-tile-title v-text="item.title" />
31
+              </v-list-tile>
32
+            </v-list-item>
33
+          </template>
34
+        </v-list>
35
+      </v-sidebar>
36
+      <v-content>
37
+        <v-container fluid></v-container>
38
+      </v-content>
39
+    </main>
40
+  </v-app>
41
+</template>
42
+
43
+<script>
44
+export default {
45
+  name: 'app',
46
+    data () {
47
+        return {
48
+            itemGroup: [
49
+                { header: 'Header' },
50
+                {
51
+                    title: 'Parent',
52
+                    group: '/company',
53
+                    items: [
54
+                        { title: 'Child' },
55
+                        { title: 'Child' },
56
+                        { title: 'Child' }
57
+                    ]
58
+                },
59
+                { title: 'Link' },
60
+                { title: 'Link' },
61
+                { divider: true },
62
+                { header: 'Another Header' },
63
+                { title: 'Link' }
64
+            ],
65
+            sidebar4: ''
66
+        }
67
+    }
68
+}
69
+</script>
70
+
71
+<style>
72
+#app {
73
+  font-family: 'Avenir', Helvetica, Arial, sans-serif;
74
+  -webkit-font-smoothing: antialiased;
75
+  -moz-osx-font-smoothing: grayscale;
76
+  text-align: center;
77
+  color: #2c3e50;
78
+  margin-top: 60px;
79
+}
80
+</style>

BIN
WebContent/src/assets/logo.png View File


+ 53
- 0
WebContent/src/components/Hello.vue View File

@@ -0,0 +1,53 @@
1
+<template>
2
+  <div class="hello">
3
+    <h1>{{ msg }}</h1>
4
+    <h2>Essential Links</h2>
5
+    <ul>
6
+      <li><a href="https://vuejs.org" target="_blank">Core Docs</a></li>
7
+      <li><a href="https://forum.vuejs.org" target="_blank">Forum</a></li>
8
+      <li><a href="https://gitter.im/vuejs/vue" target="_blank">Gitter Chat</a></li>
9
+      <li><a href="https://twitter.com/vuejs" target="_blank">Twitter</a></li>
10
+      <br>
11
+      <li><a href="http://vuejs-templates.github.io/webpack/" target="_blank">Docs for This Template</a></li>
12
+    </ul>
13
+    <h2>Ecosystem</h2>
14
+    <ul>
15
+      <li><a href="http://router.vuejs.org/" target="_blank">vue-router</a></li>
16
+      <li><a href="http://vuex.vuejs.org/" target="_blank">vuex</a></li>
17
+      <li><a href="http://vue-loader.vuejs.org/" target="_blank">vue-loader</a></li>
18
+      <li><a href="https://github.com/vuejs/awesome-vue" target="_blank">awesome-vue</a></li>
19
+    </ul>
20
+  </div>
21
+</template>
22
+
23
+<script>
24
+export default {
25
+  name: 'hello',
26
+  data () {
27
+    return {
28
+      msg: 'Welcome to Your Vue.js App'
29
+    }
30
+  }
31
+}
32
+</script>
33
+
34
+<!-- Add "scoped" attribute to limit CSS to this component only -->
35
+<style scoped>
36
+h1, h2 {
37
+  font-weight: normal;
38
+}
39
+
40
+ul {
41
+  list-style-type: none;
42
+  padding: 0;
43
+}
44
+
45
+li {
46
+  display: inline-block;
47
+  margin: 0 10px;
48
+}
49
+
50
+a {
51
+  color: #42b983;
52
+}
53
+</style>

+ 48
- 0
WebContent/src/components/SideBar.vue View File

@@ -0,0 +1,48 @@
1
+<v-app id="example-3" class="elevation-1" top-toolbar left-sidebar>
2
+    <main>
3
+        <v-sidebar v-model="sidebar4" height="auto">
4
+            <v-list dense>
5
+                <template v-for="(item,i) in itemGroup">
6
+                    <v-list-group v-if="item.items">
7
+                        <v-list-item slot="item">
8
+                            <v-list-tile ripple>
9
+                                <v-list-tile-title v-text="item.title" />
10
+                                <v-list-tile-action>
11
+                                    <v-icon>keyboard_arrow_down</v-icon>
12
+                                </v-list-tile-action>
13
+                            </v-list-tile>
14
+                        </v-list-item>
15
+                        <v-list-item v-for="(subItem,i) in item.items" :key="i">
16
+                            <v-list-tile ripple>
17
+                                <v-list-tile-title v-text="subItem.title" />
18
+                            </v-list-tile>
19
+                        </v-list-item>
20
+                    </v-list-group>
21
+                    <v-subheader v-else-if="item.header" v-text="item.header" />
22
+                    <v-divider v-else-if="item.divider" light />
23
+                    <v-list-item v-else>
24
+                        <v-list-tile ripple>
25
+                            <v-list-tile-title v-text="item.title" />
26
+                        </v-list-tile>
27
+                    </v-list-item>
28
+                </template>
29
+            </v-list>
30
+        </v-sidebar>
31
+        <v-content>
32
+            <v-container fluid></v-container>
33
+        </v-content>
34
+    </main>
35
+</v-app>
36
+
37
+
38
+<script>
39
+    export default {
40
+        name: 'sidebar',
41
+        data () {
42
+            return {
43
+                itemGroup: ['A', 'B']
44
+
45
+            }
46
+        }
47
+    }
48
+</script>

+ 14
- 0
WebContent/src/index.html View File

@@ -0,0 +1,14 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+	<meta charset="utf-8">
5
+	<meta http-equiv="Pragma" content="no-cache">
6
+	<meta http-equiv="Cache-Control" content="no-cache">
7
+	<meta name="viewport" content="width=device-width">
8
+	<title>E-Commerce Inventory</title>
9
+</head>
10
+<body>
11
+	<div id="app"></div>
12
+	<!--<v-app id="app" class="elevation-1" top-toolbar left-sidebar></v-app>-->
13
+</body>
14
+</html>

+ 18
- 0
WebContent/src/main.js View File

@@ -0,0 +1,18 @@
1
+// The Vue build version to load with the `import` command
2
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
+import Vue from 'vue'
4
+import Vuetify from 'vuetify'
5
+import App from './App'
6
+import router from './router'
7
+
8
+
9
+Vue.use(Vuetify);
10
+Vue.config.productionTip = false;
11
+
12
+/* eslint-disable no-new */
13
+new Vue({
14
+  el: '#app',
15
+  router,
16
+  template: '<App/>',
17
+  components: { App }
18
+});

+ 16
- 0
WebContent/src/router/index.js View File

@@ -0,0 +1,16 @@
1
+import Vue from 'vue'
2
+import Router from 'vue-router'
3
+import Hello from '../components/Hello.vue'
4
+import SideBar from '../components/SideBar.vue'
5
+
6
+Vue.use(Router);
7
+
8
+export default new Router({
9
+  routes: [
10
+    {
11
+      path: '/',
12
+      name: 'SideBar',
13
+      component: SideBar
14
+    }
15
+  ]
16
+})

+ 2
- 2
WebContent/stock-form.html View File

@@ -30,7 +30,7 @@
30 30
 			<!-- Collect the nav links, forms, and other content for toggling -->
31 31
 			<div class="collapse navbar-collapse" id="navbar-collapse">
32 32
 				<ul class="nav navbar-nav">
33
-					<li><a href="index.html">Inventory Management</a></li>
33
+					<li><a href="src/index.html">Inventory Management</a></li>
34 34
 				</ul>
35 35
 				<ul class="nav navbar-nav navbar-right">
36 36
 					<li class="dropdown"><a href="#" class="dropdown-toggle"
@@ -56,7 +56,7 @@
56 56
 
57 57
 		<!-- Bread crumbs -->
58 58
 		<ol class="breadcrumb">
59
-			<li><a href="index.html">Inventory List</a></li>
59
+			<li><a href="src/index.html">Inventory List</a></li>
60 60
 			<li class="active"><span>New</span></li>
61 61
 		</ol>
62 62
 

+ 2
- 2
WebContent/stock.html View File

@@ -30,7 +30,7 @@
30 30
 			<!-- Collect the nav links, forms, and other content for toggling -->
31 31
 			<div class="collapse navbar-collapse" id="navbar-collapse">
32 32
 				<ul class="nav navbar-nav">
33
-					<li><a href="index.html">Inventory Management</a></li>
33
+					<li><a href="src/index.html">Inventory Management</a></li>
34 34
 				</ul>
35 35
 				<ul class="nav navbar-nav navbar-right">
36 36
 					<li class="dropdown"><a href="#" class="dropdown-toggle"
@@ -56,7 +56,7 @@
56 56
 
57 57
 		<!-- Bread crumbs -->
58 58
 		<ol class="breadcrumb">
59
-			<li><a href="index.html">Inventory List</a></li>
59
+			<li><a href="src/index.html">Inventory List</a></li>
60 60
 			<li class="active"><span>Detail</span></li>
61 61
 		</ol>
62 62
 

+ 70
- 0
WebContent/webpack.config.js View File

@@ -0,0 +1,70 @@
1
+var path = require('path');
2
+// var utils = require('./utils')
3
+// var config = require('../config')
4
+var HtmlWebpackPlugin = require('html-webpack-plugin');
5
+var vueLoaderConfig = require('./build/vue-loader.conf.js');
6
+
7
+function resolve (dir) {
8
+  return path.join(__dirname, '..', dir)
9
+}
10
+
11
+module.exports = {
12
+  entry: {
13
+    app: './src/main.js'
14
+  },
15
+  output: {
16
+    path: path.resolve(__dirname, ''),
17
+    filename: 'js/app.js'
18
+  },
19
+  resolve: {
20
+    extensions: ['.js', '.vue', '.json'],
21
+    alias: {
22
+      'vue$': 'vue/dist/vue.esm.js',
23
+      '@': resolve('src')
24
+    }
25
+  },
26
+  module: {
27
+    rules: [
28
+      {
29
+          test: /\.css$/,
30
+          use: [
31
+              { loader: "style-loader" },
32
+              { loader: "css-loader" },
33
+          ],
34
+      },
35
+      {
36
+        test: /\.vue$/,
37
+        loader: 'vue-loader',
38
+        options: vueLoaderConfig
39
+      },
40
+      {
41
+        test: /\.js$/,
42
+        loader: 'babel-loader',
43
+        include: [resolve('src'), resolve('test')]
44
+      },
45
+      {
46
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
47
+        loader: 'url-loader',
48
+        options: {
49
+          limit: 10000,
50
+          // name: utils.assetsPath('img/[name].[hash:7].[ext]')
51
+        }
52
+      },
53
+      {
54
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
55
+        loader: 'url-loader',
56
+        options: {
57
+          limit: 10000,
58
+          // name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
59
+        }
60
+      }
61
+    ]
62
+  },
63
+  plugins: [
64
+      new HtmlWebpackPlugin({
65
+          filename: 'index.html',
66
+          template: 'src/index.html',
67
+          inject: true
68
+      }),
69
+  ]
70
+};

Loading…
Cancel
Save