Skip to content

Commit

Permalink
Merge pull request #551 from soramitsu/feature/WDS-129-update-vue
Browse files Browse the repository at this point in the history
WDS-129 update vue
  • Loading branch information
Ctepan authored Jul 12, 2023
2 parents 561d620 + 18dda5d commit 083be3f
Show file tree
Hide file tree
Showing 57 changed files with 4,567 additions and 7,619 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-kiwis-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@soramitsu-ui/ui': minor
---

**feat**: update vue and storybook
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ module.exports = {
'vue/one-component-per-file': 'off',
},
},
// TODO: delete when `as` to `satisfies` replaced
{
files: ['**/packages/ui/stories/**/*.stories.ts'],
rules: {
'@typescript-eslint/consistent-type-assertions': 'off',
},
},
{
files: ['**/*.spec.ts', '**/*.spec.cy.ts'],
rules: {
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile

This file was deleted.

14 changes: 0 additions & 14 deletions Jenkinsfile

This file was deleted.

38 changes: 22 additions & 16 deletions packages/ui/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
const path = require('path')
const { loadConfigFromFile, mergeConfig } = require('vite')

const path = require('path');
const {
loadConfigFromFile,
mergeConfig
} = require('vite');
function resolve(...paths) {
return path.resolve(__dirname, '..', ...paths)
return path.resolve(__dirname, '..', ...paths);
}

module.exports = {
stories: ['../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
core: {
builder: 'storybook-builder-vite',
},
/**
* @param {import('vite').UserConfig} config
*/
async viteFinal(config) {
const { config: mainConfig } = await loadConfigFromFile(
{ mode: 'development', command: 'serve' },
resolve('vite.config.ts'),
)
const {
config: mainConfig
} = await loadConfigFromFile({
mode: 'development',
command: 'serve'
}, resolve('vite.config.ts'));

// vue plugin is already presented in storybook's config, so we need to deduplicate it
mainConfig.plugins = mainConfig.plugins.filter((x) => !/vite:vue/.test(x.name))

return mergeConfig(config, mainConfig)
mainConfig.plugins = mainConfig.plugins.filter(x => !/vite:vue/.test(x.name));
return mergeConfig(config, mainConfig);
},
}
framework: {
name: '@storybook/vue3-vite',
options: {}
},
docs: {
autodocs: true
}
};
6 changes: 4 additions & 2 deletions packages/ui/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { defineConfig } from 'cypress'
import viteConfig from './vite.config'
import { mergeConfig } from 'vite'
import fs from 'fs'

function useAxeCoreReader(on: Cypress.PluginEvents) {
Expand Down Expand Up @@ -29,7 +31,7 @@ export default defineConfig({
bundler: 'vite',

// additional opts to the main `vite.config.ts`
viteConfig: {
viteConfig: mergeConfig(viteConfig, {
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
Expand All @@ -39,7 +41,7 @@ export default defineConfig({
include: ['cypress-plugin-tab'],
exclude: ['platform'],
},
},
}),
},
},
})
Loading

0 comments on commit 083be3f

Please sign in to comment.