How do I make yeoman reload bla.html instead of index.html - yeoman

When a change is made to any html file in the root, yeoman fires the reload task, but, yeoman does it only to http://localhost:3501/index.html.
How do I let yeoman know that I wanna reload http://localhost:3501/bla.html ?
Maybe some Gruntgile.js configurations?

Yeoman 1.0 does this with no problems, it's pretty easy to install. Here is a quick guide:
Make sure that you have Node installed with NPM
Uninstall the old version of Grunt
Install the requirements with NPM like this: npm install -g yo grunt-cli bower
You now have everything you need, you can run yo to confirm that you have the correct version installed.
There is a lot less dependencies, they are moved to a per-project-basic.
You can read a lot more on their website here http://yeoman.io
Make sure that you read the migration guide.
Note: Their wiki says that it does not work on Windows, this is not the case anymore, I run Windows 7 and it works like charm.

Related

How does Nix able to install individual NPM packages as standalone software?

CAVEAT: If you would like to use Serverless Framework with Nix/NixOS, this is not the way to do it: the package you end up with is outdated, and (as stated below) it probably won't work anyway. See thread on NixOS Discourse.
Wanted to try out Serverless via nix-shell so I looked it up, ran the command
nix-shell -v -p nodePackages.serverless
a̶n̶d̶ i̶t̶ w̶o̶r̶k̶s̶ f̶l̶a̶w̶l̶e̶s̶s̶l̶y̶.1
What makes this possible without requiring me to install Node manually to be able to run npm install -g serverless? (E.g., Is the node_modules folder somewhere in the Nix store? What happens if I nix-shell another Node package - will they share that same directory?)
[1]: It does not... See this Reddit thread; probable setuid issue. Still interested in the behind the scene stuff though.
This question is more like a todo because I really would like to figure it out myself but don't have the time for it right now...
This is possible because it was packaged with node2nix. This tool generates expressions that fetch the various packages and put them in a node_modules directory.
Indeed it's not perfect and some package need some extra fixing up to make them work well. The node2nix tooling could 'learn' from the cabal2nix integration in Nixpkgs to improve the quality of packaging and the Nixpkgs developer experience.

How to install Zendframework-2 in wampserver?

i already install git, and composer.exe now i try to install zendframework-2 but it not work please provide rightway for installing zend framework-2.
please provide me right tutorial or video for install proper.
It is possible to install ZF2 as a library but that's not what I recommend. I think it's best to install ZF2 in every project from composer.phar. This makes it easier to master the updates of applications in production.
For ZF2, install the skeleton application that allows you to set up your project. This installation sets up ZF2 complete.
Make sure your Windows path contains php.exe and composer.bat
paths ;
Run in console : php "path\to\composer.phar" create-project -sdev --repository-url="https://packages.zendframework.com" zendframework/skeleton-application "directory/of/your/project"
For ZF3, follow : https://framework.zend.com/downloads

What is the best practice for maintenance module dependencies on yeoman generator

I create a yeoman generator to help myself with front end development.
The problem is, our development environment, framework, plugins are changing so fast...
I have to update dependencies in the package.json in yeoman generator's template directory.
But, usually the package.json in yeoman generator is renamed like _package.json, because of the generator, so I cannot do just npm update.
So, I'll ask you what is the best way to update node modules in _package.json.
Thanks.
For what it's worth, npm update just update dependencies to the latest version matching your package.json dependencies semver ranger. It won't update the file itself.
To know which dependencies are outdated, you can either use npm outdated or a tool like david.
What I usually do with my project is to run one of these tools on a newly generated project. This might not seems ideal, but it's actually the best way to go because:
You ensure your generator is still working (things can break overtime if we're not careful)
You'll be able to test the new versions against your project and see where you need to fix your code so it work with latest release and breaking changes.
Also, npm using semver to set versions, this mean you only need to bump dependencies when a new major version is released. This tends to not happen all that often.
#Simon
Thank you for mention that I misunderstood the behavior of npm update.
Now I do the following step to update _package.json in generator.
create project from the generator yo generator-name
update package.json use npm-check-update.
ensure everything goes ok.
copy package.json into _package.json in generator
But I want to do this like
automatically update package.json in generator
start new project
ensure everything goes ok
I'm not sure this is the best way though...

Preparing for Yeoman 1.0 -> this.installDependencies not working anymore

I am working on migrating JHipster to Yeoman 0.20.1, in order to prepare for Yeoman 1.0.
At the end of our process, we normally:
Run npm install and bower install
Use a callback function to run some Grunt or Gulp.js task, usually grunt wiredep
This has always worked, and here is the current code that runs the installation process.
Since I migrated to Yeoman 0.20.1, we still have:
The installDependencies function being called
It even prints out the message I'm all done. Running npm install & bower install for you to install the required dependencies. If this fails, try running the command yourself.
But in fact no installation happens! NPM and Bower do not install anything, and our Grunt task is not called. Note that if I call them manually, they work correctly.
If tried to debug this, and it looks like this method is not being called.
Can anybody help me on this issue?
I feel like the run loop might be done after the end event is triggered. installDependencies schedule install methods to be runned during the install priority. If the run loop is done, they won't run.
You should be able to just call installDependencies at any time and not worry about the end event callback. If you want to imitate the behavior you currently have, then call installDependencies inside a method called end.
As a side note on the installDependencies API, you don't need to manually specify skipInstall anymore (that's now automatic).

Yeoman / AngularJS not loading CSS in development server

I'm using the AngularJS Yeoman generator (https://github.com/yeoman/generator-angular) and Express for the server. When running grunt server, it starts up my app fine and compiles .scss files into the .tmp folder in the root directory, but my pages don't automatically load that css. I have set up a link to the style/style.css stylesheet in my layout jade file.
I've also tried grunt compass, which works fine, but again, does not make it so my views actually load the css file in .tmp. I have the default compass setup in grunt.
This was an issue with live-reloading that has been addressed in newer releases. Update your generators through yo or by running npm update -g generator-angular. If you want to upgrade an existing project, you can run yo angular in the same directory and choose the diff option to see the changes you have to make.
As for May 22, 2015 ... the yeoman generator-angular does not work correctly unless you select Yes when asked if you'd like to include the Twitter Bootstrap. Perhaps subsequent releases will fix this.
On a good note, there are much less problems with the generator-angular than with generator-angular-ui-router (which is a disaster)

Resources