Giter Site home page Giter Site logo

Comments (7)

erikjung avatar erikjung commented on May 12, 2024 1

Perhaps we should include these by default:

  • assets/static/favicon.ico
  • the assets task, configured to copy assets/static/**/* to dist

from drizzle.

erikjung avatar erikjung commented on May 12, 2024

This relates to #40

from drizzle.

megnotarte avatar megnotarte commented on May 12, 2024

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

from drizzle.

tylersticka avatar tylersticka commented on May 12, 2024

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.

Directory Structure

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.

Gulp task

As noted in cloudfour/core-gulp-tasks#26, the "assets" task is kind of a mess. To recap:

  • We have a directory called ./src/assets that, by default, contains only CSS and JavaScript.
  • We have a task called assets that does not do anything with CSS or JavaScript.
  • Said task includes imagemin, which is the largest dependency in the whole project.
  • We do not currently use the image optimization in any of our projects.

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.

Plan of Attack

If all of that sounds good, the next steps would be to...

  • cloudfour/core-gulp-tasks#26
    • Rename assets task to static
    • Remove image optimization stuff, including package.json dependencies
    • Update tests
    • Bump package version
  • #33 #40
    • Update core-gulp-tasks dependency
    • Add src/static/favicon.ico (good temp icon here)
    • Register and configure static task by default

But first...

Does all of that make sense?

from drizzle.

gerardo-rodriguez avatar gerardo-rodriguez commented on May 12, 2024

Works for me! 👍

from drizzle.

erikjung avatar erikjung commented on May 12, 2024

Can we just call the task copy instead of static since it could in theory be used on any directory?

Otherwise, 👍

from drizzle.

tylersticka avatar tylersticka commented on May 12, 2024

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.

from drizzle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.