Skip to content

Commit 8b3ed2d

Browse files
committed
Initial commit after creation via vue-cli (webpack-simple template)
0 parents  commit 8b3ed2d

11 files changed

+5767
-0
lines changed

.babelrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
["env", { "modules": false }],
4+
"stage-3"
5+
]
6+
}

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
npm-debug.log
5+
yarn-error.log
6+
7+
# Editor directories and files
8+
.idea
9+
*.suo
10+
*.ntvs*
11+
*.njsproj
12+
*.sln
13+
*.sublime-project
14+
*.sublime-workspace

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# metrornorme
2+
3+
> Simple and yet beautiful metronome, as a web app.
4+
5+
## Build Setup
6+
7+
``` bash
8+
# install dependencies
9+
npm install
10+
11+
# serve with hot reload at localhost:8080
12+
npm run dev
13+
14+
# build for production with minification
15+
npm run build
16+
```
17+
18+
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).

index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>metrornorme</title>
6+
</head>
7+
<body>
8+
<div id="app"></div>
9+
<script src="/dist/build.js"></script>
10+
</body>
11+
</html>

package.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "metrornorme",
3+
"description": "Simple and yet beautiful metronome, as a web app.",
4+
"version": "1.0.0",
5+
"author": "NiavlysB <sylvain.brunerie@gmail.com>",
6+
"license": "MIT",
7+
"private": true,
8+
"scripts": {
9+
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
10+
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
11+
},
12+
"dependencies": {
13+
"vue": "^2.5.11"
14+
},
15+
"browserslist": [
16+
"> 1%",
17+
"last 2 versions",
18+
"not ie <= 8"
19+
],
20+
"devDependencies": {
21+
"babel-core": "^6.26.0",
22+
"babel-loader": "^7.1.2",
23+
"babel-preset-env": "^1.6.0",
24+
"babel-preset-stage-3": "^6.24.1",
25+
"cross-env": "^5.0.5",
26+
"css-loader": "^0.28.7",
27+
"file-loader": "^1.1.4",
28+
"vue-loader": "^13.0.5",
29+
"vue-template-compiler": "^2.4.4",
30+
"webpack": "^3.6.0",
31+
"webpack-dev-server": "^2.9.1"
32+
}
33+
}

src/App.vue

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<template>
2+
<div id="app">
3+
<img src="./assets/logo.png">
4+
<h1>{{ msg }}</h1>
5+
<h2>Essential Links</h2>
6+
<ul>
7+
<li><a href="https://vuejs.org" target="_blank">Core Docs</a></li>
8+
<li><a href="https://forum.vuejs.org" target="_blank">Forum</a></li>
9+
<li><a href="https://chat.vuejs.org" target="_blank">Community Chat</a></li>
10+
<li><a href="https://twitter.com/vuejs" target="_blank">Twitter</a></li>
11+
</ul>
12+
<h2>Ecosystem</h2>
13+
<ul>
14+
<li><a href="http://router.vuejs.org/" target="_blank">vue-router</a></li>
15+
<li><a href="http://vuex.vuejs.org/" target="_blank">vuex</a></li>
16+
<li><a href="http://vue-loader.vuejs.org/" target="_blank">vue-loader</a></li>
17+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank">awesome-vue</a></li>
18+
</ul>
19+
</div>
20+
</template>
21+
22+
<script>
23+
export default {
24+
name: 'app',
25+
data () {
26+
return {
27+
msg: 'Welcome to Your Vue.js App'
28+
}
29+
}
30+
}
31+
</script>
32+
33+
<style>
34+
#app {
35+
font-family: 'Avenir', Helvetica, Arial, sans-serif;
36+
-webkit-font-smoothing: antialiased;
37+
-moz-osx-font-smoothing: grayscale;
38+
text-align: center;
39+
color: #2c3e50;
40+
margin-top: 60px;
41+
}
42+
43+
h1, h2 {
44+
font-weight: normal;
45+
}
46+
47+
ul {
48+
list-style-type: none;
49+
padding: 0;
50+
}
51+
52+
li {
53+
display: inline-block;
54+
margin: 0 10px;
55+
}
56+
57+
a {
58+
color: #42b983;
59+
}
60+
</style>

src/assets/logo.png

6.69 KB
Loading

src/main.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import Vue from 'vue'
2+
import App from './App.vue'
3+
4+
new Vue({
5+
el: '#app',
6+
render: h => h(App)
7+
})

webpack.config.js

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
var path = require('path')
2+
var webpack = require('webpack')
3+
4+
module.exports = {
5+
entry: './src/main.js',
6+
output: {
7+
path: path.resolve(__dirname, './dist'),
8+
publicPath: '/dist/',
9+
filename: 'build.js'
10+
},
11+
module: {
12+
rules: [
13+
{
14+
test: /\.css$/,
15+
use: [
16+
'vue-style-loader',
17+
'css-loader'
18+
],
19+
}, {
20+
test: /\.vue$/,
21+
loader: 'vue-loader',
22+
options: {
23+
loaders: {
24+
}
25+
// other vue-loader options go here
26+
}
27+
},
28+
{
29+
test: /\.js$/,
30+
loader: 'babel-loader',
31+
exclude: /node_modules/
32+
},
33+
{
34+
test: /\.(png|jpg|gif|svg)$/,
35+
loader: 'file-loader',
36+
options: {
37+
name: '[name].[ext]?[hash]'
38+
}
39+
}
40+
]
41+
},
42+
resolve: {
43+
alias: {
44+
'vue$': 'vue/dist/vue.esm.js'
45+
},
46+
extensions: ['*', '.js', '.vue', '.json']
47+
},
48+
devServer: {
49+
historyApiFallback: true,
50+
noInfo: true,
51+
overlay: true
52+
},
53+
performance: {
54+
hints: false
55+
},
56+
devtool: '#eval-source-map'
57+
}
58+
59+
if (process.env.NODE_ENV === 'production') {
60+
module.exports.devtool = '#source-map'
61+
// http://vue-loader.vuejs.org/en/workflow/production.html
62+
module.exports.plugins = (module.exports.plugins || []).concat([
63+
new webpack.DefinePlugin({
64+
'process.env': {
65+
NODE_ENV: '"production"'
66+
}
67+
}),
68+
new webpack.optimize.UglifyJsPlugin({
69+
sourceMap: true,
70+
compress: {
71+
warnings: false
72+
}
73+
}),
74+
new webpack.LoaderOptionsPlugin({
75+
minimize: true
76+
})
77+
])
78+
}

0 commit comments

Comments
 (0)