Comments (18)
Doesn't compile jsx files (babel can do it)
from blendid.
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.
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.
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.
+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.
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.
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 togulpfile.js
and put therequireDir('./tasks')
into anindex.js
file within it. - Running
gulp
works just the same, andgulpfile.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.
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.
@synapticism I'm definitely open to Pull Requests, but I'd rather not add Bower as a dependency.
from blendid.
@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.
Alright, I sent #100 to show you how that would look. No Bower required.
Two other (very) small bits of feedback:
- I like having the config file in the root; it makes it a little easier to access when modifying a project.
- It might be nice to switch from
gulp-autoprefixer
togulp-postcss
, a general wrapper for all PostCSS plugins (of which Autoprefixer is just one): https://github.com/w0rm/gulp-postcss
from blendid.
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.
[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.
Is there a reason why wiredep isn't being used to automatically include bower packages?
from blendid.
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.
@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.
@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.
@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.
Merged!
from blendid.
Related Issues (20)
- watch task will not compile more than 48 html files HOT 5
- Removing "comments" from public/html files HOT 1
- xlink:href being deprecated in SVG
- Additional Tasks information HOT 4
- Build issue: UglifyJs - Unexpected token: name (context)
- Build issue: UglifyJs - Unexpected token: name (context) HOT 5
- Fonts aren't copied over on build HOT 1
- additionalTasks access rev-manifest HOT 4
- Not bundle jquery in production HOT 1
- Current project status HOT 4
- 4.5.0 release not available through npm/yarn HOT 1
- Failed to mount component: template or render function not defined HOT 1
- upgrade to gulp 4
- empty prebuild and postbuild configs must be `null`/`false`, not `[]`. change this behavior?
- html watch task does not notice changes to files added after Blendid was started
- wrong generation of path for js-files in rev-manifest on windows HOT 1
- Configuration for swiper to work
- The engine "node" is incompatible with this module HOT 3
- 4.5.3 release not available through npm HOT 1
- ERROR in bundle.js from UglifyJs Unexpected token: name (ChangeDesc) [bundle.js:2900,6]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blendid.