GithubHelp home page GithubHelp logo

Version 2 / Feedback about blendid HOT 18 CLOSED

vigetlabs avatar vigetlabs commented on June 1, 2024
Version 2 / Feedback

from blendid.

Comments (18)

ieugen avatar ieugen commented on June 1, 2024

Doesn't compile jsx files (babel can do it)

from blendid.

renestalder avatar renestalder commented on June 1, 2024

The first thing I notice is that the asset folder is inside the gulp folder. Maybe this is only for testing purposes, but in most cases I want my build processes separated from my source files.

from blendid.

xsynaptic avatar xsynaptic commented on June 1, 2024

Would you have any interest in integrating a task to build SVG icon sheets (i.e. using gulp-svgstore) in addition to icon fonts? Great work by the way; I learned a lot from following this project!

from blendid.

armandabric avatar armandabric commented on June 1, 2024

I agree with @renestalder. The asset folder should be outside the build process files. It's not mandatory to be in src folder it's a common use case.

from blendid.

ieugen avatar ieugen commented on June 1, 2024

+1 to sources outside the buid. Comming from a java world, the conventions are (maven, gradle, etc) [1]:

  • /src/main/ - tree with sources used for main application
  • /src/test/ - tree for test sources
  • /target or /build - output of the build process, can be deleted and is re-create by the build process

[1] http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

from blendid.

greypants avatar greypants commented on June 1, 2024

Re: SVG sprites - yeah, I could look at adding it. I have a task from a previous project lying around somewhere. I think I used https://github.com/jkphl/gulp-svg-sprite

re: Folder structure - yeah, it does feel weird. It came from https://github.com/greypants/gulp-rails-pipeline, where there already was a [rails] assets pipeline- which needed to stay in place. I put my assets in the gulp folder to differentiate between the two asset pipelines. In my mind, it made sense because they are all gulp assets (assets to be processed by Gulp tasks).

But maybe that only makes sense in that specific context. What about something like this? Definitely influenced by Rails.

image

Really, no matter what, people will likely have to move some folders around to make this work with their stack. But this can also be used as static site generator, and should feel right as a standalone setup too.

Note that:

  • I removed the original 'gulpfile.js` file
  • I renamed the gulp folder to gulpfile.js and put the requireDir('./tasks') into an index.js file within it.
  • Running gulp works just the same, and gulpfile.js/index.js gets picked up and run.
  • the public folder is all .gitignore'd generated output

I think this makes sense, as that's exactly what the folder represents (a gulpfile).

from blendid.

xsynaptic avatar xsynaptic commented on June 1, 2024

That folder trick is quite clever... and yeah, people are going to move things around anyway. Personally I follow the src/build/dist model for most things. I see you define directories at the top of the config file so it doesn't really matter so much what it ships with.

Re: SVG sprites, I have a working setup that I could contribute in a PR if that's your style and you're interested. The general approach I'm using can be seen here (SVG task), here (specialized Bower tasks to import icons), and here (config file with relevant settings under svg/bower). This might be a bit out of scope for a "starter" kit though, which is why I ask.

from blendid.

greypants avatar greypants commented on June 1, 2024

@synapticism I'm definitely open to Pull Requests, but I'd rather not add Bower as a dependency.

from blendid.

xsynaptic avatar xsynaptic commented on June 1, 2024

@greypants That's cool. I'll think it over and see if there's any use to adding something along those lines to the project then. The SVG component can accept whatever people throw at it (I just happen to use Bower) so it might still be useful.

from blendid.

xsynaptic avatar xsynaptic commented on June 1, 2024

Alright, I sent #100 to show you how that would look. No Bower required.

Two other (very) small bits of feedback:

  1. I like having the config file in the root; it makes it a little easier to access when modifying a project.
  2. It might be nice to switch from gulp-autoprefixer to gulp-postcss, a general wrapper for all PostCSS plugins (of which Autoprefixer is just one): https://github.com/w0rm/gulp-postcss

from blendid.

pBun avatar pBun commented on June 1, 2024

Might want to add a gulp task to copy the /CNAME file for production builds so there's a way to utilize Github's custom domain functionality.

I added the copyCNAME task to the build-production file in a project I'm working on, but it's not the most graceful of solutions. It should probably be baked in with the deploy task. If I get some free time I'll take a crack at it and send over a pull request.

from blendid.

kylemarimon avatar kylemarimon commented on June 1, 2024

[off-topic, kinda]

Does anyone know what negatives exist from appending a hash to image filenames and SEO? I understand its usefulness, when it comes to breaking the cache. But wouldn't that require google to re-index the image? If the old filename doesn't 404 is there an issue? My team at work doesn't feel that it's a good idea.

Figured it's kinda on-topic, since rev-assets is kinda doing this out of the box ;P

from blendid.

noderat avatar noderat commented on June 1, 2024

Is there a reason why wiredep isn't being used to automatically include bower packages?

from blendid.

DJTB avatar DJTB commented on June 1, 2024

All the final changes are looking good.

Just a suggestion though, the dependencies and devdependencies in package.json seem somewhat arbitrarily split. I feel like everything should be in devdeps since none of the modules are being packaged up for the browser.

from blendid.

greypants avatar greypants commented on June 1, 2024

@DJTB I agree. Originally the split came from a project where I was deploying to Heroku, which ignored dev dependencies. The only thing left in there were modules related to the test server that only ran locally. But Yeah, lets move everything back. There's a way to tell heroku to include devDependencies anyway.

Other than that, all that's left before I merge this into amster is writing a good README.

from blendid.

rctneil avatar rctneil commented on June 1, 2024

@greypants Any updates on the README? I have a current Rails app and tried to do a gulp integration myself which wasn't easy to work with and found this but not 100% sure on how to integrate this into my rails app.

from blendid.

greypants avatar greypants commented on June 1, 2024

@rctneil This is a little behind gulp-starter, but the key integration bits and ideas are there: Check out http://viget.com/extend/gulp-rails-asset-pipeline and https://github.com/vigetlabs/gulp-rails-pipeline

from blendid.

greypants avatar greypants commented on June 1, 2024

Merged!

from blendid.

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.