From 1ff3f578980a29aee8d952e4cd7df786e955acd7 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 14 Jun 2018 20:09:06 +0200 Subject: js-src => src Signed-off-by: Roeland Jago Douma --- apps/oauth2/src/App.vue | 113 +++++++++++++++++++++++++++++++ apps/oauth2/src/components/OAuthItem.vue | 66 ++++++++++++++++++ apps/oauth2/src/main.js | 35 ++++++++++ apps/oauth2/src/webpack.common.js | 28 ++++++++ apps/oauth2/src/webpack.dev.js | 12 ++++ apps/oauth2/src/webpack.prod.js | 7 ++ 6 files changed, 261 insertions(+) create mode 100644 apps/oauth2/src/App.vue create mode 100644 apps/oauth2/src/components/OAuthItem.vue create mode 100644 apps/oauth2/src/main.js create mode 100644 apps/oauth2/src/webpack.common.js create mode 100644 apps/oauth2/src/webpack.dev.js create mode 100644 apps/oauth2/src/webpack.prod.js (limited to 'apps/oauth2/src') diff --git a/apps/oauth2/src/App.vue b/apps/oauth2/src/App.vue new file mode 100644 index 00000000000..6bbd90db525 --- /dev/null +++ b/apps/oauth2/src/App.vue @@ -0,0 +1,113 @@ + + + + diff --git a/apps/oauth2/src/components/OAuthItem.vue b/apps/oauth2/src/components/OAuthItem.vue new file mode 100644 index 00000000000..2ef10bfadf5 --- /dev/null +++ b/apps/oauth2/src/components/OAuthItem.vue @@ -0,0 +1,66 @@ + + + + diff --git a/apps/oauth2/src/main.js b/apps/oauth2/src/main.js new file mode 100644 index 00000000000..ff68f48593d --- /dev/null +++ b/apps/oauth2/src/main.js @@ -0,0 +1,35 @@ +/** + * @copyright Copyright (c) 2018 Roeland Jago Douma + * + * @author Roeland Jago Douma + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +import Vue from 'vue'; +import App from './App.vue'; + +Vue.prototype.t = t; +Vue.prototype.oc_defaults = oc_defaults; +Vue.prototype.OC = OC; + +const app = new Vue({ + render: h => h(App) +}).$mount('#oauth2'); + +export { app }; + diff --git a/apps/oauth2/src/webpack.common.js b/apps/oauth2/src/webpack.common.js new file mode 100644 index 00000000000..72bce3b287d --- /dev/null +++ b/apps/oauth2/src/webpack.common.js @@ -0,0 +1,28 @@ +const path = require('path') +const { VueLoaderPlugin } = require('vue-loader'); + +module.exports = { + entry: path.join(__dirname, 'main.js'), + output: { + path: path.resolve(__dirname, '../js'), + publicPath: '/js', + filename: 'oauth2.js' + }, + module: { + rules: [ + { + test: /\.vue$/, + loader: 'vue-loader', + } + ] + }, + plugins: [ + new VueLoaderPlugin() + ], + resolve: { + alias: { + 'vue$': 'vue/dist/vue.esm.js' + }, + extensions: ['*', '.js', '.vue', '.json'] + } +} diff --git a/apps/oauth2/src/webpack.dev.js b/apps/oauth2/src/webpack.dev.js new file mode 100644 index 00000000000..88409bbb1d8 --- /dev/null +++ b/apps/oauth2/src/webpack.dev.js @@ -0,0 +1,12 @@ +const merge = require('webpack-merge'); +const common = require('./webpack.common.js'); + +module.exports = merge(common, { + mode: 'development', + devServer: { + historyApiFallback: true, + noInfo: true, + overlay: true + }, + devtool: '#eval-source-map', +}) diff --git a/apps/oauth2/src/webpack.prod.js b/apps/oauth2/src/webpack.prod.js new file mode 100644 index 00000000000..f081567bd63 --- /dev/null +++ b/apps/oauth2/src/webpack.prod.js @@ -0,0 +1,7 @@ +const merge = require('webpack-merge') +const common = require('./webpack.common.js') + +module.exports = merge(common, { + mode: 'production', + devtool: '#source-map' +}) -- cgit v1.2.3