Skip to content

Commit 6c16ba3

Browse files
Remove template_nodemodules_placeholder.txt files - they are redundant now that we no longer need to publish node_modules to production
1 parent 495c95d commit 6c16ba3

File tree

8 files changed

+1
-67
lines changed

8 files changed

+1
-67
lines changed

templates/Angular2Spa/template_nodemodules_placeholder.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

templates/AureliaSpa/template_nodemodules_placeholder.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

templates/KnockoutSpa/template_nodemodules_placeholder.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/ReactReduxSpa/template_nodemodules_placeholder.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/ReactSpa/template_nodemodules_placeholder.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/WebApplicationBasic/template_nodemodules_placeholder.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/package-builder/src/build/build.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,7 @@ function buildDotNetNewNuGetPackage() {
120120
const projectGuid = '00000000-0000-0000-0000-000000000000';
121121
const filenameReplacements = [
122122
{ from: /.*\.xproj$/, to: `${sourceProjectName}.xproj` },
123-
{ from: /\btemplate_gitignore$/, to: '.gitignore' },
124-
125-
// Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
126-
// For details, see the comment in ../yeoman/app/index.ts
127-
{ from: /\btemplate_nodemodules_placeholder.txt$/, to: 'node_modules/_placeholder.txt' }
123+
{ from: /\btemplate_gitignore$/, to: '.gitignore' }
128124
];
129125
const contentReplacements = [
130126
{ from: /<ProjectGuid>[0-9a-f\-]{36}<\/ProjectGuid>/g, to: `<ProjectGuid>${projectGuid}</ProjectGuid>` },

templates/package-builder/src/yeoman/app/index.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,6 @@ class MyGenerator extends yeoman.Base {
104104
outputFn = path.join(path.dirname(fn), '.gitignore');
105105
}
106106

107-
// Likewise, output template_nodemodules_placeholder.txt as node_modules/_placeholder.txt
108-
// This is a workaround for https://github.com/aspnet/JavaScriptServices/issues/235. We need the new project
109-
// to have a nonempty node_modules dir as far as *source control* is concerned. So, there's a gitignore
110-
// rule that explicitly causes node_modules/_placeholder.txt to be tracked in source control. But how
111-
// does that file get there in the first place? It's not enough for such a file to exist when the
112-
// generator-aspnetcore-spa NPM package is published, because NPM doesn't allow any directories called
113-
// node_modules to exist in the package. So we have a file with at a different location, and move it
114-
// to node_modules as part of executing the template.
115-
if (path.basename(fn) === 'template_nodemodules_placeholder.txt') {
116-
outputFn = path.join(path.dirname(fn), 'node_modules', '_placeholder.txt');
117-
}
118-
119107
// Exclude test-specific files (unless the user has said they want tests)
120108
const isTestSpecificFile = testSpecificPaths.some(regex => regex.test(outputFn));
121109
if (this._answers.tests || !isTestSpecificFile) {

0 commit comments

Comments
 (0)