Comments (10)
You can use https://github.com/Woile/commitizen
from cz-cli.
Hmm good question. The init command needs to be improved to support this scenario. It is not currently a use-case that our tests cover. It certainly could be.
For now, as a manual workaround, you need to create an empty or boilerplate package.json in the root of your non-node project. If you want to do this using the cli then you can do something like npm init --yes
followed by commitizen init cz-conventional-changelog --save --save-exact
. The first command creates a boilerplate package.json and the second initializes commitizen.
I do expect that init will be rewritten as soon as I have some more time to devote to this project. I would be willing to help on an PRs that people want to contribute to improve the init command.
Please note that you can still use the rest of commitizen on non-node projects once you get the package.json created. This is just a limitation of the current init command.
from cz-cli.
Maybe creating a czfile
in the root of project is better, just like gulpfile.js
. The cz-cli could read both the config.commitizen
from package.json and the content of czfile.
from cz-cli.
I'm seconding this, commitizen is the perfect fit for many non-Node projects as well.
from cz-cli.
@adoyle-h You can use a .czrc file.
from cz-cli.
.czrc
file doesn't seem to work in the project root though. Even for node projects I would rather not pollute my package.json
from cz-cli.
+1 (x100) :)
This feature worked 6 months ago, somehow however in the last 6 months this feature disappeared. I use the following versions and because it still had this feature I could run commitizen without needing a package.json file.
npm install -g [email protected] [email protected]
with those versions all I needed was a local .cz.json.js and .cz-config.js file in the root of the project, no unsightly package.json, and it all works great. All my projects have been halted on that version waiting for this features to come back, we may have to drop commitizen soon if that doesnt happen.
from cz-cli.
+1
from cz-cli.
Hey all. Haven't forgotten about you. We did remove the ability to use a .czrc file because our adapters are node-based and thus you have a node project even if your project isn't actually a node project. I am trying to learn more about what we can do to
A) have a sane config loading strategy
B) support you all
Any chance you all can just create a package.json file with only the information we need. What are the downsides of this?
Thanks for helping me to understand more!
from cz-cli.
To use commitizen without installing the commitizen
in the repository or by using npm install -g commitizen
(for some developers global dependencies binaries are not in their path. You can use npx --package=commitizen cz
which will run the cz
binary of the commitizen
package.
With the following .czrc
at the root of the project:
{
"path": "cz-conventional-changelog"
}
It works perfectly.
If you are looking to use commitizen with husky you can use the following hook:
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
exec < /dev/tty && npx --package=commitizen cz --hook || true
from cz-cli.
Related Issues (20)
- Cannot find module 'inquirer' after run npx cz
- Can not write sentence case in when writing short description for change. HOT 2
- Vulnerability: Prototype Pollution via the main (merge) function HOT 2
- NPM warning breaks `cz` prompts when using `scripts` entry
- commitizen produces empty commit message after answering prompts HOT 3
- Showing timing (progress) during commit cli
- Text alignment issues in smaller terminal windows on Mac HOT 2
- bug: issue with LRU cache, cannot execute `git-cz`
- [Config loader] check if config key is in package.json before accepting it as a config file HOT 1
- Weird behaviour when using cz cli (global) outside a git repo
- pathspec 'git' did not match any file(s) known to git HOT 2
- Feature request: Submit on the command line: Is there a way to return to the previous field? HOT 1
- Feature request: Whether to support multiple types of commits in one submission HOT 1
- commit npm script actually works
- husky hook does not work HOT 2
- Nestor David Sánchez
- Behaves the same as git commit HOT 1
- Provide a way to prompt to amend commit message only
- cz commit error
- Question: Is it possible to write an adapter in ES6?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cz-cli.