Skip to content

Commit b250cb6

Browse files
authored
chore: remove shared dir from new app blueprint (#2623)
Fixes #2572
1 parent c2dd94c commit b250cb6

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

packages/angular-cli/blueprints/ng2/files/__path__/app/shared/index.ts

Whitespace-only changes.

tests/acceptance/generate-class.spec.js

-12
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,4 @@ describe('Acceptance: ng generate class', function () {
4848
expect(existsSync(path.join(testPath, 'my-class.model.ts'))).to.equal(true);
4949
});
5050
});
51-
52-
it(`ng generate class shared${path.sep}my-class`, function () {
53-
return ng(['generate', 'class', 'shared/my-class']).then(() => {
54-
expect(existsSync(path.join(testPath, 'shared', 'my-class.ts'))).to.equal(true);
55-
});
56-
});
57-
58-
it(`ng generate class shared${path.sep}my-class.model`, function () {
59-
return ng(['generate', 'class', 'shared/my-class.model']).then(() => {
60-
expect(existsSync(path.join(testPath, 'shared', 'my-class.model.ts'))).to.equal(true);
61-
});
62-
});
6351
});

tests/acceptance/generate-module.spec.js

-14
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,4 @@ describe('Acceptance: ng generate module', function () {
4343
expect(existsSync(path.join(testPath, 'my-module', 'my-module.module.spec.ts'))).to.equal(true);
4444
});
4545
});
46-
47-
it(`ng generate module shared${path.sep}my-module`, function () {
48-
return ng(['generate', 'module', 'shared/my-module']).then(() => {
49-
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.ts'))).to.equal(true);
50-
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.spec.ts'))).to.equal(false);
51-
});
52-
});
53-
54-
it(`ng generate module shared${path.sep}my-module --spec`, function () {
55-
return ng(['generate', 'module', 'shared/my-module', '--spec']).then(() => {
56-
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.ts'))).to.equal(true);
57-
expect(existsSync(path.join(testPath, 'shared', 'my-module', 'my-module.module.spec.ts'))).to.equal(true);
58-
});
59-
});
6046
});

tests/e2e/tests/build/ts-paths.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {updateTsConfig} from '../../utils/project';
2-
import {writeMultipleFiles, appendToFile} from '../../utils/fs';
2+
import {writeMultipleFiles, appendToFile, createDir} from '../../utils/fs';
33
import {ng} from '../../utils/process';
44
import {stripIndents} from 'common-tags';
55

@@ -16,6 +16,7 @@ export default function() {
1616
]
1717
};
1818
})
19+
.then(() => createDir('src/app/shared'))
1920
.then(() => writeMultipleFiles({
2021
'src/app/shared/meaning.ts': 'export var meaning = 42;',
2122
'src/app/shared/index.ts': `export * from './meaning'`

tests/e2e/utils/fs.ts

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export function moveFile(from: string, to: string) {
5353
});
5454
}
5555

56+
export function createDir(path: string) {
57+
_recursiveMkDir(path);
58+
}
59+
5660

5761
function _recursiveMkDir(path: string) {
5862
if (fs.existsSync(path)) {

0 commit comments

Comments
 (0)