Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/services/project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ export class ProjectService implements IProjectService {
//update dependencies and devDependencies of newly created project with data from template
this.mergeProjectAndTemplateProperties(projectDir, appPath).wait();
this.updateAppResourcesDir(appDirectory).wait();
// Delete app/package.json file, its just causing confusion.
// Also its dependencies and devDependencies are already merged in project's package.json.
this.$fs.deleteFile(path.join(projectDir, constants.APP_FOLDER_NAME, constants.PACKAGE_JSON_FILE_NAME)).wait();
this.$npm.install(projectDir, projectDir, { "ignore-scripts": this.$options.ignoreScripts }).wait();
} catch (err) {
this.$fs.deleteDirectory(projectDir).wait();
Expand Down
9 changes: 3 additions & 6 deletions test/project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,11 @@ class ProjectIntegrationTest {

let expectedFiles = fs.enumerateFilesInDirectorySync(sourceDir);
let actualFiles = fs.enumerateFilesInDirectorySync(appDirectoryPath);
assert.isTrue(actualFiles.length >= (expectedFiles.length - 1), "Files in created project must be at least as files in app dir (without package.json).");
assert.isTrue(actualFiles.length >= expectedFiles.length, "Files in created project must be at least as files in app dir.");
_.each(expectedFiles, file => {
let relativeToProjectDir = helpers.getRelativeToRootPath(sourceDir, file);
if(path.basename(file) === "package.json") {
assert.isFalse(fs.exists(path.join(appDirectoryPath, relativeToProjectDir)).wait());
} else {
assert.isTrue(fs.exists(path.join(appDirectoryPath, relativeToProjectDir)).wait());
}
let filePathInApp = path.join(appDirectoryPath, relativeToProjectDir);
assert.isTrue(fs.exists(filePathInApp).wait(), `File ${filePathInApp} does not exist.`);
});

// assert dependencies and devDependencies are copied from template to real project
Expand Down