Skip to content

Commit

Permalink
Merge branch 'admin-refactor' of github.com:RocketChat/Rocket.Chat in…
Browse files Browse the repository at this point in the history
…to improve/rewrite-admin-invites
  • Loading branch information
tassoevan committed Apr 22, 2020
2 parents 50d32d8 + 49ec1b6 commit 42e99ed
Show file tree
Hide file tree
Showing 26 changed files with 2,495 additions and 2,153 deletions.
19 changes: 0 additions & 19 deletions .storybook/.babelrc

This file was deleted.

4 changes: 0 additions & 4 deletions .storybook/addons.js

This file was deleted.

19 changes: 19 additions & 0 deletions .storybook/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
shippedProposals: true,
useBuiltIns: 'usage',
corejs: '3',
modules: 'commonjs',
},
],
'@babel/preset-react',
'@babel/preset-flow',
],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-chaining',
],
};
20 changes: 0 additions & 20 deletions .storybook/config.js

This file was deleted.

11 changes: 11 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
stories: [
'../app/**/*.stories.js',
'../client/**/*.stories.js',
'../ee/app/**/*.stories.js',
],
addons: [
'@storybook/addon-actions',
'@storybook/addon-knobs',
],
};
5 changes: 4 additions & 1 deletion .storybook/mocks/meteor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ export const Meteor = {
_localStorage: window.localStorage,
absoluteUrl: () => {},
userId: () => {},
Streamer: () => {},
Streamer: () => ({
on: () => {},
removeListener: () => {},
}),
startup: () => {},
methods: () => {},
call: () => {},
Expand Down
7 changes: 7 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { withKnobs } from '@storybook/addon-knobs';
import { addDecorator } from '@storybook/react';

import { rocketChatDecorator } from './mocks/decorators';

addDecorator(rocketChatDecorator);
addDecorator(withKnobs);
38 changes: 29 additions & 9 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,35 @@ module.exports = async ({ config }) => {
use: '@settlin/spacebars-loader',
});

config.plugins.push(new webpack.NormalModuleReplacementPlugin(
/^meteor/,
require.resolve('./mocks/meteor.js'),
));

config.plugins.push(new webpack.NormalModuleReplacementPlugin(
/\.\/server\/index.js/,
require.resolve('./mocks/empty.js'),
));
config.module.rules.push({
test: /\.(ts|tsx)$/,
use: [
{
loader: 'ts-loader',
options: {
compilerOptions: {
noEmit: false,
},
},
},
{
loader: 'react-docgen-typescript-loader',
},
],
});

config.resolve.extensions.push('.ts', '.tsx');

config.plugins.push(
new webpack.NormalModuleReplacementPlugin(
/^meteor/,
require.resolve('./mocks/meteor.js'),
),
new webpack.NormalModuleReplacementPlugin(
/\/server(\/index.js)$/,
require.resolve('./mocks/empty.js'),
),
);

config.mode = 'development';
config.optimization.usedExports = true;
Expand Down
34 changes: 0 additions & 34 deletions app/logger/client/ansispan.js

This file was deleted.

Loading

0 comments on commit 42e99ed

Please sign in to comment.