Skip to content

Commit

Permalink
Revert "chore: upgrade vue 3 (#118)" (#119)
Browse files Browse the repository at this point in the history
This reverts commit 65f176f.
  • Loading branch information
fdendorfer authored Oct 28, 2024
1 parent 65f176f commit f3bb301
Show file tree
Hide file tree
Showing 456 changed files with 73,201 additions and 33,657 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
node_modules
node_modules/.bin/acorn
dist/*
app/storybook-static/*
app/.nuxt-storybook/*

.idea/
.DS_Store
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.17.0
v16.16.0
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Delivering HTML structures, CSS assets and design elements to build frontends fo
$ npm install
```

Adapt your Node version to `^20.17.0`, for example using `nvm`:
Adapt your Node version to `^16.13.2`, for example using `nvm`:

```bash
# Choose the right Node version
$ nvm use 20.17
$ nvm use 16
```

## Run Storybook
Expand Down Expand Up @@ -66,7 +66,7 @@ $ npm run build-css

- Edit the `package.json` file and increment the `version` of the package, for example `1.0.0`
- Create and publish a new tag with the same version number as the one in the `package.json` file, with a `v` prefix, for example `v1.0.0`
- Create a new release on Github, document your changes, and name it for example `Release 1.0.0`
- Create a new release on Github, document your changes, and name it for example ` Release 1.0.0`

## CSS files

Expand Down
4 changes: 0 additions & 4 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Storybook build
storybook-static/

# Runtime data
pids
*.pid
Expand Down Expand Up @@ -70,7 +67,6 @@ typings/

# nuxt.js build output
.nuxt
.output

# Nuxt generate
dist
Expand Down
8 changes: 8 additions & 0 deletions app/.storybook/BundTheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { create } from '@storybook/theming';
import logo from '../assets/logos/BundLogo.svg';

export default create({
base: 'light',
brandTitle: 'My custom storybook',
brandImage: logo,
});
8 changes: 0 additions & 8 deletions app/.storybook/BundTheme.ts

This file was deleted.

21 changes: 21 additions & 0 deletions app/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { nuxifyStorybook } = require('../.nuxt-storybook/storybook/main.js')
const path = require('path')

module.exports = nuxifyStorybook({
stories: [
'../components/stories/**/*.stories.mdx',
'../components/stories/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [],

webpackFinal: async (config) => {
// tell webpack to accept vtt files
config.module.rules.push({
test: /\.vtt$/,
use: ['url-loader'],
});

// Return the altered config
return config;
},
})
32 changes: 0 additions & 32 deletions app/.storybook/main.ts

This file was deleted.

6 changes: 6 additions & 0 deletions app/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import bundTheme from './BundTheme';

addons.setConfig({
theme: bundTheme,
});
6 changes: 0 additions & 6 deletions app/.storybook/manager.ts

This file was deleted.

2 changes: 0 additions & 2 deletions app/.storybook/preview-head.html

This file was deleted.

55 changes: 55 additions & 0 deletions app/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import './docs-fullscreen.css'

import { parameters as nuxtParameters } from '~~/.nuxt-storybook/storybook/preview.js'

export const parameters = {
...nuxtParameters,
layout: 'fullscreen',
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
html: {
prettier: {
tabWidth: 2,
useTabs: false,
// htmlWhitespaceSensitivity: 'strict',
},
},
viewMode: 'docs',
options: {
storySort: {
order: [
'Introduction',
'Doc for developers',
['HTML Structure', 'Add CSS classes'],
'Foundations',
[
'Overview',
'Fonts',
'Backgrounds',
'Colors',
'Icons',
['List', 'Implementation'],
],
'Layouts',
['General', 'Sections', 'Containers', 'Grids', 'Spacings', 'Ratios'],
'Components',
['Logo', 'Button'],
'Sections',
[
'Header',
['TopBar', 'TopHeader', 'DesktopMenu'],
'Hero',
'Content',
'Footer',
],
'Pages',
['Homepage'],
],
},
},
}
63 changes: 0 additions & 63 deletions app/.storybook/preview.ts

This file was deleted.

19 changes: 19 additions & 0 deletions app/.storybook/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

const store = new Vuex.Store({

modules: {
layout: {
namespaced: true,
state: require("../store/layout.js").state,
getters: require("../store/layout.js").getters,
actions: require("../store/layout.js").actions,
mutations: require("../store/layout.js").mutations
}
}
});

export default store
29 changes: 9 additions & 20 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,31 @@

```bash
# install dependencies
$ pnpm install
$ npm install
```

## Storybook
# Storybook

```bash
# serve Storybook with hot reload
$ pnpm run storybook
$ npm run storybook

# build Storybook
$ pnpm run build-storybook
$ npm run build-storybook
```

## Nuxt application
# Nuxt application

```bash
# serve with hot reload
$ pnpm run dev
$ npm run dev

# build for production and launch server
$ pnpm run build
$ pnpm run start
$ npm run build
$ npm run start

# generate static project
$ pnpm run generate
$ npm run generate
```

For detailed explanation on how Nuxt work, check out [Nuxt.js docs](https://nuxtjs.org).

## Pre-merge on main

Before merging a branch into the main branch for a new release, please follow these steps:

1. Run `pnpm run check` to let prettier check the new code for formatting issues
2. If any issues arise, fix them with `pnpm run check:format:write`
3. Run `pnpm run check:lint` to let eslint check the new code for open bugs or ts problems
4. If any issues arise, fix them automatically with `pnpm run check:lint:fix` or manually (You might also update the eslint config file and add new rules (set to 'off') if you come across something that eslint shouldn't catch).

In general, the rules currently defined in the eslint config file are carefully selected and should be kept in there.
38 changes: 23 additions & 15 deletions app/components/ch/components/Accordion.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
<template>
<ul
:id="`accordion-${id}`"
class="accordion"
class="accordion "
:class="spaced ? 'accordion--spaced' : ''"
>
<slot />
</ul>
</ul>
</template>

<script setup lang="ts">
<script>
import Accordion from '../../../scripts/Accordion.js'
import { onMounted } from 'vue'
const props = defineProps({
id: {
type: String,
required: true,
export default {
name: 'Accordion',
components: {
Accordion
},
spaced: {
type: Boolean,
default: () => false,
props: {
id: {
type: String,
required: true
},
spaced: {
type: Boolean,
default: false
}
},
})
onMounted(() => {
Accordion.init(`#accordion-${props.id} button`)
})
mounted () {
Accordion.init (
`#accordion-${this.id} button`
)
}
}
</script>

Loading

0 comments on commit f3bb301

Please sign in to comment.