diff --git a/installer/package.json b/installer/package.json new file mode 100644 index 00000000..b6484474 --- /dev/null +++ b/installer/package.json @@ -0,0 +1,25 @@ +{ + "name": "bdinstaller", + "description": "BetterDiscord Installer", + "author": "Jiiks", + "version": "2.0.0", + "homepage": "https://betterdiscord.net", + "license": "MIT", + "main": "index.js", + "contributors": [ + "Jiiks", + "Pohky" + ], + "repository": { + "type": "git", + "url": "https://github.com/Jiiks/BetterDiscordApp.git" + }, + "private": false, + "devDependencies": { + + }, + "scripts": { + "build": "webpack --progress --colors", + "watch": "webpack --progress --colors --watch" + } +} diff --git a/installer/src/app.vue b/installer/src/app.vue new file mode 100644 index 00000000..c494b16b --- /dev/null +++ b/installer/src/app.vue @@ -0,0 +1,9 @@ + + + diff --git a/installer/src/index.html b/installer/src/index.html new file mode 100644 index 00000000..9ab7fdb0 --- /dev/null +++ b/installer/src/index.html @@ -0,0 +1,10 @@ + + + + + BetterDiscord Installer + + +
+ + diff --git a/installer/src/index.js b/installer/src/index.js new file mode 100644 index 00000000..84d4d83b --- /dev/null +++ b/installer/src/index.js @@ -0,0 +1,11 @@ +import Vue from 'vue'; +import App from './app.vue'; + +const mount = document.createElement('div'); +document.body.appendChild(mount); + +const instance = new Vue({ + el: mount, + components: { App }, + template: '' +}); diff --git a/installer/webpack.config.js b/installer/webpack.config.js new file mode 100644 index 00000000..575e24cf --- /dev/null +++ b/installer/webpack.config.js @@ -0,0 +1,35 @@ +const + path = require('path'), + webpack = require('webpack'), + HtmlWebpackPlugin = require('html-webpack-plugin'); +const vueLoader = { + test: /\.(vue)$/, + exclude: /node_modules/, + loader: 'vue-loader' +} + +const scssLoader = { + test: /\.(css|scss)$/, + loader: ['css-loader', 'sass-loader'] +} + +module.exports = { + entry: './src/index.js', + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'installer.js' + }, + module: { + loaders: [vueLoader, scssLoader] + }, + resolve: { + alias: { + vue$: path.resolve('..', 'node_modules', 'vue', 'dist', 'vue.esm.js') + } + }, + plugins: [ + new HtmlWebpackPlugin({ + template: './src/index.html' + }) + ] +}; diff --git a/package.json b/package.json index d31ba623..345622d3 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "gulp-babel": "^7.0.0", "gulp-plumber": "^1.2.0", "gulp-watch": "^5.0.0", + "html-webpack-plugin": "^3.0.6", "jquery": "^3.2.1", "lodash": "^4.17.4", "nedb": "^1.8.0", @@ -57,6 +58,7 @@ "build_core": "npm run build --prefix core", "watch_core": "npm run watch --prefix core", "watch_csseditor": "npm run watch --prefix csseditor", + "build_installer": "npm run build --prefix installer", "lint": "eslint -f unix client/src core/src csseditor/src", "test": "npm run build && npm run lint", "build_node-sass": "node scripts/build-node-sass.js"