Skip to content

Commit

Permalink
Initial commit of Vue implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
keokilee committed Jan 10, 2016
1 parent 3711d73 commit bfe63cd
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .babelrc
@@ -0,0 +1,5 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
"comments": false
}
3 changes: 3 additions & 0 deletions .eslintrc
@@ -0,0 +1,3 @@
{
"extends": "standard"
}
5 changes: 2 additions & 3 deletions .gitignore
@@ -1,4 +1,3 @@
settings/*.json
node_modules
builtAssets
*.log
dist/
*.log
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
v5.3.0
Empty file added index.html
Empty file.
61 changes: 37 additions & 24 deletions package.json
Expand Up @@ -4,7 +4,9 @@
"description": "Display local HI5 redemption centers on the island.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"dev": "webpack-dev-server --inline --hot --config webpack.config.js",
"build": "rimraf dist && webpack --progress --hide-modules --config webpack.config.js",
"test": "karma start build/karma.conf.js --single-run"
},
"repository": {
"type": "git",
Expand All @@ -17,30 +19,41 @@
},
"homepage": "https://github.com/keokilee/hi5-redemption#readme",
"dependencies": {
"react": "^0.14.6",
"react-dom": "^0.14.6",
"redux": "^3.0.5"
"vue": "^1.0.13"
},
"devDependencies": {
"babel-core": "^6.4.0",
"babel-loader": "^6.2.1",
"babel-plugin-react-transform": "^2.0.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-stage-0": "^6.3.13",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"react-transform-catch-errors": "^1.0.1",
"react-transform-hmr": "^1.0.1",
"redbox-react": "^1.2.0",
"redux-devtools": "^3.0.1",
"redux-devtools-dock-monitor": "^1.0.1",
"redux-devtools-log-monitor": "^1.0.1",
"redux-logger": "^2.3.1",
"source-map-support": "^0.4.0",
"style-loader": "^0.13.0",
"webpack": "^1.12.10",
"webpack-dev-middleware": "^1.4.0",
"webpack-hot-middleware": "^2.6.0"
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-runtime": "^5.8.0",
"css-loader": "^0.23.0",
"eslint": "^1.10.3",
"eslint-config-standard": "^4.4.0",
"eslint-friendly-formatter": "^1.2.2",
"eslint-loader": "^1.2.0",
"eslint-plugin-standard": "^1.3.1",
"extract-text-webpack-plugin": "^0.9.1",
"file-loader": "^0.8.4",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.4.0",
"inject-loader": "^2.0.1",
"jasmine-core": "^2.4.1",
"json-loader": "^0.5.4",
"karma": "^0.13.15",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^0.2.1",
"karma-spec-reporter": "0.0.23",
"karma-webpack": "^1.7.0",
"phantomjs": "^1.9.19",
"rimraf": "^2.5.0",
"url-loader": "^0.5.7",
"vue-hot-reload-api": "^1.2.0",
"vue-html-loader": "^1.0.0",
"vue-loader": "^8.0.0",
"vue-style-loader": "^1.0.0",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.0"
}
}
22 changes: 22 additions & 0 deletions src/App.vue
@@ -0,0 +1,22 @@
<template>
<div id='app'>
<img class='logo' src='./assets/logo.png'>
<hello></hello>
</div>
</template>

<script>
import Hello from './components/Hello'
export default {
components: {
Hello
}
}
</script>

<style>
body {
font-family: Helvetica, sans-serif;
}
</style>
Binary file added src/assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/components/Hello.vue
@@ -0,0 +1,15 @@
<template>
<div class='hello'>
<h1>{{ msg }}</h1>
</div>
</template>

<script>
export default {
data () {
return {
msg: 'Hello world!'
}
}
}
</script>
9 changes: 9 additions & 0 deletions src/main.js
@@ -0,0 +1,9 @@
import Vue from 'vue'
import App from './App'

/* eslint-disable no-new */
new Vue({
el: 'body',
template: '<app></app>',
components: { App }
})
56 changes: 56 additions & 0 deletions webpack.config.js
@@ -0,0 +1,56 @@
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
devServer: {
contentBase: `${process.cwd()}/dist`,
host: '0.0.0.0',
historyApiFallback: true,
noInfo: true
},
devtool: 'eval-source-map',
entry: {
app: './src/main.js'
},
eslint: {
formatter: require('eslint-friendly-formatter')
},
module: {
loaders: [
{
test: /\.vue$/,
loader: 'vue'
}, {
test: /\.js$/,
loader: 'babel!eslint',
exclude: /node_modules/
}, {
test: /\.json$/,
loader: 'json'
}, {
test: /\.(png|jpg|gif|svg)$/,
loader: 'url',
query: {
limit: 10000,
name: '[name].[ext]?[hash]'
}
}
]
},
plugins: [ new HtmlWebpackPlugin({ title: 'HI-5 Redemption Centers' }) ],
output: {
path: `${process.cwd()}/dist`,
publicPath: '/',
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.vue'],
alias: {
'src': `${process.cwd()}/src`
}
},
vue: {
loaders: {
js: 'babel!eslint'
}
}
}

0 comments on commit bfe63cd

Please sign in to comment.