mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 08:01:20 +08:00
Enabling support for components with separate templates/css
Signed-off-by: Carlos Vega <clmvega@gmail.com>
This commit is contained in:
parent
edbba98f0e
commit
a8e8ed4600
@ -33,6 +33,7 @@
|
||||
"@storybook/channel-postmessage": "^3.1.6",
|
||||
"@storybook/ui": "^3.2.0-alpha.7",
|
||||
"airbnb-js-shims": "^1.1.1",
|
||||
"angular2-template-loader": "^0.6.2",
|
||||
"autoprefixer": "^7.1.1",
|
||||
"babel-core": "^6.24.1",
|
||||
"babel-loader": "^7.0.0",
|
||||
@ -61,6 +62,7 @@
|
||||
"postcss-loader": "^2.0.5",
|
||||
"prop-types": "^15.5.10",
|
||||
"qs": "^6.4.0",
|
||||
"raw-loader": "^0.5.1",
|
||||
"react": "^15.5.4",
|
||||
"react-dom": "^15.5.4",
|
||||
"react-modal": "^1.7.7",
|
||||
|
@ -43,7 +43,12 @@ export default function() {
|
||||
},
|
||||
{
|
||||
test: /\.ts?$/,
|
||||
loader: require.resolve('ts-loader'),
|
||||
loaders: [require.resolve('ts-loader'), require.resolve('angular2-template-loader')],
|
||||
},
|
||||
{
|
||||
test: /\.(html|css)$/,
|
||||
loader: 'raw-loader',
|
||||
exclude: /\.async\.(html|css)$/,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -6,6 +6,8 @@ import { linkTo } from '@storybook/addon-links';
|
||||
|
||||
import { Welcome, Button } from '@storybook/angular/demo';
|
||||
|
||||
import { AppComponent } from '../app/app.component';
|
||||
|
||||
storiesOf('Welcome')
|
||||
.add('to Storybook', () => ({
|
||||
component: Welcome,
|
||||
@ -42,3 +44,8 @@ storiesOf('Another Button')
|
||||
}
|
||||
}))
|
||||
|
||||
storiesOf('App Component')
|
||||
.add('the whole app', () => ({
|
||||
component: AppComponent,
|
||||
props: {}
|
||||
}))
|
||||
|
Loading…
x
Reference in New Issue
Block a user