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

Develop #20

Merged
merged 32 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c348dd4
Add images to document model
dvdmlln Sep 14, 2023
ecb44ed
1.0.1
dvdmlln Sep 14, 2023
86be16e
Update document model according to changes in rmnd_headless_solr
dvdmlln Sep 20, 2023
3c2bb8f
1.0.2
dvdmlln Sep 20, 2023
054f8e0
Adapt to changes in nuxt-typo3
dvdmlln Nov 8, 2023
65f94c5
Update dependencies and fix type and lint errors
dvdmlln Nov 9, 2023
3077c95
Update dependencies
dvdmlln Nov 23, 2023
7d45074
Submit search form on autocomplete select
dvdmlln Nov 23, 2023
5d2f356
Add github workflow
dvdmlln Nov 23, 2023
c37822c
Add spellchecking to results model
dvdmlln Nov 23, 2023
8f6357e
Remove playground install from workflow
dvdmlln Nov 23, 2023
268d47e
Add function to get route from search term
dvdmlln Nov 23, 2023
f89bca2
Remove dynamic components and add css class prefixes
dvdmlln Dec 4, 2023
51a9f84
Use versions for remind dependencies
dvdmlln Dec 5, 2023
2ce68ac
1.1.0
dvdmlln Dec 5, 2023
359bfb5
ci: add semantic-release, publish-dev and commitlint to workflows
dvdmlln Dec 13, 2023
22bd031
build: disable autoImport for playground to prevent producing runtime…
dvdmlln Dec 13, 2023
b19888a
chore: update nuxt-typo3 and adapt to changes
dvdmlln Dec 13, 2023
1a05968
build: fix repository-url and set version to development
dvdmlln Dec 13, 2023
da465c3
ci: update workflows
dvdmlln Dec 14, 2023
80d84f5
feat!: add support for global search on multilanguage sites
dvdmlln Dec 14, 2023
b87d111
ci: update semantic-release-action
dvdmlln Dec 15, 2023
c3d1335
ci: update semantic-release-action
dvdmlln Dec 15, 2023
458c0bf
chore: update nuxt-typo3 dev dependency
dvdmlln Dec 15, 2023
c18320b
feat: add nuxt-typo3 to peerDependencies
dvdmlln Jan 9, 2024
afd05e0
feat: remove content elements
dvdmlln Jan 9, 2024
7243b62
fix: nuxt-typo3 dependency version
dvdmlln Jan 9, 2024
9e99a94
feat: adapt to changes in rmnd_headless_solr and update eslint config
dvdmlln Feb 13, 2024
162091f
feat: update spellchecking in results model
dvdmlln Feb 19, 2024
ed95ab2
feat: remove global flag in component registration
dvdmlln Mar 13, 2024
f335819
refactor: remove unnecessary options merging
dvdmlln Mar 13, 2024
1bcd5f2
ci: update semantic-release-action
dvdmlln Apr 25, 2024
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
5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": ["@remindgmbh/eslint-config-nuxt"],
"settings": {
"import/ignore": ["vee-validate"]
}
"extends": ["@remindgmbh/eslint-config-nuxt"]
}
20 changes: 20 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on:
pull_request:

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: remindgmbh/[email protected]
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
npm ci
npm run static-analysis
17 changes: 17 additions & 0 deletions .github/workflows/publish_development.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Development

on:
push:
branches:
- "develop"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: remindgmbh/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 20
npm-token: ${{ secrets.NPM_TOKEN }}
type: npm-pre
17 changes: 17 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release

on:
push:
branches:
- "main"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: remindgmbh/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 20
npm-token: ${{ secrets.NPM_TOKEN }}
type: github-npm
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions .stylelintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .stylelintrc

This file was deleted.

14,714 changes: 7,240 additions & 7,474 deletions package-lock.json

Large diffs are not rendered by default.

49 changes: 23 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "@remindgmbh/nuxt-typo3-solr",
"version": "1.0.0",
"version": "0.0.0-development",
"author": "David Mellen <[email protected]>",
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/remindgmbh/nuxt-typo3-solr"
"url": "git+https://github.com/remindgmbh/nuxt-typo3-solr.git"
},
"type": "module",
"exports": {
".": {
"types": "./dist/types.d.ts",
"import": "./dist/module.mjs",
"require": "./dist/module.cjs"
}
Expand All @@ -20,39 +21,35 @@
"dist"
],
"scripts": {
"dev": "npm run stub && nuxi dev playground",
"dev": "npm run dev:prepare && nuxi dev playground",
"dev:build": "nuxi build playground",
"lint": "npm run lint:prettier && npm run lint:script && npm run lint:style",
"lint:prettier": "prettier --check .",
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
"lint": "npm run lint:script",
"lint:script": "eslint --ext \".js,.ts,.vue\" .",
"lint:style": "stylelint \"**/*.{vue,[s]css}\"",
"prepare": "npm run stub && nuxt-module-build",
"prepublishOnly": "npm run typecheck && npm run lint",
"prepack": "npm run dev:prepare && nuxt-module-build build",
"preview": "nuxi preview playground",
"stub": "nuxt-module-build --stub && nuxi prepare playground",
"static-analysis": "npm run dev:prepare && npm run typecheck && npm run lint",
"typecheck": "nuxi typecheck"
},
"dependencies": {
"@nuxt/kit": "^3.6.1",
"defu": "^6.1.2"
"@nuxt/kit": "^3.10.1"
},
"peerDependencies": {
"@remindgmbh/nuxt-typo3": "^4.0.0 || ^4.0.0-develop"
},
"devDependencies": {
"@nuxt/module-builder": "^0.4.0",
"@nuxt/schema": "^3.6.1",
"@remindgmbh/eslint-config-nuxt": "^1.0.4",
"@remindgmbh/nuxt-typo3": "^3.0.0",
"@remindgmbh/stylelint-config": "^1.0.1",
"@types/node": "^20.3.2",
"eslint": "^8.43.0",
"nuxt": "^3.6.1",
"postcss": "^8.4.24",
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.6",
"prettier": "^2.8.8",
"stylelint": "^15.9.0",
"vue-tsc": "^1.8.3"
"@nuxt/module-builder": "^0.5.5",
"@nuxt/schema": "^3.10.1",
"@remindgmbh/eslint-config-nuxt": "^1.3.0",
"@remindgmbh/nuxt-typo3": "^4.0.0-develop",
"@types/node": "^20.11.17",
"eslint": "^8.56.0",
"nuxt": "^3.10.1",
"prettier": "^3.2.5",
"typescript": "^5.3.3",
"vue-tsc": "^1.8.27"
},
"volta": {
"node": "18.16.1"
"node": "20.9.0"
}
}
7 changes: 7 additions & 0 deletions playground/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineAppConfig } from '#imports'

