Comments (4)
Yes, but with the latest release of cargo generate this can be solved. We have to include the file conditionally.
If you want to contribute I can explain better. Otherwise I can have this done by next week.
from template.
I can give it a shot
from template.
Oh, actually the feature was merged 10 days ago here but it is not released yet. I guess it will be released in the next version.
If you want starting working on it you can build cargo generate
from the master branch. Otherwise we can wait until it is released :)
How to solve the issue
Ignore files conditionally
Here there is the documentation on how to ignore files based on a condition.
I guess that in the file cargo-generate.toml we have to add something like:
[conditional.'crate_type == "lib"']
ignore = [ "src/main.rs" ]
[conditional.'crate_type == "bin"']
ignore = [ "src/lib.rs" ]
Bump minimum version
This will be available since cargo-generate 0.10.0 ( or 0.9.1? 🤔), so you have to bump the version here.
Tip
For testing this locally you can use this.
from template.
closed by #13
from template.
Related Issues (20)
- Consider conventional commits specification HOT 1
- ci: add cache
- Remove the need of example-synchronizer HOT 3
- issue template: use input boxes HOT 1
- issue template: ask if the user wants to fix HOT 1
- Configure dependabot
- Use `CARGO_REGISTRY_TOKEN` instead of `CARGO_API_KEY` HOT 3
- automatic example update HOT 1
- Use mergify to auto-approve and auto-merge dependabot PRs HOT 1
- Failed to parse string when running job[Coveralls] HOT 9
- why is this template file so strange? HOT 2
- add regex for github username HOT 1
- replace actions-rs actions
- Add code coverage
- Template of .github/workflows/cd.yml did not render. HOT 1
- yml error when running cargo generate HOT 1
- Publish to snap store
- Distinguish between library and binary HOT 1
- add `description` to `cargo-generate.toml`
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 template.