refactor: monorepo+pnpm (removed husky)
This commit is contained in:
5
packages/hoppscotch-app/plugins/README.md
Normal file
5
packages/hoppscotch-app/plugins/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# PLUGINS
|
||||
|
||||
This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
|
||||
|
||||
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
|
||||
18
packages/hoppscotch-app/plugins/crisp.js
Normal file
18
packages/hoppscotch-app/plugins/crisp.js
Normal file
@@ -0,0 +1,18 @@
|
||||
export default () => {
|
||||
window.$crisp = []
|
||||
window.CRISP_WEBSITE_ID = "3ad30257-c192-4773-955d-fb05a4b41af3"
|
||||
const d = document
|
||||
const s = d.createElement("script")
|
||||
|
||||
s.src = "https://client.crisp.chat/l.js"
|
||||
s.async = 1
|
||||
d.getElementsByTagName("head")[0].appendChild(s)
|
||||
$crisp.push(["do", "chat:hide"])
|
||||
$crisp.push([
|
||||
"on",
|
||||
"chat:closed",
|
||||
() => {
|
||||
$crisp.push(["do", "chat:hide"])
|
||||
},
|
||||
])
|
||||
}
|
||||
7
packages/hoppscotch-app/plugins/v-focus.js
Normal file
7
packages/hoppscotch-app/plugins/v-focus.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import Vue from "vue"
|
||||
|
||||
Vue.directive("focus", {
|
||||
inserted: (el) => {
|
||||
Vue.nextTick(() => el.focus())
|
||||
},
|
||||
})
|
||||
4
packages/hoppscotch-app/plugins/v-textarea.js
Normal file
4
packages/hoppscotch-app/plugins/v-textarea.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import Vue from "vue"
|
||||
import VueTextareaAutosize from "vue-textarea-autosize"
|
||||
|
||||
Vue.use(VueTextareaAutosize)
|
||||
16
packages/hoppscotch-app/plugins/v-tippy.js
Normal file
16
packages/hoppscotch-app/plugins/v-tippy.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import Vue from "vue"
|
||||
import VueTippy, { TippyComponent } from "vue-tippy"
|
||||
|
||||
Vue.use(VueTippy, {
|
||||
a11y: false,
|
||||
animateFill: false,
|
||||
arrowType: "round",
|
||||
popperOptions: {
|
||||
modifiers: {
|
||||
preventOverflow: {
|
||||
boundariesElement: "window",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Vue.component("Tippy", TippyComponent)
|
||||
15
packages/hoppscotch-app/plugins/vue-apollo.ts
Normal file
15
packages/hoppscotch-app/plugins/vue-apollo.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import Vue from "vue"
|
||||
import VueApollo from "vue-apollo"
|
||||
import { apolloClient } from "~/helpers/apollo"
|
||||
|
||||
const vueApolloProvider = new VueApollo({
|
||||
defaultClient: apolloClient as any,
|
||||
})
|
||||
|
||||
Vue.use(VueApollo)
|
||||
|
||||
export default (ctx: any) => {
|
||||
const { app } = ctx
|
||||
|
||||
app.apolloProvider = vueApolloProvider
|
||||
}
|
||||
9
packages/hoppscotch-app/plugins/web-worker.js
Normal file
9
packages/hoppscotch-app/plugins/web-worker.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import RegexWorker from "~/assets/js/regex.worker"
|
||||
|
||||
export default (_, inject) => {
|
||||
inject("worker", {
|
||||
createRejexWorker() {
|
||||
return new RegexWorker()
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user