Skip to content

Commit

Permalink
moving compileNow inside @storybook/riot
Browse files Browse the repository at this point in the history
  • Loading branch information
libetl committed Aug 30, 2018
1 parent 2b413a5 commit 67595c8
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 49 deletions.
2 changes: 1 addition & 1 deletion app/riot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.0.0-rc.2"
},
"peerDependencies": {
"babel-core": "^7.0.0 || ^8.0.0 || ^8.0.0-beta.6",
"babel-loader": "^7.0.0 || ^8.0.0 || ^8.0.0-beta.6",
"riot": "^3.0.0 || ^4.0.0",
"riot-compiler": "^3.5.1 || ^4.0.0",
"riot-hot-reload": "^1.0.0",
Expand Down
2 changes: 2 additions & 0 deletions app/riot/src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ export {
render,
mount,
tag,
compileNow,
asCompiledCode,
} from './preview';
File renamed without changes.
3 changes: 2 additions & 1 deletion app/riot/src/client/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { start } from '@storybook/core/client';
import './globals';
import riot, { tag2, mount as vendorMount } from 'riot';
import render from './render';
import { compileNow, asCompiledCode } from './compileNow';

const { clientApi, configApi, forceReRender } = start(render);

Expand All @@ -17,4 +18,4 @@ export const {

export const { configure } = configApi;
const mount = vendorMount.bind(riot, '#root');
export { forceReRender, render, tag2 as tag, mount };
export { forceReRender, render, tag2 as tag, mount, compileNow, asCompiledCode };
1 change: 0 additions & 1 deletion examples/riot-kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@storybook/addon-storysource": "4.0.0-alpha.18",
"@storybook/addon-viewport": "4.0.0-alpha.18",
"@storybook/addons": "4.0.0-alpha.18",
"babel-core": "^7.0.0-bridge.0",
"babel-loader": "^8.0.0-beta.6",
"cross-env": "^5.2.0",
"file-loader": "^1.1.11",
Expand Down
34 changes: 0 additions & 34 deletions examples/riot-kitchen-sink/public/index.html

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { tag, mount, storiesOf } from '@storybook/riot';
import { tag, mount, storiesOf, compileNow } from '@storybook/riot';
import { action } from '@storybook/addon-actions';
import ButtonRaw from './Button.txt';
import { compileNow } from './compileNow';

compileNow(tag, ButtonRaw);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { tag, mount, storiesOf } from '@storybook/riot';
import { tag, mount, storiesOf, compileNow } from '@storybook/riot';
import { linkTo } from '@storybook/addon-links';
import ButtonRaw from './Button.txt';
import { compileNow } from './compileNow';

compileNow(tag, ButtonRaw);

Expand Down
6 changes: 2 additions & 4 deletions examples/riot-kitchen-sink/src/stories/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { mount, storiesOf } from '@storybook/riot';
import { linkTo } from '@storybook/addon-links';
import ButtonRaw from './Button.txt';
// eslint-disable-next-line no-unused-vars
import Welcome from './Welcome.tag';
// eslint-disable-next-line no-unused-vars
import App from '../App.tag';
import './Welcome.tag';
import '../App.tag';

storiesOf('Welcome', module).add('Welcome', () =>
mount('welcome', { goToButton: linkTo('Button') })
Expand Down
6 changes: 2 additions & 4 deletions examples/riot-kitchen-sink/src/stories/story-code.stories.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { tag, mount, storiesOf } from '@storybook/riot';
import { tag, mount, storiesOf, asCompiledCode } from '@storybook/riot';
import SimpleTestRaw from './SimpleTest.txt';
// eslint-disable-next-line no-unused-vars
import anothertest from './AnotherTest.tag';
import { asCompiledCode } from './compileNow';
import './AnotherTest.tag';

const simpleTestCompiled = asCompiledCode(SimpleTestRaw);

Expand Down

0 comments on commit 67595c8

Please sign in to comment.