Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added bower management for normalize.css #32

Merged
merged 2 commits into from
Sep 28, 2013

Conversation

noahbass
Copy link
Contributor

This adds two things:

  • management of the normalize.css in bower
  • the normalize.css is now included in the cssmin task in the gruntfile

toddmotto added a commit that referenced this pull request Sep 28, 2013
Added bower management for normalize.css
@toddmotto toddmotto merged commit 5088429 into toddmotto:master Sep 28, 2013
@noahbass noahbass deleted the normalize_bower branch September 28, 2013 15:46
@toddmotto
Copy link
Owner

Hmmm. I'm getting an install Couldn't read dependencies - npm ERR! Error: ENOENT error now. Download a fresh build and hit the grunt-dev.command. Can you reproduce?

@noahbass
Copy link
Contributor Author

Just tested. two things:

  1. the first build seems to fail
  2. after the failed build, a deletion of the node_modules folder and a new grunt-dev.command build works

@toddmotto
Copy link
Owner

Mine fails to even install the node_modules. Trying to debug it but nothing so far.

@toddmotto
Copy link
Owner

Hmmm. I just deleted the .zip and downloaded a fresh one and it installed just fine. Bizarre. Seems to working okay now. There's a Bower dependency which I don't think we need to install the Grunt task for? There's also this which I think could be removed:

"scripts": {
  "postinstall" : "node_modules/.bin/bower install"
}

And then the .command files can be edited to:

if [ ! -d node_modules ];then
    sudo npm install && bower install
fi

@toddmotto
Copy link
Owner

Ahh okay, my install is having some problems afterall. Wonder if this is an NPM thing.

npm ERR! Error: ENOENT, chown '/Users/toddmotto/Downloads/fireshell-master/node_modules/bower/node_modules/lru-cache/README.md'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 12.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/toddmotto/Downloads/fireshell-master
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! path /Users/toddmotto/Downloads/fireshell-master/node_modules/bower/node_modules/lru-cache/README.md
npm ERR! fstream_path /Users/toddmotto/Downloads/fireshell-master/node_modules/bower/node_modules/lru-cache/README.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chown
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:265:7
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)

@noahbass
Copy link
Contributor Author

outdated packages?

@toddmotto
Copy link
Owner

Potentially, just testing an older package download. I'll swap out the package.json and see if it installs.

@toddmotto
Copy link
Owner

Nope doesn't install. Perhaps something's not setup correctly somewhere. Download a fresh v1.1.0 and it installs perfectly.

@toddmotto
Copy link
Owner

Okay I don't think it likes installing from the downloads directory, the auto cd didn't like something - but worked perfectly before. I downloaded a fresh copy, moved the .zip to Desktop, extracted and ran. It jammed a little on npm http 304 https://registry.npmjs.org/glob but then finalised the install and opened my browser tab - all good on that. Need to sort Bower install method now.

@noahbass
Copy link
Contributor Author

Success!

I got a fresh nightly download, did the sudo npm install && bower install thing in the grunt-dev.command, removed the "scripts": { "postinstall" : "node_modules/.bin/bower install" } from the package.json and everything worked perfectly.

@noahbass
Copy link
Contributor Author

did you get your build to work?

@jonlow
Copy link

jonlow commented Sep 29, 2013

Since this PR, I'm having trouble with grunt build throwing the following error when bower tries to copy normalize.css

screen shot 2013-09-29 at 12 25 54 pm

I've tried deleting my node_modules folder and npm install etc.

Do you guys get this error during a 'grunt build' too?

@noahbass
Copy link
Contributor Author

@jonlow - I think grunt-bower is not capable at copying css, only scripts.

Anyway, the normalize does not have to be copied to the app folder because it is compiled into the main css file. Whereas the scripts must be copied in order to be called from the index.html

@jonlow
Copy link

jonlow commented Sep 29, 2013

@noahbass yeah I think you're right re: grunt-bower not being able to copy css.

What are your thoughts on the best way to get Bower to not try and copy normalize to the app folder?

@noahbass
Copy link
Contributor Author

@3bola sent in this pull request to grunt bower in order to copy css after he found the issue: curist/grunt-bower#14

But I think we'll have to look into the docs to figure out how to not copy it over.

@noahbass
Copy link
Contributor Author

noahbass commented Oct 1, 2013

@toddmotto - any luck with the build?

@toddmotto
Copy link
Owner

I think it was the cd dirname causing issues with cd-ing. Looks like when you're inside Downloads or DropBox it didn't really know what the root was and was adding folders half in Users/Todd/ and half inside Downloads. The new auto-cd fixes this.

@noahbass
Copy link
Contributor Author

noahbass commented Oct 1, 2013

sweet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants