Skip to content
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

adjustments after testing @explorer-1/nuxt in a separate project #451

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"scss.lint.unknownAtRules": "ignore"
"scss.lint.unknownAtRules": "ignore",
"workbench.colorTheme": "Witch Hazel Hypercolor"
jamesray marked this conversation as resolved.
Show resolved Hide resolved
}
65 changes: 61 additions & 4 deletions packages/nuxt/playground/app.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,68 @@
<template>
<div class="py-10 text-center">
<base-button variant="primary">
Button component
</base-button>
<div class="relative">
<base-heading size="h1">Nuxt Module Playground</base-heading>
<div class="text-center mb-3">
<base-button variant="primary">
Button component
</base-button>
</div>
<block-image class="relative" :data="BlockImageData" />
<p>This is a paragraph, not a component.</p>
</div>
</template>

<script setup>

const BlockImageData = {
blockType: 'FullBleedImageBlock',
fullBleed: false,
image: {
alt: 'Fourth image',
caption:
'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel porttitor urna. Maecenas at est laoreet, sagittis risus a, rutrum ipsum. Quisque tincidunt lacus nunc, dapibus facilisis felis scelerisque sit amet. </p>',
credit: 'NASA/JPL',
detailUrl: '/image/placeholder/',
original: 'https://picsum.photos/869/700',
src: {
height: 700,
url: 'https://picsum.photos/869/700',
width: 869
},
srcSet: 'https://picsum.photos/320/258 320w, https://picsum.photos/869/700 1024w'
},
imageFullBleed: {
alt: 'Fourth image',
caption:
'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel porttitor urna. Maecenas at est laoreet, sagittis risus a, rutrum ipsum. Quisque tincidunt lacus nunc, dapibus facilisis felis scelerisque sit amet. </p>',
credit: 'NASA/JPL',
detailUrl: '/image/placeholder/',
original: 'https://picsum.photos/1800/600',
src: {
width: 1800,
height: 900,
url: 'https://picsum.photos/1800/600'
},
srcCropped: {
width: 1024,
height: 341,
url: 'https://picsum.photos/1024/341'
},
screenXs: {
url: 'https://picsum.photos/320/107',
width: 320
},
screenLg: {
url: 'https://picsum.photos/1024/341',
width: 1024
},
screenXl: {
url: 'https://picsum.photos/1280/427',
width: 1280
},
screenThreexl: {
url: 'https://picsum.photos/1800/600',
width: 1800
}
}
}
</script>
1 change: 0 additions & 1 deletion packages/nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default defineNuxtModule<ModuleOptions>({
// extend nuxt's vite config without overriding nuxt.config.js
_nuxt.options.vite = {
..._nuxt.options.vite,

resolve: {
..._nuxt.options.vite.resolve,
alias: {
Expand Down
10 changes: 9 additions & 1 deletion packages/nuxt/src/runtime/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import path from 'path'
import { fileURLToPath } from 'node:url'
import explorer1Config from '@explorer-1/common/tailwind.config'

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

console.log('ℹ Tailwind Config provided by @explorer-1/nuxt')

export default {
...explorer1Config,
content: ['./../node_modules/@explorer-1/vue/src/components/**/*.vue']
content: [path.resolve(__dirname, './../../node_modules/@explorer-1/vue/src/**/*.vue')]
}
1 change: 1 addition & 0 deletions packages/vue/dist/explorer-1-vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/main'
Loading
Loading