New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(@angular/cli): removed the github pages deploy command #4385

Merged
merged 1 commit into from Feb 3, 2017

Conversation

Projects
None yet
10 participants
@Brocco
Contributor

Brocco commented Feb 3, 2017

BREAKING CHANGE: This command is being removed from the core of the CLI
There are several options for deploying CLI-based applications outside the scope of this project.
One of which being https://github.com/angular-buch/angular-cli-ghpages
This functionality is likely to return in the form of an addon/plugin in the future

@Brocco Brocco requested review from hansl and filipesilva Feb 3, 2017

@googlebot googlebot added the cla: yes label Feb 3, 2017

@hansl

One nit, otherwise LGTM.

refactor(@angular/cli): removed the github pages deploy command
BREAKING CHANGE: This command is being removed from the core of the CLI
There are several options for deploying CLI-based applications outside the scope of this project.
One of which being https://github.com/angular-buch/angular-cli-ghpages
This functionality is likely to return in the form of an addon/plugin in the future
@Brocco

This comment has been minimized.

Show comment
Hide comment
@Brocco

Brocco Feb 3, 2017

Contributor

nit addressed

Contributor

Brocco commented Feb 3, 2017

nit addressed

@hansl

hansl approved these changes Feb 3, 2017

@hansl

This comment has been minimized.

Show comment
Hide comment
@hansl

hansl Feb 3, 2017

Collaborator

LGTM.

Collaborator

hansl commented Feb 3, 2017

LGTM.

@hansl hansl merged commit 0f8689b into angular:master Feb 3, 2017

3 checks passed

cla/google All necessary CLAs are signed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@JohannesHoppe

This comment has been minimized.

Show comment
Hide comment
@JohannesHoppe

JohannesHoppe Feb 3, 2017

Contributor

Thanks for mentioning us. I expect some more traffic now! 😄

Contributor

JohannesHoppe commented Feb 3, 2017

Thanks for mentioning us. I expect some more traffic now! 😄

@filipesilva

This comment has been minimized.

Show comment
Hide comment
@filipesilva

filipesilva Feb 3, 2017

Member

@JohannesHoppe I always thought your command was very well designed so you deserve it 👍

Member

filipesilva commented Feb 3, 2017

@JohannesHoppe I always thought your command was very well designed so you deserve it 👍

@petersgiles

This comment has been minimized.

Show comment
Hide comment
@petersgiles

petersgiles Feb 12, 2017

