commit 494899c7d296a30d9bc9f849232ae804f35eb18f Author: Johannes Zillmann Date: Fri Nov 11 19:47:20 2016 +0100 Hello World Vue App diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..14784af --- /dev/null +++ b/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["es2015", "stage-0"], + "plugins": ["transform-runtime"] +} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b947077 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ diff --git a/package.json b/package.json new file mode 100644 index 0000000..89e1b60 --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "pdf-to-markdown", + "version": "0.0.1", + "description": "A PDF to Markdown converter", + "main": "main.js", + "scripts": { + "watch": "webpack -d --watch", + "build": "webpack" + }, + "keywords": [ + "PDF", + "Markdown", + "Converter" + ], + "author": "Johannes Zillmann", + "license": "ISC", + "dependencies": { + "vue": "^2.0.5" + }, + "devDependencies": { + "babel-core": "^6.18.2", + "babel-eslint": "^7.1.0", + "babel-loader": "^6.2.7", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-stage-0": "^6.16.0", + "css-loader": "^0.25.0", + "file-loader": "^0.9.0", + "html-webpack-plugin": "^2.24.1", + "url-loader": "^0.5.7", + "vue-loader": "^9.8.1", + "webpack": "^1.13.3" + } +} diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..a4dd50d --- /dev/null +++ b/src/App.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/components/Hello.vue b/src/components/Hello.vue new file mode 100644 index 0000000..7adba10 --- /dev/null +++ b/src/components/Hello.vue @@ -0,0 +1,53 @@ + + + + + + diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..bf272c8 --- /dev/null +++ b/src/index.html @@ -0,0 +1,11 @@ + + + + + PDF to Markdown + + +
+ + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..6578802 --- /dev/null +++ b/src/main.js @@ -0,0 +1,11 @@ +import Vue from 'vue' +import App from './App' + +/* eslint-disable no-new */ +new Vue({ + el: '#app', + template: '', + components: { + App + } +}) diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..e54ff84 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,58 @@ +var path = require('path') +var sourceDir = path.resolve(__dirname, 'src'); + +var HtmlWebpackPlugin = require('html-webpack-plugin'); + +module.exports = { + entry: './src/main.js', + output: { + // To the `dist` folder + path: './dist', + // With the filename `build.js` so it's dist/build.js + filename: 'build.js' + }, + resolve: { + extensions: ['', '.js', '.vue'], + fallback: [path.join(__dirname, '../node_modules')], + alias: { + 'vue$': 'vue/dist/vue', + 'src': path.resolve(__dirname, '../src'), + 'assets': path.resolve(__dirname, '../src/assets'), + 'components': path.resolve(__dirname, '../src/components') + } + }, + resolveLoader: { + fallback: [path.join(__dirname, '../node_modules')] + }, + module: { + // Special compilation rules + loaders: [ + { + // Ask webpack to check: If this file ends with .js, then apply some transforms + test: /\.js$/, + // Transform it with babel + loader: 'babel', + // don't transform node_modules folder (which don't need to be compiled) + exclude: /node_modules/ + }, + { + test: /\.vue$/, + loader: 'vue' + }, + { + test: /\.png$/, + loader: "url-loader?limit=100000" + }, + ] + }, + vue: { + loaders: { + js: 'babel' + } + }, + plugins: [ + new HtmlWebpackPlugin({ + template: sourceDir + '/index.html' + }) + ] +} \ No newline at end of file