Closed tylersticka closed 8 years ago
Perhaps we should include these by default:
assets/static/favicon.ico
assets
task, configured to copy assets/static/**/*
to dist
This relates to #40
No one seems to feel strongly about where this lives. If this gets too big, this doesn't necessarily need to make it into 1.0
Okay, I think I finally have an opinion on this. I wanted to share my "plan of attack" with @erikjung and @mrgerardorodriguez first before proceeding.
I'm going to set aside for a moment the question of "is assets/
the right place for styles, scripts and/or images we plan on processing or compiling in some way?" That's a decent question, and I have opinions about it, but I realized it was getting in my way in terms of actually getting things done, so we should open a separate issue for discussion if we want to tackle that.
But in a perfect world, where would the static assets live?
For me, that's easy: ./src/static
. It's simple. It's descriptive. It's pretty common. And unlike "assets," I feel like it implies that no processing will occur on those items. The definition of "static" is "lacking in movement, action or change." It's perfect.
I don't think it should live higher up in the structure than ./src
. To me, ./src
should really be where I live as a designer-developer. I want those files in there.
As noted in cloudfour/core-gulp-tasks#26, the "assets" task is kind of a mess. To recap:
./src/assets
that, by default, contains only CSS and JavaScript.assets
that does not do anything with CSS or JavaScript.imagemin
, which is the largest dependency in the whole project.I would like to replace that task with a task called static
. It'll copy files from one directory to another directory. That's it.
If we ever want an image-processing task again, we should give it a name like images
to match our css
and js
tasks.
If all of that sounds good, the next steps would be to...
assets
task to static
package.json
dependenciescore-gulp-tasks
dependencysrc/static/favicon.ico
(good temp icon here)static
task by defaultDoes all of that make sense?
Works for me! 👍
Can we just call the task copy
instead of static
since it could in theory be used on any directory?
Otherwise, 👍
Can we just call the task
copy
instead of static since it could in theory be used on any directory?
Sure, totally fine by me.
The simplest method of including
favicon.ico
is in the root directory, which also avoids any 404 requests in the browser. Many static generators have anhtdocs
orstatic
directory for assets that should be copied over verbatim. It would be nice to not have to specify<link>
elements for this info.