Yo generator tries to make a brand new MEAN app when I try to use a subgenerator - meanjs

So when I run
yo meanjs:crud-module foo
I get this
You're using the official MEAN.JS generator.
? What mean.js version would you like to generate? (Use arrow keys)
master
❯ 0.4.0
0.4.1
and it tries to take me through the process of cloning the sample meanJS app.
Why is it not behaving as a sub-generator?
Edit
I was using MEANJS 4.0, which the current YO generators do not support. I installed the in-development yo generators with
sudo npm install -g meanjs/generator-meanjs#0.4-dev
and now I can use the vertical-module subgenerator.

Did you create the project using the generator? Your project probably doesn't have a .yo-rc.json file so the generator doesn't know there is a yo project.

The 0.4.x generator is in progress.
Github repo

Related

Chisel building riscv-gnu-toolchain for Sodor

I want to build 'riscv-gnu-toolchain' for Sodor Project available in :
ucb-bar/riscv-sodor
I failed to clone it as suggested by its readMe using :
'git clone git#github.com:riscv/riscv-gnu-toolchain.git'
I also tried to use the latest version of the repository, and it generates the following warning :
'configure: WARNING: unrecognized options: --disable-float, --with-xlen'
Which suggests that this is not the right version. I tried to use the version in ROCKET CHIP, but I failed also.
Which version of 'riscv-gnu-toolchain' I can use to compile Sodor's tests?
Thank you Chris. I found a version that work with Sodor. Here are the commands that can be used to checkout this version and build it:
git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain
git submodule update --init --recursive
git checkout 06c957ab
mkdir build
cd build
../configure --prefix=${INSTALL_LOC} --disable-float --disable-atomic --with-xlen=32 --with-arch=RV32I
make
Sodor currently only supports the Privileged Spec v1.7, so you need to use an older version of riscv-gnu-toolchain. Older versions of the toolchain will recognize the options --disable-float and --with-xlen. It appears that there are no tags on riscv-gnu-toolchain, so you'll have to do some detective work to find the correct commit.

Use an older generator-angular-fullstack version

I want to generate a project with generator-angular-fullstack, but I don't want to use ECMAScript 6. Do you know how I can downgrade the generator? or do you have a better solution for generating a project with angular node and mysql?
Thanks.
A little bit weird that we have to downgrade just to be able to using javascript and CSS by default, not only choose between typescript, babel and various :) Check the current version :
npm list -g generator-angular-fullstack
you will probably see something like
/home/<user>/npm/lib
└── generator-angular-fullstack#3.1.1
Check if you have another local version installed (very likely if you not have been strictly globally from scratch) list without -g :
npm list generator-angular-fullstack
/some/other/dir
└── generator-angular-fullstack#3.3.0
Now, if you have a local version as shown above, uninstall it
npm uninstall generator-angular-fullstack
Finally install the release of generator-angular-fullstack you want. My prefered versions for javascript, HTML, CSS, mongodb, express etc is 2.0.13 and 2.1.1
npm install -g generator-angular-fullstack#2.1.1
check version again to see if you actually have switched releases :
npm list -g generator-angular-fullstack
should now show
/home/<user>/npm/lib
└── generator-angular-fullstack#2.1.1
go to your working directory and run the generator
yo angular-fullstack
..release 2.1.1 is executed. NB: If you now and then see some UNMET PEER DEPENDENCY bower#>=1.0.0 etc, ignore it! It has not so much to do with the generator itself, and everything works fine - so dont worry about that.

phpstorm cannot find class ZMQContext

Hi I'm creating project according to Tutorial on Ratchet website.
I installed zeromq version 0.3.0 through composer in phpstorm.(I checked if I installed right zeromq with phpinfo() and also with php-m in terminal)
In file post.php I cannot create new object of class ZMQContext(). - php storm cannot find this class.
I found the same issue on stackoverflow but solution is for linux.I'm using win.
When I want to use this in code: use React\ZMQ. - I don't see there class ZMQContext
Thanks for answer.
You can get PHPStorm to auto-complete code that uses the ZMQ PHP extension.
Save this stub file: https://gist.github.com/Mikulas/c22e44a918c7af5de5e6
I saved it (on OSX) under /Applications/PhpStorm EAP.app/Contents/plugins/php/lib/extensions/zmq.php
Then go to PHPStorm > Preferences > Languages & Frameworks > PHP > include path and add that extensions folder.
Now go back to your file and you'll see PHPStorm auto-completing stuff from the ZMQ extension.
Have fun! I hope you'll find this useful.
It looks like you've installed the PHP PECL extension. You also need to install the ZeroMQ library on your system that ext-zmq will use. If you're an a Debian based system try sudo apt-get install libzmq-dev or a RH based system sudo yum install zeromq zeromq-devel.

is bower install html5boilerplate is a good thing ?

My question is it good to install html5boilerplate with bower?
How can one proceed after that as it have its own directory for css and javascript and everything will come under bower_component/html5boilerplate
No, use Yeoman http://yeoman.io/ is even better than download the .zip
note: you need nodejs installed to install Yeoman
Install: npm install -g yo
https://github.com/h5bp/generator-h5bp
Install: npm install -g generator-h5bp
Run it with yo: yo h5bp
No, it's not.
HTML5 Boilerplate is meant to be used as a base for starting a new project.
Bower is a great way to manage libraries that are going to be used in a project, like jQuery or AngularJS.
The better thing for you to do is to download the HTML5 Boilerplate zip and extract its files into your project root folder.

Testing yeoman generator locally

I'm creating a yeoman generator for my web projects.
But I wonder how I can try and test my changes before publishing it?
Since I have installed it once, it will not run my local development version, instead it runs my installed version.
Any suggestions on how can test-run my local development version?
I finally found some information on how to accomplish this:
if you wish to develop on the generators code base, and debug locally, a common way to do so is to rely on npm link
git clone the generators repo locally
cd into that repository and run npm link. It'll install required dependencies and install the package globally, using a symbolic link to your local version.
If you want to install sub generators, you need to do so in the context of a yeoman-generator package linked earlier. Cd into the sub generators package you have cloned locally and run npm link.
We now have everything linked and known on the system, we now need to link the sub-generator repo into the parent one, yeoman-generator cloned and linked in step 1 & 2.
https://github.com/yeoman/generator/wiki/Testing-generators
EDIT:
Updated link for info: https://yeoman.io/authoring/index.html
If by "running locally" you mean the ability to test your generator and its flow you can simply do this.
In your project directory folder run npm link. If this passes in flying colors, go to step 2.
Open a terminal and cd into the folder you wish to initiate a project.
Run yo generator-theNameOfYourGenerator. This will run your generator.