Comments (12)
Sounds good. Should be fairly easy to support. Contributions are welcome
from projen.
Does it make sense to pass srcDirs for each component in the rc or should the construct pass srcDirs to all components for you ?
from projen.
I think passing srcDirs to all relevant subcomponents for you would be a sensible default - but it should still be possible to override the choices on an per-component basis (e.g. if you don't want to lint a folder that has legacy code, but you still want to compile/build it). Overriding per-component srcdirs should probably through directly assigning to certain fields or calling an API.
Perhaps we could change the srcdir option/param to be an array of strings instead (or add a srcdirs
flag and deprecate srcdir
)? This might require changes in several places - but the endgoal though is to represent a simpler / more flexible mental model. If a specific project type like a CDK app requires there to be only one source directory, then a runtime check could be added to the constructor to validate that the srcDirs list is length 1.
from projen.
This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.
from projen.
Don't close
from projen.
Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen.
from projen.
Reopening. This is a currently an issue since cdk8s projects (created with projen new cdk8s-app-ts
) cannot use any cdk8s imports they generate, since the src
and imports
directories are separate and the generated tsconfig.json
has rootDir
set to src
.
A temporary workaround for the above issue is to use an escape hatch:
project.tryFindObjectFile('tsconfig.json').addDeletionOverride('compilerOptions.rootDir');
from projen.
For JSII projects (like construct libraries), the above workaround doesn't work since tsconfig.json is managed/generated by jsii. But today I realized that JSII actually does support multiple source directories, it just requires that "rootDir" option in JSII's typescript options has to be left empty! source:
So a workaround for JSII projects is:
project.tryFindObjectFile('package.json').addDeletionOverride('jsii.tsc.rootDir');
Edit: Actually I guess this only does a little bit since you still need a single root of your project with an index.ts file, otherwise JSII starts to complain.
(Somewhat relatedly, JsiiProject
has a rootdir
option which doesn't do anything...)
from projen.
This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.
from projen.
Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen.
from projen.
This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.
from projen.
Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label.
from projen.
Related Issues (20)
- Request for Upgrade: `jsii` 5.1 to 5.3 HOT 1
- bug(upgrade-depdendencies): some dependencies are still attempted to be upgraded by ncu, then reverted by projen HOT 10
- Support modifying generated files HOT 2
- Projen npm package not updated with generated package HOT 11
- project initialization has dependency on yarn "classic" HOT 18
- Fails to publish a new package to npm HOT 3
- Better default for Jest UpdateSnapshot HOT 3
- `npx` used when `bun` is package manager
- bump and unbump share environment variable object
- spawn does not respect step envrionment variables
- Poetry console output not shown in real time
- New structure for `PythonProject` HOT 3
- Make GitHub pipeline run tests on multiple node versions
- Publishing v0.80.16 to PyPI failed HOT 1
- Publishing v0.80.17 to Maven Central failed HOT 1
- Should `args` be returned by the task --inspect CLI command? HOT 1
- Error when using `NodePackageManager.BUN` with `NodejsFunction` HOT 5
- Update actions due to node v16 deprecation notice: codecov/codecov-action HOT 1
- gitlab build workflow HOT 1
- Rerunning projen cannot proceed due to existing license. HOT 10
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 projen.