-
Notifications
You must be signed in to change notification settings - Fork 660
.tmp dir feels confusing #280
Comments
That's exactly the point of the |
That's exactly the point I'm arguing against: I don't find it cluttering. |
Or rather, I find that |
I think there should be a clear distinction between the actual source code ( That said, if there's isn't a clear distinction, it's also going to end up difficult to develop the actual build pipeline. How can you know if a user meant something as a source file or if it's a file put there as temporary? And how can you easily keep all non-source files out of your version control system? |
I'm with @arthurvr on this one. 👎 For starters, having no clear distinction between the two may not be a problem for development of the actual build system, but keep in mind that many people who know less about things like this also need to be able to extend the build system after downloading PSK. I bet oftentimes there are tiny (or bigger) things that people want to change. Secondly this is consistent with what WSK and pretty much any build system out there (all yeoman generators for example) do. That makes it way less confusing as people are used to it. |
So, I've gathered two points from the comments so far:
I'd love to hear some arguments that involve people who's already far along + something more general than yeoman as that is just a means, an implementation detail. Things that
|
IMHO, not only for people that are just getting started. Those are compiled files and you're simply supposed not to care about them, except if you use the actual build process to publish the app, but then everything will end up in
IMHO that doesn't really matter. If the build process is doing alright, you never have to know where those files are and never have to see them. Having non-source files hidden is the desired behaviour in most cases.
harder to integrate with external tools. a lot of them rely on the fact that, again, there's a single app root folder with a known structure. e.g. styles for css, js for javascript, etc. That would never work anyways, as we define other routes. Then you'd need the bower components in there too. Also, about serving the But anyways, this all boils down to opinions and the way one looks at things so I'm going to stop discussing it. Don't want to waste too much time nitpicking. |
I was about to comment nearly the same, but then @arthurvr did it for me. :p To me, the disadvantages you listed there don't really make sense to me as you not ever want to touch/see those files.
Indeed. Same here. |
here's a great training video why stuff is where it is: |
Thanks Janna, but that video seems to be locked down under a subscription. Anyway, I'd love for someone to address the downsides I mentioned in my
|
@crhym3 LEt me try to address the downsides mentioned in your list
You do have a consistent view of your app, which is in your
The express server, for example, allows to specify multiple directories to serve static content from by using the Whether it is common or not is irrelevant, and it is an appeal-to-tradition fallacy, because there is nothing presented to why the claimed tradition is the correct way. Neither tradition nor novelty is necessarily good, and we cannot base arguments on these grounds.
I cannot really address this, because I haven’t had any difficulties worth mentioning integrating external tools in my projects. Could you please tell which difficulties you are facing and which tools you are trying to integrate? If a tool is somehow limited to a specific and rigid directory structure, perhaps the tool is not right for the job. |
Then I feel like you're totally ignoring @arthurvr's comment.
Yes, and WSK even takes adventage of that feature. Because bower_components lives in the root, the app won't work with a simple server there anyway.
Yeah, if a tool is limited to "this is a directory and that should be your website", then that tool is honestly total crap. |
My opinions here don't make too much sense and feel free to ignore them, but I think the points @Frikki listed are really valid (and in fact a reiteration of what @arthuvr said)
I don't understand why you care about seeing the compiled files. The
In most modern (front-end) webapps that's not possible any more. People need simple routing for dependency systems (see blogpost robbbz linked to) and similar things. The times I can just run a simple Python server in a directory to serve something serious are rare.
That's really (too) strong wording, but I believe that's where it comes to and I agree.
I agree. I think what robbbz meant is that you're in fact just re-wording what arthurvr already tried to explain.
I think that's really valid concern and you forgot to add that to your list. Thanks for taking my opinions in consideration or at least taking the time to read. |
Accept my apologies. It's 4AM here and I just came from a plane. I meant to quote the following part:
|
@robbbz No worries. |
You keep saying "temporary" or "compiled" files but they are not. Compiled is what ends up in I could also have other [third party] css (not sass) in app/styles, or generate an html file with some external tool. Should that all end up in the .tmp dir as well? That's just feels wrong, to have half of the app source code in .tmp, and the other half in the original directories. |
Starting from as simple as uploading an uncompressed version (note: different from It all works well until it doesn't and you need to debug your pipeline, which ends up wasting time on chasing a file location for e.g. a manual inspection. What if I end up with a checked in |
Yes, for production. But the
Yes. And honestly, I hope you won't take any offense by that, but if you have third-party/generated things in your
I'm going to repeat what I said earlier, that's a bug in the tools you're using. A modern development workflow requires at least some simple server (more than serving a directory, like And if I may be honest to you, you seem to miss a basic understanding of build tooling and modern front-end development workflows. You're trying to fix a non-problem, by introducing an idea which was proven to be bad practice even before front-end build system came up. (Rails for example made the same mistake years ago) |
Can I also point out that the way we're doing it is the same as nearly every build system, and the way recommended in the Gulp documentation? For me that's argument enough to think that people are going to be confused when we do it @crhym3's way. |
I wasn't trying to fix anything, barely expressed my opinion. At the end this thread seems to boil down to "you're doing to wrong". I think it's good enough for me to just close this issue, then. |
@crhym3 As a final comment, leaving aside the discussion on external tools but focusing on the uncompressed version you’d like to upload, for whatever reason, I think this requirement lies beyond the scope of the PSK. In such a case, I would suggest you add a new gulp task to suit your needs. Basically, doing the same as the |
I spent a good chunk of time to understand where my generated files were and finally realized there's a
.tmp
dir.I find it quite confusing. Wouldn't it be better to just generate stuff where it belongs to, in
app/
dir?The text was updated successfully, but these errors were encountered: