问题
I need to duplicate a jhipster project. Since I have created this project I have updated jhipster versions. I want to duplicate the project with the same jhipster version of the first project.
How do I know which version of Jhipster I am using on my first application?
回答1:
The best place to find this information seems to be the first line of ./Gruntfile.js:
// Generated on 2015-12-14 using generator-jhipster 2.25.0
The identifier of the version used to generate the project can be found in a number of other places as well:
➜ grep -R '2\.25\.0' . # current version of jhipster is 2.25.0
./Gruntfile.js:// Generated on 2015-12-14 using generator-jhipster 2.25.0
./node_modules/connect/History.md:2.25.0 / 2014-08-05
./node_modules/generator-jhipster/package.json: "generator-jhipster@2.25.0",
./node_modules/generator-jhipster/package.json: "_from": "generator-jhipster@2.25.0",
./node_modules/generator-jhipster/package.json: "_id": "generator-jhipster@2.25.0",
./node_modules/generator-jhipster/package.json: "raw": "generator-jhipster@2.25.0",
./node_modules/generator-jhipster/package.json: "rawSpec": "2.25.0",
./node_modules/generator-jhipster/package.json: "spec": "2.25.0",
./node_modules/generator-jhipster/package.json: "_resolved": "https://registry.npmjs.org/generator-jhipster/-/generator-jhipster-2.25.0.tgz",
./node_modules/generator-jhipster/package.json: "_spec": "generator-jhipster@2.25.0",
./node_modules/generator-jhipster/package.json: "tarball": "http://registry.npmjs.org/generator-jhipster/-/generator-jhipster-2.25.0.tgz"
./node_modules/generator-jhipster/package.json: "version": "2.25.0"
./node_modules/phantomjs/node_modules/request/CHANGELOG.md:### v2.25.0 (2013/07/23 21:51 +00:00)
./node_modules/phantomjs/node_modules/request/CHANGELOG.md:- [828f12a](https://github.com/mikeal/request/commit/828f12a1ae0f187deee4d531b2eaf7531169aaf2) 2.25.0 (@mikeal)
./package.json: "generator-jhipster": "2.25.0",
回答2:
When you run yo jhipster
this is written in yellow in the welcome message.
回答3:
Ask it jhipster directly, from within your project folder.
jhipster --version
Here's my output
salathiel@salathiel-genese-pc:~/path/to/project$ jhipster --version
Using JHipster version installed locally in current project's node_modules
4.14.3
回答4:
If you have not used grunt during your applicaton setup, you can also find this information in the.yo-rc
"jhipsterVersion":xxx
来源:https://stackoverflow.com/questions/34265167/how-do-i-know-which-jhipster-version-i-am-using