export default defineAppConfig({
typo3: {
languages: ['/de/', '/en/'],
},
})
15 changes: 13 additions & 2 deletions playground/app.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<template>
<T3TopbarLayout>
<T3TopbarLayoutHeader>
<div>
<NuxtLink
v-for="language in availableLanguages"
:key="language.link"
:to="language.link"
>{{ language.navigationTitle }}</NuxtLink
>
</div>
<div>
<template v-if="rootPageNavigation">
<NuxtLink :to="rootPageNavigation.link">{{
Expand All @@ -18,8 +26,8 @@
</div>
<T3SolrSearchForm
v-if="searchForm"
:search-form="searchForm"
default-value=""
:search-form="searchForm"
/>
</T3TopbarLayoutHeader>
<T3TopbarLayoutContent>
Expand All @@ -29,6 +37,9 @@
</template>

<script setup lang="ts">
import { useT3Languages, useT3Navigation, useT3SolrData } from '#imports'

const { rootPageNavigation } = useT3Navigation()
const { searchForm } = useT3SolrApiData()
const { searchForm } = useT3SolrData()
const { availableLanguages } = useT3Languages()
</script>
7 changes: 0 additions & 7 deletions playground/assets/base.scss

This file was deleted.

33 changes: 0 additions & 33 deletions playground/components/T3CeSolrPiSearch.vue

This file was deleted.

29 changes: 11 additions & 18 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
export default defineNuxtConfig({
components: [
{
global: true,
path: '@/components',
},
],
imports: {
autoImport: false,
},
modules: ['@remindgmbh/nuxt-typo3', '@remindgmbh/nuxt-typo3-solr'],
runtimeConfig: {
public: {
typo3: {
baseUrl: '',
api: {
baseUrl: '',
},
baseUrl: '',
cookiebotUid: '',
},
},
},
components: [
{
path: '@/components',
global: true,
},
],
typescript: {
shim: false,
strict: true,
},
css: ['@/assets/base.scss'],
modules: ['@remindgmbh/nuxt-typo3', '@remindgmbh/nuxt-typo3-solr'],
vite: {
server: {
hmr: {
protocol: 'wss',
clientPort: 443,
path: 'hmr/',
},
},
},
})
31 changes: 4 additions & 27 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,33 @@ import {
createResolver,
defineNuxtModule,
} from '@nuxt/kit'
import { defu } from 'defu'
import { name, version } from '../package.json'

export const CONFIG_KEY = 'typo3Solr'

export interface ModuleOptions {
api: {
// Type number of global search, only required if changed in backend
searchType?: number
}
}

export default defineNuxtModule<ModuleOptions>({
export default defineNuxtModule({
meta: {
configKey: CONFIG_KEY,
name,
version,
configKey: CONFIG_KEY,
},
defaults: {
api: {
searchType: 7385,
},
},
setup(options, nuxt) {
setup(_options, nuxt) {
const resolver = createResolver(import.meta.url)

nuxt.options.runtimeConfig.public[CONFIG_KEY] = defu(
nuxt.options.runtimeConfig.public[CONFIG_KEY],
options
)

nuxt.options.alias['#nuxt-typo3-solr'] = resolver.resolve('runtime')

addPlugin({
src: resolver.resolve('runtime/plugins/i18n'),
})
addPlugin({
src: resolver.resolve('runtime/plugins/apiData'),
})
addImportsDir(resolver.resolve('runtime/composables/**/*'))
addImports({
as: 'T3SolrModel',
from: resolver.resolve('runtime/models'),
name: '*',
as: 'T3SolrModel',
})
addComponentsDir({
path: resolver.resolve('runtime/components'),
pathPrefix: false,
global: true,
ignore: ['**/shared.*'],
})
},
})
29 changes: 0 additions & 29 deletions src/runtime/components/content/T3CeSolrPiResults.vue

This file was deleted.

14 changes: 0 additions & 14 deletions src/runtime/components/content/T3CeSolrPiSearch.vue

This file was deleted.

Loading
Loading