how to include a private local file in javascript project using bower

爷,独闯天下 提交于 2019-12-03 22:49:44

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.

It should be just /relative/path/to/beautify.js. No 'file:/'.

"beautify": "/path/to/beautify.js"

If you have bower installed you can do this from the commandline

bower install ../beautify.js -S

Assuming the local repo is a directory next to your current directory. This is just a testing approach and should be an available repo for general use


EDIT

It looks like you also need to tag your repo so you will pick up the latest changes too

git tag v0.0.2
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!