-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Anthony Fu <[email protected]>
- Loading branch information
Showing
9 changed files
with
121 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import type { NuxtDevtoolsServerContext } from '../types' | ||
import { addPluginTemplate } from '@nuxt/kit' | ||
import { addPluginTemplate, resolvePath } from '@nuxt/kit' | ||
import { join } from 'pathe' | ||
import { runtimeDir } from '../dirs' | ||
|
||
export function setup({ nuxt }: NuxtDevtoolsServerContext) { | ||
export async function setup({ nuxt }: NuxtDevtoolsServerContext) { | ||
if (!nuxt.options.dev || nuxt.options.test) | ||
return | ||
|
||
addPluginTemplate({ | ||
name: 'vue-devtools-client', | ||
mode: 'client', | ||
src: join(runtimeDir, 'vue-devtools-client.js'), | ||
src: await resolvePath(join(runtimeDir, 'vue-devtools-client')), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// todo: remove this once nuxt with directives folder here | ||
import type { DirectiveBinding } from 'vue' | ||
|
||
function mounted(el: HTMLElement, binding: DirectiveBinding) { | ||
// eslint-disable-next-line no-console | ||
console.log('mounted', el, binding) | ||
} | ||
|
||
function unmounted(el: HTMLElement, binding: DirectiveBinding) { | ||
// eslint-disable-next-line no-console | ||
console.log('unmounted', el, binding) | ||
} | ||
|
||
function updated(el: HTMLElement, binding: DirectiveBinding) { | ||
// eslint-disable-next-line no-console | ||
console.log('updated', el, binding) | ||
} | ||
|
||
export const Focus = { | ||
mounted, | ||
unmounted, | ||
updated, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.