typeplate / typeplate.github.io

Official Website for Typeplate: “A Typographic Starter Kit.”
http://typeplate.com
Other
1.35k stars 109 forks source link

Update Bower.json w/Dependencies #131

Closed grayghostvisuals closed 10 years ago

grayghostvisuals commented 10 years ago

The readme says we use Bower to install dependencies, but the bower file has no dependencies listed. We need to list normalize.scss. Might pay to have it listed as a dependency and list bower in the gitignore :\ That parts is up for debate seeing as node_modules are in the same boat as to whether we should include them with our work.

Some would say It’s easier to just run ‘bower install’ than have to download all the dependencies using Git.

joshnh commented 10 years ago

I'd highly recommend having both bower and node modules ignored by Git. Especially given that you require an 'npm install' to get setup when using Grunt (and that downloads all dependencies).

grayghostvisuals commented 10 years ago

@joshnh :+1: Sell IT! Sold!

Melindrea commented 10 years ago

Not sure if you still need input, but I think that sounds like a good idea =)

The one thing I am wondering with what you're saying: Does that mean it will be including normalize.scss in the typeplate file itself, in effect meaning I wouldn't need to do any calls for it to be included?

grayghostvisuals commented 10 years ago

@Melindrea no. it's just relating to how you install normalize with bower. you'll have to run bower install along with npm install if you're working on the project from scratch.

Melindrea commented 10 years ago

Ah, alright. Potentionally interesting thing that struck me earlier: You should be able to put in bower install as a postinstall script in packages.json, saving one command.

grayghostvisuals commented 10 years ago

@Melindrea oh yeah? how would that flow work?

Melindrea commented 10 years ago

Well, I haven't fully explored that flow in particular, but I've done similar things (in particular creating git hooks at the end of npm install), but the theory is that we in the package.json file add:

"scripts": {
    "postinstall": "bower install"
  }

And then once npm install has been ran, it will run bower install

grayghostvisuals commented 10 years ago

Since I use normalize for the demo (I turn it on and off for example purposes) I have to hook into the bower_components directory so we need to keep that in the project repo. I will however list it as a dependency in the bower.json file.

grayghostvisuals commented 10 years ago

I made a copy task with Grunt and removed bower_components from the repo entirely. Boom.