Closed vorko closed 10 years ago
hi, i check tonight
it's working for the minified js. Thanks a lot.
( there is always the problem with yeoman / bower => after a bower update and a grunt serve, .css is deleted on the index.html )
hello vorko, I have installed last version with bower just now but I can not figured out what problem you get.
index.html is just an example file, you do not need it for your own app.
give me some details, I will try helping you to fix problem.
i use yeoman ( http://yeoman.io/) for my angularjs project. there is an index.html main page . when i install a package ( like ng-select ), i do a bower install ng-slider --save. and when i do grunt serve , the new component is added automatically in my index.html in a special part for css and for js like this
<!-- build:css styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/ng-table/ng-table.css" />
<link rel="stylesheet" href="bower_components/angular-dialog-service/dialogs.css" />
<link rel="stylesheet" href="bower_components/select2/select2.css" />
<link rel="stylesheet" href="bower_components/bootstrap-switch/build/css/bootstrap3/bootstrap-switch.css" />
<link rel="stylesheet" href="bower_components/selectize/dist/css/selectize.css" />
<!-- endbower -->
and for all the other component, .css and .js are added, but with ng-slider, there is only the minified js, not the .css.
actually i got a workaround : i put it in the manual part because if i put it the bower part, every grunt serve shoot it...
i think it's a problem in the package or bower file. ( in other extension, there is the .css and the .js on the files ) like that
{
"name": "bootstrap-switch",
"description": "Unofficial bootstrap switch",
"version": "1.9.0",
"main": [
"build/js/bootstrap-switch.js",
"build/css/bootstrap3/bootstrap-switch.css"
],
"ignore": [
"docs"
],
"dependencies": {
"jquery": ">=1.9.0"
}
}
i try to add .css like that but it does nothing. maybe the ng-slider gruntfile is not compatible.
I see you are right I gonna change something in bower.json. Thanks for all details
hi @vorko normally fixed, I do not know about bower cache, let me know.
@vorko, any feedback ? ;)
sorry, i forgot to test... i just try and it doesn't work. now there no .css or .js added by grunt serve.
even with '0.1.4' version ?
or looks like bower do not want any minified files, I have to change something again, I will try
yes i got the last version. with previous version, .js was here but not the .css.
maybe it's the grunt script of yeoman.
that is weird and if no js now...not good. I have just launched a 'bower install ng-slider' in a temp folder and get the correct directories. Then I do not know with yeoman as I have just use it a little. I have also checked some other packages, and bower main array resources ( minified or not ) seems to be a common way...
npm install -g yo
npm install -g generator-angular
yo angular
with that you got an empty angularjs app.
grunt serve to launch the first build. stop it
after that do bower install ng-slider --save
and launch grunt serve again, it should add .css and .js in the index.html page of the app.
maybe you can try to use another component to see how it's working
oh so nice I check it soon
oops sorry until now I forget to come back to this issue
bower automatically use bower_components/ng-slider/dist/ng-slider.min.js and i got this error :
with bower_components/ng-slider/src/ng-slider.js , there's no problem...
am i making something wrong ?