Open nwpappas opened 8 years ago
Yea, I definitely see the issue. I'm debating what the best way to handle this is. Addressing it soon is definitely on my list.
This issue has been giving me a lot of grief lately. 😞
I have a project that uses ES6 modules and I use a hook to trigger a Rollup build, which has been working great. The problem is that CodeKit requires me to output the module files somewhere, so every directory ends up with a min/
folder in it. (I’m not minifying but that’s what the default output path is set to, so that’s where they go.)
This is super annoying because it causes all kinds of conflicts with the config.codekit3
file when someone pulls my changes and doesn’t have those auto-generated folders/files in their project. I could ignore each module file one by one, but then CodeKit wouldn’t trigger the Rollup hook at all when they change. 🤦♂️
In CodeKit’s defense, part of this issue stems from the fact that I use custom module import paths (via rollup-plugin-includepaths
), so CK can’t tell what imports what like it normally could. If I used regular import paths then everything would be fine because only top-level modules would be processed (and output) when an imported module changed. That said, there are other compelling reasons (like @nwpappas’ original issue) why it would be useful to have CodeKit process files without outputting them.
Built-in module bundling (#168) would fix this for me, but it looks like it might be a while before that’s implemented. 😕
@bdkjones I realize Mojave dark mode support is a current priority, but is there anything that can be done in the short-term to allow ignored files to trigger hooks (or allow files to be processed but not output)? Maybe a “Process it (without outputting)” option in the “When This File Changes Or Builds” menu? 🙏
Have you tried just redirecting the Output to a trash location? It would be the equivalent of piping output to /dev/null. If you set the Output Path to, for example, the trash, you’ll get CodeKit to process your files without creating an output file in your project.
Sent from my iPhone
On Jun 21, 2018, at 13:22, Sean Juarez notifications@github.com wrote:
This issue has been giving me a lot of grief lately. 😞
I have a project that uses ES6 modules and I use a hook to trigger a Rollup build, which has been working great. The problem is that CodeKit requires me to output the module files somewhere, so every directory ends up with a min/ folder in it. (I’m not minifying but that’s what the default output path is set to, so that’s where they go.)
This is super annoying because it causes all kinds of conflicts with the config.codekit3 file when someone pulls my changes and doesn’t have those auto-generated folders/files in their project. I could ignore each module file one by one, but then CodeKit wouldn’t trigger the Rollup hook at all when they change. 🤦♂️
In CodeKit’s defense, part of this issue stems from the fact that I use custom module import paths (via rollup-plugin-includepaths), so CK can’t tell what imports what like it normally could. If I used regular import paths then everything would be fine because only top-level modules would be processed (and output) when an imported module changed. That said, there are other compelling reasons (like @nwpappas’ original issue) why it would be useful to have CodeKit process files without outputting them.
Built-in module bundling (#168) would fix this for me, but it looks like it might be a while before that’s implemented. 😕
@bdkjones I realize Mojave dark mode support is a current priority, but is there anything that can be done in the short-term to allow ignored files to trigger hooks (or allow files to be processed but not output)? Maybe a “Process it (without outputting)” option in the “When This File Changes Or Builds” menu? 🙏
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I haven’t tried that but I’ll give it a shot! Thanks for the workaround!
Feature Request:
Allow hooks to be run on files that are otherwise ignored when a file changes.
Rationale:
Hooks allow external applications to run on files that we may not want CodeKit to perform any of its default actions. For example, placing a hook on a Markdown (
.md
) file forces you to process the default actions in some way.Use Case:
Jekyll. To integrate Jekyll into a CodeKit project the user must currently:
tmp
directory)Result:
tmp
directory, which is not useful to the project.Suggestions:
.md
extension)