Skip to content

Commit

Permalink
fix(storybook): windows path mapping (#2995)
Browse files Browse the repository at this point in the history
uses join from angular-devkit/core to accomodate for Windows paths
  • Loading branch information
juristr committed May 12, 2020
1 parent 6ee67d0 commit e43229a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
Tree,
url,
} from '@angular-devkit/schematics';
import { join } from '@angular-devkit/core';
import { findNodes, getProjectConfig } from '@nrwl/workspace';
import { applyWithSkipExisting } from '@nrwl/workspace/src/utils/ast-utils';
import { join } from 'path';
import ts = require('typescript');
import {
getComponentName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import {
SchematicsException,
applyTemplates,
} from '@angular-devkit/schematics';
import { normalize } from '@angular-devkit/core';
import { normalize, join } from '@angular-devkit/core';
import { getProjectConfig, formatFiles } from '@nrwl/workspace';
import { join } from 'path';
import {
applyWithSkipExisting,
findNodes,
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/schematics/stories/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
SchematicsException,
noop,
} from '@angular-devkit/schematics';
import { join, Path } from '@angular-devkit/core';
import { getProjectConfig } from '@nrwl/workspace';
import { join } from 'path';
import { CreateComponentStoriesFileSchema } from '../component-story/component-story';
import { CreateComponentSpecFileSchema } from '../component-cypress-spec/component-cypress-spec';
import { getComponentName } from '../../utils/ast-utils';
Expand Down Expand Up @@ -62,7 +62,7 @@ export function createAllStories(
return chain(
componentPaths.map((componentPath) => {
const relativeCmpDir = componentPath.replace(
join('/', projectSrcRoot, '/'),
join('/' as Path, projectSrcRoot, '/'),
''
);

Expand Down

0 comments on commit e43229a

Please sign in to comment.