Skip to content

Commit

Permalink
Vite migration (#207)
Browse files Browse the repository at this point in the history
* Start

* Temporary.

* Get rid of a few any.

* Fix tests

* Fix build.

* Install playwright.

* Install playwright in pr script.

* Fix warning
  • Loading branch information
SebastianStehle authored Oct 20, 2023
1 parent 3f6ade0 commit 17560ae
Show file tree
Hide file tree
Showing 125 changed files with 23,791 additions and 53,187 deletions.
79 changes: 0 additions & 79 deletions .drone.yml

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
"@typescript-eslint",
],
"rules": {
"@typescript-eslint/space-before-blocks": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/indent": [
"error",
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ jobs:
- name: Install Dependencies
run: npm i

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Tests
run: npm run test:coverage
run: npm run test:ci

- name: Run Build
run: npm run build
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ jobs:
- name: Install Dependencies
run: npm i

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Tests
run: npm run test:coverage
run: npm run test:ci

- name: Run Build
run: npm run build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
_test-output

# production
/build
/dist

# misc
.DS_Store
Expand Down
54 changes: 7 additions & 47 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,20 @@
const path = require('path');

const appRoot = path.resolve(__dirname, '..');

function root() {
const newArgs = Array.prototype.slice.call(arguments, 0);

return path.join.apply(path, [appRoot].concat(newArgs));
}

const plugins = {
// https://github.com/dividab/tsconfig-paths-webpack-plugin
TsconfigPathsPlugin: require('tsconfig-paths-webpack-plugin')
};

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

addons: [
'@storybook/addon-links',
'@storybook/addon-essentials'
],
core: {
builder: 'webpack5'
},
framework: '@storybook/react',
webpackFinal: async (config) => {
// https://github.com/storybookjs/storybook/issues/12019
config.module.rules[0].use[0].options.plugins = [
['@babel/proposal-class-properties', { 'loose': true }]
];

config.module.rules.push({
test: /\.scss$/,
use: [{
loader: 'style-loader',
}, {
loader: 'css-loader',
}, {
loader: 'sass-loader',
options: {
sourceMap: true,
},
}],
});

config.resolve.modules.push(root('src'));
config.resolve.modules.push(root('src', 'style'));

config.resolve.plugins = [
new plugins.TsconfigPathsPlugin({
configFile: root('tsconfig.json')
}),
];
framework: {
name: '@storybook/react-vite',
options: {}
},

return config;
docs: {
autodocs: true
}
}
2 changes: 1 addition & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN npm install --loglevel=error
COPY . .

# Test Frontend
RUN npm run test:coverage
RUN npm run test:ci

# Build Frontend
RUN npm run build
Expand Down
20 changes: 0 additions & 20 deletions config/karma-test-shim.js

This file was deleted.

57 changes: 0 additions & 57 deletions config/karma.conf.js

This file was deleted.

90 changes: 0 additions & 90 deletions config/karma.coverage.conf.js

This file was deleted.

Loading

0 comments on commit 17560ae

Please sign in to comment.