From a46a128052490b46fe4ea61c02e519977a4869ce Mon Sep 17 00:00:00 2001 From: Chris Howe Date: Sat, 7 Jan 2017 19:44:07 -0600 Subject: [PATCH 1/2] add cname to files to keep --- packages/angular-cli/commands/github-pages-deploy.run.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/angular-cli/commands/github-pages-deploy.run.ts b/packages/angular-cli/commands/github-pages-deploy.run.ts index 6173d6f2c2dc..cf49d7989c1e 100644 --- a/packages/angular-cli/commands/github-pages-deploy.run.ts +++ b/packages/angular-cli/commands/github-pages-deploy.run.ts @@ -20,7 +20,11 @@ export default function githubPagesDeployRun(options: GithubPagesDeployOptions, const execOptions = { cwd: root }; - + const keepFiles=[ + '.gitignore', + '404.html', + 'CNAME' + ] if (options.environment === '') { if (options.target === 'development') { options.environment = 'dev'; @@ -147,7 +151,7 @@ export default function githubPagesDeployRun(options: GithubPagesDeployOptions, let files = ''; stdout.split(/\n/).forEach(function (f) { // skip .gitignore & 404.html - if ((f != '') && (f != '.gitignore') && (f != '404.html')) { + if ((f != '') && (keepFiles.indexOf(f)==-1) { files = files.concat(`"${f}" `); } }); From cbb93b9e8db84e3e72818e167d85fb2319b91270 Mon Sep 17 00:00:00 2001 From: Chris Howe Date: Sat, 7 Jan 2017 20:11:41 -0600 Subject: [PATCH 2/2] make lint happy --- packages/angular-cli/commands/github-pages-deploy.run.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular-cli/commands/github-pages-deploy.run.ts b/packages/angular-cli/commands/github-pages-deploy.run.ts index cf49d7989c1e..8d37d76f6aee 100644 --- a/packages/angular-cli/commands/github-pages-deploy.run.ts +++ b/packages/angular-cli/commands/github-pages-deploy.run.ts @@ -20,11 +20,11 @@ export default function githubPagesDeployRun(options: GithubPagesDeployOptions, const execOptions = { cwd: root }; - const keepFiles=[ + const keepFiles = [ '.gitignore', '404.html', 'CNAME' - ] + ]; if (options.environment === '') { if (options.target === 'development') { options.environment = 'dev'; @@ -151,7 +151,7 @@ export default function githubPagesDeployRun(options: GithubPagesDeployOptions, let files = ''; stdout.split(/\n/).forEach(function (f) { // skip .gitignore & 404.html - if ((f != '') && (keepFiles.indexOf(f)==-1) { + if ((f != '') && (keepFiles.indexOf(f) == -1)) { files = files.concat(`"${f}" `); } });