Skip to content

refactor(serve:favicon) change favicon package #461

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

Merged
merged 1 commit into from
Aug 22, 2014
Merged

refactor(serve:favicon) change favicon package #461

merged 1 commit into from
Aug 22, 2014

Conversation

yordis
Copy link
Contributor

@yordis yordis commented Aug 19, 2014

change static-favicon to serve-favicon because the npm install process
recommend to change it.

npm WARN deprecated [email protected]: use serve-favicon module

@kingcody
Copy link
Member

@yordis in test/fixtures/package.json you should change:
"static-favicon": "~1.0.1",
to:
"serve-favicon": "^2.0.1",

That should fix your build. Thanks for the PR!

@yordis
Copy link
Contributor Author

yordis commented Aug 20, 2014

Done, What should I have to run because I didn't see the test task or something like that

@remicastaing
Copy link
Contributor

@yordis, you can run npm test or see the result through Travis CI.

@kingcody
Copy link
Member

Just run: cd test/fixtures && npm install && bower install && cd ../.. before you run npm test

@kingcody
Copy link
Member

That would be from the root folder of 'generator-angular-fullstack'

@yordis
Copy link
Contributor Author

yordis commented Aug 21, 2014

@remicastaing I saw the result on Travis CI after I saw the comment of @kingcody :D but what I am looking for is something like: don't create two commits because I didn't run the tests, most of the time I look for a grunt task but doesn't have a grunt task for testing and then I didn't know

@yordis
Copy link
Contributor Author

yordis commented Aug 21, 2014

@kingcody Oh God I didn't check the package.json config, thank you very much.
I think we can automate the testing. @kingcody I add the _.bowerrc_ because when I ran the bower install it put the dependencies on _app/bower_components_ so my testing fail. For prevent this I did that.

@DaftMonk
Copy link
Member

I've made some improvements to the tests work flow.

  1. grunt test, or npm test, now install the required fixture dependencies before running tests.
  2. bower.json and package.json fixtures are now created by stripping out the EJS from the actual templates. So you won't need to update fixtures anymore when you add a new dependency.
  3. Made tests significantly faster by symlinking the installed dependencies into the tests, rather than copying the files.

@kingcody
Copy link
Member

Much improved! Thanks @DaftMonk. Hopefully this will help with the timeouts I get on my dev computer :)

@DaftMonk
Copy link
Member

@kingcody It should fix those timeouts. It's a pretty huge speed difference: from 3-4 minutes to run tests, down to 24 seconds.

@kingcody
Copy link
Member

@yordis just for future reference, after you've made changes that need to be included in the same PR and, by keeping with the one commit per PR, the previous commit. You can add the changed files like you normally do (git add . or w/e you do), then run git commit --amend. That'll add the changes to your previous commit in your current branch. In most cases when not using the -m flag, it should open your $EDITOR with your previous commit message filled in for you. You can then change the message if you like, save the file and the commit will be amended.

Then to push it to your PR branch, you would run git push -f. The -f is for force, which would not be good to use on a main branch or any branches that others may be using since it would overwrite the history and potentially cause problems for them. However for a branch made simply for submitting a PR, it would be acceptable (in most places?) to use -f to force the rewrite of its history. Hope I make sense :)

@yordis
Copy link
Contributor Author

yordis commented Aug 21, 2014

@DaftMonk I going to remove the commit about the automation of the testing

@yordis
Copy link
Contributor Author

yordis commented Aug 21, 2014

@kingcody I get the idea, I am pretty new cooperating in Github, next time just one commit per PR. I will try to fix it.

change static-favicon to serve-favicon because the npm install process
recommend to change it.

npm WARN deprecated [email protected]: use serve-favicon module

Signed-off-by: Yordis Prieto <[email protected]>
@remicastaing
Copy link
Contributor

Thanks @kingcody. I should also remember your comment.

@kingcody
Copy link
Member

@yordis no problem. I recently discovered some of that for myself ;)

@yordis
Copy link
Contributor Author

yordis commented Aug 21, 2014

@DaftMonk are you going to merge this one?

@kingcody
Copy link
Member

@yordis, I could be wrong; but I don't think the .bowerrc is needed. Have you tried running the test again with the recent changes DaftMonk made?

You may need to git rebase your branch off a fresh master.

@yordis
Copy link
Contributor Author

yordis commented Aug 21, 2014

If you do not specify the .bowerrc could be fail because bower can install the dependencies in other folder and in this line it's check hard coding for features/bower_components. When I saw your comment I did bower install and bower created a directory inside features/app/bower_components and then I created the file because my test failed. My opinion is that file should be there and we prevent that problem.

@DaftMonk what do you think about this?

@kingcody
Copy link
Member

@yordis do you have a .bowerrc file in your 'home' folder? I'm only asking because I can't seem to reproduce your error. Perhaps I'm doing something wrong, but a bowerrc file in your home folder would act as a global if there was not one in your present working directory. Otherwise bower defaultly installs dependencies to ./bower_components

@yordis
Copy link
Contributor Author

yordis commented Aug 21, 2014

Bower by default _should_ install inside ./bower_componets

Steps to replicate

  1. cd test/features
  2. npm install
  3. bower install <--- this guy

You are not doing wrong the problem is bower. I didn't have any .bowerrc inside and then bower did what I said it put it in the wrong place. I understand bower _should_ install inside bower_components but it didn't and then I created the file for prevent that.

@DaftMonk
Copy link
Member

My guess is that you have an older version of bower and its trying to install into the components folder. In any case, if its helping prevent the test fails I don't have a problem with including it.

DaftMonk added a commit that referenced this pull request Aug 22, 2014
refactor(favicon) change favicon package
@DaftMonk DaftMonk merged commit 35fdac3 into angular-fullstack:master Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants