Skip to content

Commit

Permalink
Revert "Merge pull request #2672 from Quramy/change-ng-stories-dir"
Browse files Browse the repository at this point in the history
This reverts commit 382ac12
  • Loading branch information
Hypnosphi committed Feb 12, 2018
1 parent 382ac12 commit 68153d8
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 51 deletions.
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('../src/stories/index.ts');
require('../stories/index.ts');
}

configure(loadStories, module);
```

That'll load stories in `../src/stories/index.ts`.
That'll load stories in `../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 `../src/stories/index.ts` file, like this:
Now you can write some stories inside the `../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('../src/stories', true, /.stories.ts$/);
const req = require.context('../stories', true, /.stories.ts$/);
function loadStories() {
req.keys().forEach((filename) => req(filename));
}
Expand Down
13 changes: 0 additions & 13 deletions lib/cli/test/fixtures/angular-cli/src/tsconfig.app.json

This file was deleted.

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


{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"baseUrl": "",
"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"
],
"lib": [
"es2017",
"dom"
"../node_modules/@types"
]
}
},
"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('../src/stories', true, /.stories.ts$/);
const req = require.context('../stories', true, /.stories.ts$/);
function loadStories() {
req.keys().forEach((filename) => req(filename));
}
Expand Down
13 changes: 0 additions & 13 deletions lib/cli/test/snapshots/angular-cli/src/tsconfig.app.json

This file was deleted.

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


{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"baseUrl": "",
"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"
],
"lib": [
"es2017",
"dom"
"../node_modules/@types"
]
}
},
"exclude": [
"node_modules"
]
}

0 comments on commit 68153d8

Please sign in to comment.