-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚧 WIP Integrate parcel and refactor to more pure Vue components #459
base: develop
Are you sure you want to change the base?
Changes from 7 commits
ae69a91
ed7270d
171e11f
c5174b1
b8e81e8
c1a52c0
66d434b
e2ccd3c
c2d828f
3bff06d
a595939
3c72d1d
034d987
4394ae1
7d4c1a8
6ed9e7a
10b9211
1ba51e7
c99dd70
5f1e77a
bb29d06
f71b2be
8494797
8b5ffe8
641de54
165abc6
d8dcca3
bcde54e
440ea17
098534d
74ee6d7
7b8308d
e9e34a1
622c5da
47a4cad
bbf848a
d795df9
3dac5ee
1a327d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ZAP_HUD_FILES=https://zap | ||
ZAP_HUD_URL=https://targetdomain.com | ||
ZAP_HUD_API=https://zap/api | ||
ZAP_HUD_WS=https://zap/websocket | ||
ZAP_HUD_TOOLS=http://zap/to/some/tool | ||
ZAP_SHARED_SECRET=sometestsecret |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,8 @@ | |
# JS | ||
node_modules/ | ||
dist/ | ||
.cache | ||
.env | ||
|
||
# Visual Studio Code | ||
.vscode |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Vue from 'vue'; | ||
export const EventBus = new Vue(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. love this shared module There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the events are registered in this external bus, they all need to be individually torn down:
You could create a global mixin here, but I think that the difficulty you would face is that you will have to contort yourself to know which component is being destroyed. Probably better to tear them down in the individual components, because that way later contributors can SEE that they are being unregistered. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
plugins: { | ||
"posthtml-expressions": { | ||
locals: { | ||
ZAP_HUD_FILES: process.env.ZAP_HUD_FILES, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whats the reason for the env var pattern here instead of just hard coding them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Parcel supports https://parceljs.org/env.html There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jaywon: fwiw each of those instances of (I know it isn't particularly material here, but at some point I'm probably going to be running a grammar check against some of these repositories, so to the extent I can remind people to be aware of the distinction: |
||
ZAP_HUD_URL: process.env.ZAP_HUD_URL, | ||
ZAP_HUD_API: process.env.ZAP_HUD_API, | ||
ZAP_HUD_WS: process.env.ZAP_HUD_WS, | ||
ZAP_HUD_TOOLS: process.env.ZAP_HUD_TOOLS, | ||
ZAP_SHARED_SECRET: process.env.ZAP_SHARED_SECRET | ||
} | ||
} | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
walking through the commits rn. haha. so this is where you set the variables to be pulled in by postHTML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! This file is just a template, for actual dev you would:
And then edit for your environment.
.env
is in the.gitignore
as often times this has values you don't want committed to repo. I added some copy in theREADME
about it and @melsoriano will document in the wiki too.