Closed Hypercubed closed 11 years ago
i believe .bowerrc should be put in your project's repo not the library's.
Yes, but Karma is looking for angularjs in the angular-toggle-switch
directory. bower install
, even when run from the /angular-toggle-switch sub-directory is putting the dependencies in the project directory.
Here is an example of how I think this is fixed. Perhaps there is a better way? I guess you don't see this problem if you are not running karma under your project directory.
myproject
+- .bowerrc <-- This tells bower to put my components into ./bower_components below
+- bower_components
+- angular-toggle-switch/
+- components/ <-- Karma looks for angular here
+- .bowerc <-- I think this is needed to make sure `bower install` in this directory uses ./components
I run tests using 2 consoles. One runs grunt watch
and the other runs grunt karma:unit
. Is this how you are running tests? Are you working on this within another project?
Basically, because I am building and testing angular-toggle-switch
within another project I need .bowerrc
to isolate angular-toggle-switch
from the project. I didn't think there was any harm adding a .bowerrc
. Feel free to reject it.
I want to get your knob code in. Can you cherry pick that onto a new branch and make a new PR? We can then work through the default attrs stuff on another PR.
Default labels are now fixed in 8fabe8216cab54a5c72f34d87986d5aa771618ce
Great!
Ok, let's try again. This should be clean. Forked from your master.
Changes:
1) Added
.bowerrc
. Bower was not using the correct directory on my machine because a.bowerrc
file was found in a parent directory. 2) Fixed issue when labels were not specified by usingattr.
instead of$scope.
. 3) Added tests for default labels. 4) Added knobLabel and tests.