-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ignore via .gitignore #275
Comments
If this was done in a way where this was a nice add-on if you are using git, that would be fine. But there might be other things for us to consider. If we supported Browserify, what would be the implications of not serving or compiling the It seems worth thinking about, though. Thanks for opening an issue! If you happen to have a project where this is an issue for you, it would be great for us to see to make sure we’re covering your use case. |
so for the record with browserify there would be no consequences to not as for my use case, more generally I'm looking for an app that will let me On Thu, Apr 3, 2014 at 2:22 PM, Kenneth Ormandy notifications@github.comwrote:
-Calvin W. Metcalf |
Does browserify rely on |
when bundles to create a static asset it uses the node_modules folder yes On Thu, Apr 10, 2014 at 3:16 PM, Zeke Sikelianos
-Calvin W. Metcalf |
Hi I believe this is necessary for the problem I'm going through. Here is the SO question. This is a great project btw, I use it all the time. My thanks to the contributors! I've had an idea: why not parse a What do you think? |
I think if we do make it configurable, it will be similar to the suggestion in the Potentially you could have an array of directories in the |
@kennethormandy I like the verboseness of an array in But one clear problem with relying on I'd think decoupling is best. Harp should be able to handle this completely on its own. And I think it should be totally up to the developer. When we (as developers) find ourselves repeating ourselves, then we typically make a template or boilerplate for future use anyway. And it's probably best not to assume that one's Harp probably shouldn't make any assumptions about my As an alternative idea to a verbose dotfile or having Harp assume anything about my files, what if Of course, we can always just use a build system like grunt/gulp/etc. to do most of this, but that takes away from the lovely simplicity that Harp provides. Once you get into build systems, you may as well handle parsing and compiling everything there, which isn't as fun or quick or elegantly simple as just using Harp. |
I definitely agree with the issues you’ve raised here, and I see the benefits of decoupling. You’re right that a lot of people don’t use Git with Harp, I guess I was assuming that most people that use Bower or npm probably do but that’s not necessarily the case either. The reason I’d rather make it implicit is for the exact reason you described: if you’re having to configure your build system, chances are you’d rather use Gulp, Grunt, or another SSG where you can configure everything. Harp’s benefit comes from not having to configure that stuff. I’m trying to avoid someone having to look up what to drop in their I think this is a similar outcome to what you’ve described about overriding defaults. What if something like this was configurable in the {
"ignore": ["css/fonts", "README.md"]
} but by default (ie. if you never specified an "ignore" array in the {
"ignore": ["bower_components", "node_modules", ".git", ".gitignore"]
} We already do this with |
Any progress on this? I like the idea of having the option to ignore some directories as part of the |
@kennethormandy That sounds like a great solution to me, very usable and easy, still fits in with Harp's simplistic approach, and allows us just the little bit of "filtering" on the ignore list that we need to handle these use cases. And seems plenty flexible and simple enough to handle unknown future use cases, too. My interpretation of the ignore array is that during Same (pretty much) would go for Another idea I had, may be worth considering, is an additional rule for naming. Maybe prefix two underscores for files/directories that shouldn't be parsed, but should be copied during harp.json
.gitignore
public/
_data.json
_partial.ejs
_layout.ejs
index.ejs
__bower_components/ Just an idea. It does seem counterintuitive, though, when considering it alongside a file prefixed with a single underscore. But thought it was worth throwing into the discussion, at least. @turizoft I don't believe any progress on actual implementation has been made yet. We're still discussing how it should work. |
Yeah, I’m imagining they’d be served as-is and never compiled (unless you were using them with Browserify which would have some extra stuff happen). This would also solve #170, #259, and #262. While |
Yeah, I wasn't too thrilled with the additional naming convention idea, just threw it into the discussion for what it's worth. Sometimes bad ideas spark better ideas.
A developer may very well need the entire |
sorry to be slow here but do I just add README.md to the ignore: [...] ? |
Ah, I’m so sorry for the confusion. This doesn’t actually work yet, we’re discussing the syntax and there’s an in-progress pull request at #312. In theory, I think it might work like this:
|
ok great.. that seems to be the most obvious approach. +1 :-) |
I just tried to adding README.md to an ignore block ^^ with no joy. What currently is the best approach for this? |
+1 :) |
It seems really trivial to add an ignore directive to harp.json. I'd like to write a tutorial using Harp with Grunt and Foundation Zurb, but without ignoring the node_modules and bower_modules, my workaround method feels like a total hack. Any progress on ignoring specified directories? Thanks for a great server! |
I am also thinking of creating a blog engine based off @kennethormandy article (http://kennethormandy.com/journal/start-a-blog-with-harp) that would rather use folders for articles, to eliminate the need of having _data.json file. Each folder would then contain its .json config file (easier to manage) with own assets, scripts etc. But for that I also need to be able to exclude/ignore some source files. |
@og2t You should look at Metalsmith, it sounds like what you look for. |
There seem to be two use cases being discussed here:
I've run into both cases, although 2 is what I'm currently wishing for. If you are using a root-style app at the top level of a repository, this is necessary in order to keep I would propose introducing two new keys in
|
👍 I much prefer the solution proposed in #438 of using something like a .harpignore or the one proposed here to ignore using .gitignore. This is much preferable to just ignoring default directories by name, such as "vendor" or "bower_components", as proposed in #312 beacuse it always the developer more flexibility. |
.harpignore would be bliss. Since Harp is a zero-conf framework, this gives enough flexibility without adding any ignore JSON config files. |
it would be nice if harp could ignore files/folders/paths in the .gitignore, as things like
node_modules
can't easily have their name changedThe text was updated successfully, but these errors were encountered: