Using “npm install” to install jquery-ui

倖福魔咒の 提交于 2019-12-03 02:02:31

jQuery-ui specifically needs to be build after installation. To avoid this, use npm install jquery-ui-dist

T J gave the right answer, but it is a bit short / too generic...

The GitHub project is at https://github.com/jquery/jquery-ui/
So the real command would be npm install github:jquery/jquery-ui (you can even skip github: as npm defaults to it).
But this would bring you the latest, unstable version (around 1.12 at time of writing), and it didn't even work when I tried.
So it is better to fetch a tagged version:

npm install github:jquery/jquery-ui#1.11.4

Generic note: AFAIK, if the project hasn't a package.json file, this kind of install can still fail.

Here is the current latest version (1.11.4), same package that bower is using, including all themes.

npm install github:components/jqueryui#1.11.4

You can install it like

npm install github:mygithubuser/myproject

as mentioned in the install documentation

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