Skip to content

Commit

Permalink
Remove ESM from example, for some reason it won't work there.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaNarie committed Apr 26, 2023
1 parent 4c8a467 commit 9f2c0e4
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
packages/*/dist
packages/*/dist
2 changes: 1 addition & 1 deletion packages/example/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18
24 changes: 0 additions & 24 deletions packages/example/.storybook/main.js

This file was deleted.

13 changes: 13 additions & 0 deletions packages/example/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { StorybookConfig } from '@muban/storybook-framework-webpack';

export default {
framework: '@muban/storybook-framework-webpack',
stories: [
{
directory: '../src/',
files: '**/*.stories.@(js|jsx|ts|tsx)',
titlePrefix: '',
},
],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
} satisfies StorybookConfig;
1 change: 0 additions & 1 deletion packages/example/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

2 changes: 1 addition & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "index.js",
"author": "Arjan van Wijk",
"license": "MIT",
"type": "module",
"type": "commonjs",
"scripts": {
"storybook": "sb dev -p 6006",
"lint": "npm-run-all lint:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/example/src/Decorators.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { bind, computed, defineComponent, inject, provide } from '@muban/muban';
import type { Meta } from '@muban/storybook';
import { createDecoratorComponent, type StoryObj } from '@muban/storybook';
import { html } from '@muban/template';
import { StoryComponent, storyTemplate } from './resources/Component.js';
import { argTypes } from './resources/StoryComponent.argTypes.js';
import { StoryComponent, storyTemplate } from './resources/Component';
import { argTypes } from './resources/StoryComponent.argTypes';

export default {
title: 'Decorators',
Expand Down
4 changes: 2 additions & 2 deletions packages/example/src/Legacy.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StoryFn, Meta } from '@muban/storybook';
import { StoryComponent, storyTemplate } from './resources/Component.js';
import { argTypes } from './resources/StoryComponent.argTypes.js';
import { StoryComponent, storyTemplate } from './resources/Component';
import { argTypes } from './resources/StoryComponent.argTypes';

type Story = StoryFn<typeof storyTemplate>;

Expand Down
4 changes: 2 additions & 2 deletions packages/example/src/Server.stories.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Meta } from '@muban/storybook';
import { createDecoratorComponent, type StoryObj } from '@muban/storybook';
import { html } from '@muban/template';
import { StoryComponent, storyTemplate } from './resources/Component.js';
import { argTypes } from './resources/StoryComponent.argTypes.js';
import { StoryComponent, storyTemplate } from './resources/Component';
import { argTypes } from './resources/StoryComponent.argTypes';

export default {
title: 'Server',
Expand Down
4 changes: 2 additions & 2 deletions packages/example/src/Test.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StoryObj, Meta } from '@muban/storybook';
import { StoryComponent, storyTemplate } from './resources/Component.js';
import { argTypes } from './resources/StoryComponent.argTypes.js';
import { StoryComponent, storyTemplate } from './resources/Component';
import { argTypes } from './resources/StoryComponent.argTypes';

export default {
title: 'CSF v3',
Expand Down
2 changes: 1 addition & 1 deletion packages/example/src/argTypes.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@muban/storybook';
import { createDecoratorComponent } from '@muban/storybook';
import { html } from '@muban/template';
import { StoryComponent, storyTemplate } from './resources/Component.js';
import { StoryComponent, storyTemplate } from './resources/Component';

export default {
title: 'ArgTypes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
<button type="button" data-ref="btnEnable" class="btn btn-success">Enable</button>
<button type="button" data-ref="btnDisable" class="btn btn-danger">Disable</button>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions packages/example/src/story-types/StoryTypesMeta.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@muban/storybook';
import { MyComponent } from './MyComponent.js';
import { myComponentTemplate } from './MyComponent.template.js';
import { MyComponent } from './MyComponent';
import { myComponentTemplate } from './MyComponent.template';

const meta = {
title: 'StoryTypes/Meta',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@muban/storybook';
import { MyComponent } from './MyComponent.js';
import { myComponentTemplate } from './MyComponent.template.js';
import { MyComponent } from './MyComponent';
import { myComponentTemplate } from './MyComponent.template';

const meta = {
title: 'StoryTypes/NoComponent',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@muban/storybook';
import { MyComponent } from './MyComponent.js';
import { myComponentTemplate } from './MyComponent.template.js';
import { MyComponent } from './MyComponent';
import { myComponentTemplate } from './MyComponent.template';

export default {
title: 'StoryTypes/Template',
Expand Down
2 changes: 1 addition & 1 deletion packages/framework-webpack/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist/**/*
preset.js
preset.js
2 changes: 1 addition & 1 deletion packages/framework-webpack/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18
4 changes: 3 additions & 1 deletion packages/framework-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
"type": "module",
"exports": {
".": {
"node": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./preset": {
"import": "./dist/preset.mjs",
"node": "./dist/preset.js",
"import": "./dist/preset.js",
"types": "./dist/preset.d.ts"
},
"./package.json": "./package.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-webpack/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18
2 changes: 2 additions & 0 deletions packages/preset-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
"type": "module",
"exports": {
".": {
"node": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./preset": {
"node": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18
4 changes: 4 additions & 0 deletions packages/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
"type": "module",
"exports": {
".": {
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./preview": {
"node": "./dist/config.js",
"require": "./dist/config.js",
"import": "./dist/config.js",
"types": "./dist/config.d.ts"
},
Expand Down

0 comments on commit 9f2c0e4

Please sign in to comment.