for anyone who needs more explicit instructions

  1. npm install -g angular-cli-ghpages (doesn't work if its not global)
  2. Then in your package.json
    "scripts": { "deploy": "ng build -sm -ec -bh /repo name/ & ngh --silent=false",...
  3. when you want to deploy npm run deploy

petersgiles commented Feb 12, 2017

for anyone who needs more explicit instructions

  1. npm install -g angular-cli-ghpages (doesn't work if its not global)
  2. Then in your package.json
    "scripts": { "deploy": "ng build -sm -ec -bh /repo name/ & ngh --silent=false",...
  3. when you want to deploy npm run deploy
@JohannesHoppe

This comment has been minimized.

Show comment
Hide comment
@JohannesHoppe

JohannesHoppe Feb 12, 2017

Contributor

Don't forget to copy the file dist/index.html to dist/404.html! 😏
(see here)

Contributor

JohannesHoppe commented Feb 12, 2017

Don't forget to copy the file dist/index.html to dist/404.html! 😏
(see here)

@JohannesHoppe

This comment has been minimized.

Show comment
Hide comment
@JohannesHoppe

JohannesHoppe Feb 12, 2017

Contributor

@petersgiles Could you please verify the the ngh command really just works globally? It's supposed to work local (npm i angular-cli-ghpages --save-dev + run script in package.json) AND global (as described).

If this is really the case, please submit an issue.

Contributor

JohannesHoppe commented Feb 12, 2017

@petersgiles Could you please verify the the ngh command really just works globally? It's supposed to work local (npm i angular-cli-ghpages --save-dev + run script in package.json) AND global (as described).

If this is really the case, please submit an issue.

@petersgiles

This comment has been minimized.

Show comment
Hide comment
@petersgiles

petersgiles Feb 13, 2017

@JohannesHoppe yep that's the way it happened for me.

I tried installing npm install --save-dev angular-cli-ghpages and it didn't make the ngh available so I uninstalled it and did npm install -g angular-cli-ghpages and it worked.

macOS Sierra

node: 6.9.5
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/flex-layout: 2.0.0-beta.5
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

petersgiles commented Feb 13, 2017

@JohannesHoppe yep that's the way it happened for me.

I tried installing npm install --save-dev angular-cli-ghpages and it didn't make the ngh available so I uninstalled it and did npm install -g angular-cli-ghpages and it worked.

macOS Sierra

node: 6.9.5
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/flex-layout: 2.0.0-beta.5
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

@JohannesHoppe JohannesHoppe referenced this pull request Feb 13, 2017

Closed

Local installation #5

@JohannesHoppe

This comment has been minimized.

Show comment
Hide comment
@JohannesHoppe
Contributor

JohannesHoppe commented Feb 13, 2017

@tkow

This comment has been minimized.

Show comment
Hide comment
@tkow

tkow Feb 18, 2017

It seems @petersgiles 's problem that ngh command is not incleded in your path because node install packages in node_moudules/.bin when local installing. $(pwd)/node_moudules/.bin path are exported when npm commands run before executed so that node's package commands are available in scripts in package.json but not shell environment with no explicitly path prefix . npm support npm bin command which get path $(pwd)/node_modules/.bin So, you can use ngh commands by $(npm bin)/ngh ... . However, I have another problem catch message says "An error occurred!" in node v.7.4.0.
and details bellow.

(node:6042) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unspecified error (run without silent option for detail)
(node:6042) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Please tell me how it cause to address, if there are someone feel not uncomfortable.I'll try to downgrade node version.Then , I move to angular-buch/angular-cli-ghpages repository for this ploblem is not angular-cli.

tkow commented Feb 18, 2017

It seems @petersgiles 's problem that ngh command is not incleded in your path because node install packages in node_moudules/.bin when local installing. $(pwd)/node_moudules/.bin path are exported when npm commands run before executed so that node's package commands are available in scripts in package.json but not shell environment with no explicitly path prefix . npm support npm bin command which get path $(pwd)/node_modules/.bin So, you can use ngh commands by $(npm bin)/ngh ... . However, I have another problem catch message says "An error occurred!" in node v.7.4.0.
and details bellow.

(node:6042) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unspecified error (run without silent option for detail)
(node:6042) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Please tell me how it cause to address, if there are someone feel not uncomfortable.I'll try to downgrade node version.Then , I move to angular-buch/angular-cli-ghpages repository for this ploblem is not angular-cli.

@gkucmierz

This comment has been minimized.

Show comment
Hide comment
@gkucmierz

gkucmierz Feb 19, 2017

Why it was removed from ng-cli?

It was working good here, but now this external package is broken
angular-schule/angular-cli-ghpages#9

gkucmierz commented Feb 19, 2017

Why it was removed from ng-cli?

It was working good here, but now this external package is broken
angular-schule/angular-cli-ghpages#9

@JohannesHoppe

This comment has been minimized.

Show comment
Hide comment
@JohannesHoppe
Contributor

JohannesHoppe commented Feb 19, 2017

@JohannesHoppe

This comment has been minimized.

Show comment
Hide comment
@JohannesHoppe

JohannesHoppe Feb 19, 2017

Contributor

@gkucmierz You can always deploy your /dist folder "by hand", it you don't like angular-cli-ghpages!
Some instructions are here (replace doc by dist).

Contributor

JohannesHoppe commented Feb 19, 2017

@gkucmierz You can always deploy your /dist folder "by hand", it you don't like angular-cli-ghpages!
Some instructions are here (replace doc by dist).

@Brocco

This comment has been minimized.

Show comment
Hide comment
@Brocco

Brocco Feb 20, 2017

Contributor

@gkucmierz there were many reported issues with this command, so rather than ship the CLI with the issues it was decided to remove it, especially with some viable community alternatives.

Contributor

Brocco commented Feb 20, 2017

@gkucmierz there were many reported issues with this command, so rather than ship the CLI with the issues it was decided to remove it, especially with some viable community alternatives.

@urish

This comment has been minimized.

Show comment
Hide comment
@urish

urish Feb 24, 2017

An alternative is the gh-pages package, I use it for ages and it works fine:

npm install --save-dev gh-pages

then, in your package.json:

"scripts": {
    "deploy": "ng build -prod -sm -ec -bh /reponame/ && gh-pages -d dist"
}

(don't forget to replace /reponame/ with your actual repo name)

urish commented Feb 24, 2017

An alternative is the gh-pages package, I use it for ages and it works fine:

npm install --save-dev gh-pages

then, in your package.json:

"scripts": {
    "deploy": "ng build -prod -sm -ec -bh /reponame/ && gh-pages -d dist"
}

(don't forget to replace /reponame/ with your actual repo name)

@JohannesHoppe

This comment has been minimized.

Show comment
Hide comment
@JohannesHoppe

JohannesHoppe Feb 24, 2017

Contributor

Unfortionally this does not work out of the box on Travis-CI. That was the main reason to start angular-cli-ghpages on top of ghpages.

Contributor

JohannesHoppe commented Feb 24, 2017

Unfortionally this does not work out of the box on Travis-CI. That was the main reason to start angular-cli-ghpages on top of ghpages.

@aakash14goplani

This comment has been minimized.

Show comment
Hide comment
@aakash14goplani

aakash14goplani Apr 8, 2017

@petersgiles
In your explicit instructions "scripts": { "deploy": "ng build -sm -ec -bh /repo name/ & ngh --silent=false", throws error

error: unknown option `--silent'

thing that work for me was ngh --no-silent

aakash14goplani commented Apr 8, 2017

@petersgiles
In your explicit instructions "scripts": { "deploy": "ng build -sm -ec -bh /repo name/ & ngh --silent=false", throws error

error: unknown option `--silent'

thing that work for me was ngh --no-silent

@Brocco

This comment has been minimized.

Show comment
Hide comment
@Brocco

Brocco Apr 10, 2017

Contributor

@aakash14goplani Can you please take your current issue over the https://github.com/angular-buch/angular-cli-ghpages repo?

Thanks! And good luck getting your app deployed.

Contributor

Brocco commented Apr 10, 2017

@aakash14goplani Can you please take your current issue over the https://github.com/angular-buch/angular-cli-ghpages repo?

Thanks! And good luck getting your app deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment