yeoman / generator-mobile

Scaffold out a mobile project based on Web Starter Kit
http://yeoman.io
918 stars 99 forks source link

Use bower to install fastclick.js #41

Closed corburn closed 9 years ago

corburn commented 10 years ago

Removes the changes noted in #40 inline comments. I'm not sure why the second parameter needs to refer to the bower_components path.

appendStyles(html, optimizedPath, sourceFileList, attrs)
sindresorhus commented 10 years ago

Have you tested your changes manually and made sure it builds correctly?

corburn commented 10 years ago

@sindresorhus within the scope of what I was trying to fix and to the best of my understanding I did test the changes manually to make sure it builds correctly.

I was trying to limit the scope of changes to fastclick. The version pulled in by bower adds support for AMD modules. As a result, the fastclick.example.js and fastclick appendScript were causing requirejs to throw errors when requirejs was included. To fix the error I extracted main.js, merged it with fastclick.example.js, and added a condition for appending the script to index.html

Errors such as the require.config bootstrap path were left unmodified. This is one of many:

I don't understand why the optimizedPath parameter of appendStyles should use the bower_components path and appendScripts should not.

appendStyles(html, optimizedPath, sourceFileList, attrs)
appendScripts(html, optimizedPath, sourceFileList, attrs)
addyosmani commented 9 years ago

We're rebooting this generator and will no longer be including fastclick as a part of it. Thanks for your interest in helping here though <3