Skip to content

Commit

Permalink
Do not run compodoc in shell
Browse files Browse the repository at this point in the history
In addition to removing unnecessary overhead, this allows for spaces in
the workspace root path.
  • Loading branch information
camsteffen committed May 4, 2022
1 parent f41dfa7 commit 082e02f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions app/angular/src/builders/build-storybook/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ describe('Build Storybook Builder', () => {
['compodoc', '-p', './storybook/tsconfig.ts', '-d', '', '-e', 'json'],
{
cwd: '',
env: process.env,
shell: true,
}
);
expect(buildStandaloneMock).toHaveBeenCalledWith({
Expand Down
2 changes: 0 additions & 2 deletions app/angular/src/builders/start-storybook/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ describe('Start Storybook Builder', () => {
['compodoc', '-p', './storybook/tsconfig.ts', '-d', '', '-e', 'json'],
{
cwd: '',
env: process.env,
shell: true,
}
);
expect(buildStandaloneMock).toHaveBeenCalledWith({
Expand Down
8 changes: 0 additions & 8 deletions app/angular/src/builders/utils/run-compodoc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ const builderContextLoggerMock: LoggerApi = {
};

describe('runCompodoc', () => {
const originalEnv = process.env;

beforeEach(() => {
process.env = { FOO: 'bar' };
cpSpawnMock.spawn.mockImplementation(() => ({
stdout: { on: () => {} },
stderr: { on: () => {} },
Expand All @@ -32,7 +29,6 @@ describe('runCompodoc', () => {
});

afterEach(() => {
process.env = originalEnv;
jest.clearAllMocks();
});

Expand All @@ -55,8 +51,6 @@ describe('runCompodoc', () => {
['compodoc', '-p', 'path/to/tsconfig.json', '-d', 'path/to/project'],
{
cwd: 'path/to/project',
env: { FOO: 'bar' },
shell: true,
}
);
});
Expand All @@ -80,8 +74,6 @@ describe('runCompodoc', () => {
['compodoc', '-d', 'path/to/project', '-p', 'path/to/tsconfig.stories.json'],
{
cwd: 'path/to/project',
env: { FOO: 'bar' },
shell: true,
}
);
});
Expand Down
2 changes: 0 additions & 2 deletions app/angular/src/builders/utils/run-compodoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export const runCompodoc = (
context.logger.info(finalCompodocArgs.join(' '));
const child = spawn('npx', finalCompodocArgs, {
cwd: context.workspaceRoot,
env: process.env,
shell: true,
});

child.stdout.on('data', (data) => {
Expand Down

0 comments on commit 082e02f

Please sign in to comment.