Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit a352064

Browse files
Dimitar Tachevrosen-vladimirov
Dimitar Tachev
authored andcommitted
fix: do not show warning for format differences in templates (#947)
1 parent bc2f6f1 commit a352064

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: projectFilesManager.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { isTypeScript, isAngular, isVue } = require("./projectHelpers");
55

66
function addProjectFiles(projectDir) {
77
const projectTemplates = getProjectTemplates(projectDir);
8-
Object.keys(projectTemplates).forEach(function(templateName) {
8+
Object.keys(projectTemplates).forEach(function (templateName) {
99
const templateDestination = projectTemplates[templateName];
1010
templateName = path.resolve(templateName);
1111
copyTemplate(templateName, templateDestination);
@@ -14,7 +14,7 @@ function addProjectFiles(projectDir) {
1414

1515
function removeProjectFiles(projectDir) {
1616
const projectTemplates = getProjectTemplates(projectDir);
17-
Object.keys(projectTemplates).forEach(function(templateName) {
17+
Object.keys(projectTemplates).forEach(function (templateName) {
1818
const templateDestination = projectTemplates[templateName];
1919
deleteFile(templateDestination);
2020
});
@@ -32,7 +32,7 @@ function compareProjectFiles(projectDir) {
3232
if (fs.existsSync(currentTemplatePath)) {
3333
const currentTemplate = fs.readFileSync(currentTemplatePath).toString();
3434
const newTemplate = fs.readFileSync(newTemplatePath).toString();
35-
if (newTemplate !== currentTemplate) {
35+
if (newTemplate.replace(/\s/g, '') !== currentTemplate.replace(/\s/g, '')) {
3636
const message = `The current project contains a ${path.basename(currentTemplatePath)} file located at ${currentTemplatePath} that differs from the one in the new version of the nativescript-dev-webpack plugin located at ${newTemplatePath}. Some of the plugin features may not work as expected until you manually update the ${path.basename(currentTemplatePath)} file or automatically update it using "./node_modules/.bin/update-ns-webpack --configs" command.`;
3737
console.info(`\x1B[33;1m${message}\x1B[0m`);
3838
}

0 commit comments

Comments
 (0)