harvesthq/chosen

Hard dependency to create css and js

rajibahmed opened this issue · 6 comments

Hi,

I use bower to manage all our external js libs. Previously when we used bower chosen had precompiled css and js. We just needed to point to that file. And use compressor compress it.

But as our servers don't have Ruby and Node installed we now need to add a two step before minification. Is it possible to include all the js an css into a doc folder which we can use.

We have decided not to included generated files in our repo. You can get the url of the zipped file from the releases page and then specify it in your bower.json file

{
  "name": "my_project",
  "version": "0.0.1",
  "dependencies": {
    "chosen": "https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip"
  }
}

@kenearley Would it make sense to unregister the Bower component if Chosen is not including generated files in the repository? Or am I misunderstanding the situation here?

Also, when I attempt to install the generated Chosen files via the zip URL I'm hitting an error. Thoughts?

→ bower install https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip --save-dev
bower chosen_v1.0.0#*       not-cached https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip#*
bower chosen_v1.0.0#*          resolve https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip#*
bower chosen_v1.0.0#*         download https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip
bower chosen_v1.0.0#*          extract chosen_v1.0.0.zip
bower chosen_v1.0.0#*           ENOENT ENOENT, open '/var/folders/c0/wt9nm_tj2xn24r7r9wzt2zc80000gp/T/username/bower/chosen_v1.0.0-34278-yL049b/docsupport/'

Stack trace:
Error: ENOENT, open '/var/folders/c0/wt9nm_tj2xn24r7r9wzt2zc80000gp/T/username/bower/chosen_v1.0.0-34278-yL049b/docsupport/'

Console trace:
Trace
    at StandardRenderer.error (/usr/local/lib/node_modules/bower/lib/renderers/StandardRenderer.js:74:17)
    at Logger.updateNotifier.packageName (/usr/local/lib/node_modules/bower/bin/bower:109:18)
    at Logger.EventEmitter.emit (events.js:95:17)
    at Logger.emit (/usr/local/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
    at /usr/local/lib/node_modules/bower/lib/commands/install.js:27:16
    at _rejected (/usr/local/lib/node_modules/bower/node_modules/q/q.js:808:24)
    at /usr/local/lib/node_modules/bower/node_modules/q/q.js:834:30
    at Promise.when (/usr/local/lib/node_modules/bower/node_modules/q/q.js:1079:31)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/node_modules/q/q.js:752:41)
    at /usr/local/lib/node_modules/bower/node_modules/q/q.js:574:44

System info:
Bower version: 1.2.8
Node version: 0.10.24
OS: Darwin 13.0.2 x64

I am getting the same as @dcalhoun, is there any solutions or fixes to this? @kenearley

stof commented

For the error when downloading the zip, you should contact the bower support, not the Chosen team. We are not providing support for issues in bower itself. Thus, none of the core devs are using bower

for the removal, I requested it in bower/bower#120 (comment)

I created a bower package for chosen. Get it with bower install chosen-bower.

bower install chosen

As of 1.4.2, Chosen supports bower installs. Read the 1.4.2 release notes for details.