Skip to content

Commit

Permalink
feat(angular): add deprecation warning when project use angular.json …
Browse files Browse the repository at this point in the history
…with legacy way
  • Loading branch information
ThibaudAV committed Jan 6, 2022
1 parent dbc3208 commit d74910a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/angular/src/server/framework-preset-angular-cli.ts
Expand Up @@ -3,6 +3,7 @@ import { logger } from '@storybook/node-logger';
import { targetFromTargetString, BuilderContext, Target } from '@angular-devkit/architect';
import { sync as findUpSync } from 'find-up';
import semver from '@storybook/semver';
import dedent from 'ts-dedent';

import { logging, JsonObject } from '@angular-devkit/core';
import { moduleIsAvailable } from './utils/module-is-available';
Expand Down Expand Up @@ -142,8 +143,12 @@ async function getLegacyDefaultBuildOptions(options: PresetOptions) {
return {};
}

// TODO ~ legacy way to get default options
// TODO ~ Add deprecation warning and ex for builder use ? `);
logger.warn(dedent`Your Storybook startup uses a solution that will not be supported in version 7.0.
You must use angular builder to have an explicit configuration on the project used in angular.json
Read more at:
- https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sb-angular-builder)
- https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular13)
`);
const dirToSearch = process.cwd();

// Read angular workspace
Expand Down

0 comments on commit d74910a

Please sign in to comment.