how to include a private local file in javascript project using bower
bower, javascript
Solution
The code below didn't work for me using Bower 1.2.8 on Ubuntu.
`"beautify": "/path/to/beautify.js"`
What did work was using: `"beautify": "./path/to/beautify.js"`. This way the path is pointing to the file relative from the directory where bower.json resides.
Problem
i want to include a custom file as one of the bower dependency. I am have the following bower.json ``` { "name": "xyz", "version": "0.0.0", "dependencies": { "sass-bootstrap": "~2.3.0", "requirejs": "~2.1.4", "modernizr": "~2.6.2", "jquery": "~1.9.1", "beautify": "file:/path/to/beautify.js" }, "devDependencies": {} } ``` But when i do bower install it gives error : ``` bower beautify#* ENOTFOUND Package file:/path/to/beautify.js not found ``` however when i open the same path in browser i get the right file. I have also checked the case sensitive of the path. Now can any one tell me what error i am doing? Is there any thing wrong with the syntax? Also tell me what if i want to add the same via bower cache. Where the global bower cache is stored in mac? And how can we register the url of private package so that i just need to put name of the package in `bower.json` and bower finds the file from the cache?