Skip to content

Commit

Permalink
adjustments after testing @explorer-1/nuxt in a separate project (#451)
Browse files Browse the repository at this point in the history
* adjustments after testing the nuxt module in a separate project

* updatinb uild

* lint

* removing vscode settings
  • Loading branch information
stephiescastle authored May 30, 2024
1 parent ff9af3b commit edbf1cf
Show file tree
Hide file tree
Showing 36 changed files with 3,839 additions and 9,431 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ out/

# VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

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

0 comments on commit edbf1cf

Please sign in to comment.