Skip to content

Commit 43d6d1e

Browse files
committed
working state before tweaking webpack to get dev server working
1 parent 685119f commit 43d6d1e

File tree

4 files changed

+83
-85
lines changed

4 files changed

+83
-85
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# Required for Slack Oauth features
33
# Create a file named .env in this directory, and give it the following variables
44
# Any variable you create in .env, you MUST create an example for here in .env.example
5-
SLACK_CLIENT_SECRET = "ENTER_CLIENT_SECRET_HERE",
5+
SLACK_CLIENT_SECRET = "ENTER_CLIENT_SECRET_HERE"
66
SLACK_CLIENT_ID = "ENTER_CLIENT_ID_HERE"
7+
SLACK_WEBHOOK_URL = "ENTER WEBHOOK URL HERE"
78

89
# https://www.npmjs.com/package/dotenv
910
# https://www.npmjs.com/package/quasar-dotenv

quasar.conf.js

Lines changed: 75 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
// Configuration for your app
22
// https://quasar.dev/quasar-cli/quasar-conf-js
33

4-
module.exports = function (ctx) {
5-
const env = require('quasar-dotenv').config()
4+
module.exports = function(ctx) {
5+
const env = require("quasar-dotenv").config();
66
return {
77
// app boot file (/src/boot)
88
// --> boot files are part of "main.js"
9-
boot: [
10-
],
9+
boot: [],
1110

12-
css: [
13-
'app.styl'
14-
],
11+
css: ["app.styl"],
1512

1613
extras: [
1714
// 'ionicons-v4',
@@ -21,8 +18,8 @@ module.exports = function (ctx) {
2118
// 'themify',
2219
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
2320

24-
'roboto-font', // optional, you are not bound to it
25-
'material-icons' // optional, you are not bound to it
21+
"roboto-font", // optional, you are not bound to it
22+
"material-icons" // optional, you are not bound to it
2623
],
2724

2825
framework: {
@@ -32,49 +29,44 @@ module.exports = function (ctx) {
3229
// all: true, // --- includes everything; for dev only!
3330

3431
components: [
35-
'QLayout',
36-
'QHeader',
37-
'QDrawer',
38-
'QPageContainer',
39-
'QPage',
40-
'QToolbar',
41-
'QToolbarTitle',
42-
'QBtn',
43-
'QIcon',
44-
'QList',
45-
'QItem',
46-
'QItemSection',
47-
'QItemLabel',
48-
'QExpansionItem',
49-
'QInput',
50-
'QBar',
51-
'QFooter',
52-
'QAvatar',
53-
'QTabs',
54-
'QTab',
55-
'QRouteTab',
56-
'QTabPanels',
57-
'QDialog',
58-
'QSelect',
59-
'QTabPanel',
60-
'QFab',
61-
'QFabAction',
62-
'QMenu',
63-
'QUploader',
64-
'QEditor',
65-
'QCard',
66-
'QChip'
32+
"QLayout",
33+
"QHeader",
34+
"QDrawer",
35+
"QPageContainer",
36+
"QPage",
37+
"QToolbar",
38+
"QToolbarTitle",
39+
"QBtn",
40+
"QIcon",
41+
"QList",
42+
"QItem",
43+
"QItemSection",
44+
"QItemLabel",
45+
"QExpansionItem",
46+
"QInput",
47+
"QBar",
48+
"QFooter",
49+
"QAvatar",
50+
"QTabs",
51+
"QTab",
52+
"QRouteTab",
53+
"QTabPanels",
54+
"QDialog",
55+
"QSelect",
56+
"QTabPanel",
57+
"QFab",
58+
"QFabAction",
59+
"QMenu",
60+
"QUploader",
61+
"QEditor",
62+
"QCard",
63+
"QChip"
6764
],
6865

69-
directives: [
70-
'Ripple',
71-
'ClosePopup'
72-
],
66+
directives: ["Ripple", "ClosePopup"],
7367

7468
// Quasar plugins
75-
plugins: [
76-
'Notify'
77-
]
69+
plugins: ["Notify"]
7870
},
7971

8072
supportIE: false,
@@ -86,7 +78,7 @@ module.exports = function (ctx) {
8678
// gzip: true,
8779
// analyze: true,
8880
// extractCSS: false,
89-
extendWebpack (cfg) {
81+
extendWebpack(cfg) {
9082
// cfg.module.rules.push({
9183
// enforce: 'pre',
9284
// test: /\.(js|vue)$/,
@@ -97,13 +89,16 @@ module.exports = function (ctx) {
9789
// }
9890
// })
9991
},
100-
env: env,
92+
env: env
10193
},
10294

10395
devServer: {
104-
// https: true,
96+
https: true,
10597
// port: 8080,
98+
// public: 'overvuedev',
99+
// host: 'overvuedev',
106100
open: true // opens browser window automatically
101+
107102
},
108103

109104
// animations: 'all', // --- includes all animations
@@ -120,35 +115,35 @@ module.exports = function (ctx) {
120115
// name: 'Quasar App',
121116
// short_name: 'Quasar App',
122117
// description: 'A Quasar Framework app',
123-
display: 'standalone',
124-
orientation: 'portrait',
125-
background_color: '#ffffff',
126-
theme_color: '#027be3',
118+
display: "standalone",
119+
orientation: "portrait",
120+
background_color: "#ffffff",
121+
theme_color: "#027be3",
127122
icons: [
128123
{
129-
'src': 'statics/icons/icon-128x128.png',
130-
'sizes': '128x128',
131-
'type': 'image/png'
124+
src: "statics/icons/icon-128x128.png",
125+
sizes: "128x128",
126+
type: "image/png"
132127
},
133128
{
134-
'src': 'statics/icons/icon-192x192.png',
135-
'sizes': '192x192',
136-
'type': 'image/png'
129+
src: "statics/icons/icon-192x192.png",
130+
sizes: "192x192",
131+
type: "image/png"
137132
},
138133
{
139-
'src': 'statics/icons/icon-256x256.png',
140-
'sizes': '256x256',
141-
'type': 'image/png'
134+
src: "statics/icons/icon-256x256.png",
135+
sizes: "256x256",
136+
type: "image/png"
142137
},
143138
{
144-
'src': 'statics/icons/icon-384x384.png',
145-
'sizes': '384x384',
146-
'type': 'image/png'
139+
src: "statics/icons/icon-384x384.png",
140+
sizes: "384x384",
141+
type: "image/png"
147142
},
148143
{
149-
'src': 'statics/icons/icon-512x512.png',
150-
'sizes': '512x512',
151-
'type': 'image/png'
144+
src: "statics/icons/icon-512x512.png",
145+
sizes: "512x512",
146+
type: "image/png"
152147
}
153148
]
154149
}
@@ -160,10 +155,10 @@ module.exports = function (ctx) {
160155
},
161156

162157
electron: {
163-
bundler: 'packager',
158+
bundler: "packager",
164159
// bundler: 'builder', // or 'packager'
165160

166-
extendWebpack (cfg) {
161+
extendWebpack(cfg) {
167162
// do something with Electron main process Webpack cfg
168163
// chainWebpack also available besides this extendWebpack
169164
},
@@ -172,10 +167,10 @@ module.exports = function (ctx) {
172167
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
173168

174169
// OS X / Mac App Store
175-
appBundleId: 'overvue',
170+
appBundleId: "overvue",
176171
// appCategoryType: '',
177172
// osxSign: '',
178-
protocol: 'overvue'
173+
protocol: "overvue"
179174

180175
// Windows only
181176
// win32metadata: { ... }
@@ -184,17 +179,17 @@ module.exports = function (ctx) {
184179
builder: {
185180
// https://www.electron.build/configuration/configuration
186181

187-
appId: 'com.electron.OverVue',
182+
appId: "com.electron.OverVue",
188183
win: {
189-
target: 'nsis'
184+
target: "nsis"
190185
},
191186
protocols: [
192187
{
193-
name: 'overvue',
194-
schemes: ['overvue']
188+
name: "overvue",
189+
schemes: ["overvue"]
195190
}
196191
]
197192
}
198193
}
199-
}
200-
}
194+
};
195+
};

src-electron/main-process/electron-main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ const deeplink = new Deeplink({
3636
mainWindow,
3737
protocol,
3838
isDev,
39-
debugLogging: true
39+
debugLogging: true,
40+
// electronPath: '../../node_modules/electron/dist/electron.app'
4041
});
41-
42+
// logEverywhere(`electron path: ${require('path').join(__dirname, '../../node_modules/electron/dist/electron.exe')}`);
4243
// Sends request to Slack for User's information,
4344
// then sends user information back to renderer process
4445
function sendTokenRequest() {
@@ -101,6 +102,7 @@ function sendTokenRequest() {
101102
function setOauthListener() {
102103
logEverywhere(`process.env.SLACK_CLIENT_ID in electron-main: ${process.env.SLACK_CLIENT_ID}`);
103104
logEverywhere(`process.env.SLACK_CLIENT_SECRET in electron-main: ${process.env.SLACK_CLIENT_SECRET}`);
105+
104106
return deeplink.on("received", link => {
105107
logEverywhere(`auth worked here link: ${link}`);
106108
// Extracts Slack authorization code from deep link

src/components/file_system_interface/SaveProjectComponent.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ const { remote } = require('electron')
1717
const Mousetrap = require('mousetrap')
1818
1919
// might not be optimal to import like this, since entire slackApiStuff object is imported while only one of its properties is used
20-
import slackApiStuff from '../../../secretStuff/slackApiStuff.js'
21-
const slackWebhookURL = slackApiStuff.slackWebhookURL
2220
2321
export default {
2422
name: 'SaveProjetComponent',
@@ -122,6 +120,8 @@ export default {
122120
// creates a popup dialog box, where if you click on yes, it will send a message to our test Slack workspace
123121
// still must refactor to dynamically work with user's Slack
124122
notifySlack () {
123+
const slackWebhookURL = process.env.SLACK_WEBHOOK_URL
124+
console.log(slackWebhookURL)
125125
remote.dialog.showMessageBox({
126126
title: 'Notify Slack?',
127127
message: 'Save successful. Would you like to notify your team on Slack?',

0 commit comments

Comments
 (0)