Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ng stories dir #2672

Merged
merged 13 commits into from
Jan 11, 2018
6 changes: 3 additions & 3 deletions docs/src/pages/basics/guide-angular/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ To do that, simply create a file at `.storybook/config.js` with the following co
import { configure } from '@storybook/angular';

function loadStories() {
require('../stories/index.ts');
require('../src/stories/index.ts');
}

configure(loadStories, module);
```

That'll load stories in `../stories/index.ts`.
That'll load stories in `../src/stories/index.ts`.

Just like that, you can load stories from wherever you want to.

## Write your stories

Now you can write some stories inside the `../stories/index.ts` file, like this:
Now you can write some stories inside the `../src/stories/index.ts` file, like this:

```js
import { storiesOf } from '@storybook/angular';
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/generators/ANGULAR/template/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { configure } from '@storybook/angular';

// automatically import all files ending in *.stories.ts
const req = require.context('../stories', true, /.stories.ts$/);
const req = require.context('../src/stories', true, /.stories.ts$/);
function loadStories() {
req.keys().forEach((filename) => req(filename));
}
Expand Down
13 changes: 13 additions & 0 deletions lib/cli/test/fixtures/angular-cli/src/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
3 changes: 0 additions & 3 deletions lib/cli/test/fixtures/angular-cli/src/tsconfig.json

This file was deleted.

24 changes: 10 additions & 14 deletions lib/cli/test/fixtures/angular-cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@


{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"exclude": [
"node_modules"
]
}
}
2 changes: 1 addition & 1 deletion lib/cli/test/snapshots/angular-cli/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { configure } from '@storybook/angular';

// automatically import all files ending in *.stories.ts
const req = require.context('../stories', true, /.stories.ts$/);
const req = require.context('../src/stories', true, /.stories.ts$/);
function loadStories() {
req.keys().forEach((filename) => req(filename));
}
Expand Down
13 changes: 13 additions & 0 deletions lib/cli/test/snapshots/angular-cli/src/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
3 changes: 0 additions & 3 deletions lib/cli/test/snapshots/angular-cli/src/tsconfig.json

This file was deleted.

24 changes: 10 additions & 14 deletions lib/cli/test/snapshots/angular-cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@


{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"exclude": [
"node_modules"
]
}
}