简体   繁体   English

Laravel Jetstream 安装 Bootstrap 和 Jquery

[英]Laravel Jetstream install Bootstrap and Jquery

I've installed Jetstream and Livewire to my Laravel 8 project.我已将 Jetstream 和 Livewire 安装到我的 Laravel 8 项目中。 But i couldn't figure out how to include JQuery and Bootstrap to my project.但我不知道如何将 JQuery 和 Bootstrap 包含到我的项目中。 How can i do that?我怎样才能做到这一点?

EDIT: Bootstrap part is understood but still can't install Jquery.编辑:引导部分已被理解,但仍无法安装 Jquery。

JQUERY part JQUERY 零件

As @codedge said i tried to run npm require jquery command both in my project folder and in somewhere else and it gave me this output:正如@codedge 所说,我试图在我的项目文件夹和其他地方运行npm require jquery命令,它给了我这个 output:

Usage: npm <command>

where <command> is one of:
    access, adduser, audit, bin, bugs, c, cache, ci, cit,
    clean-install, clean-install-test, completion, config,
    create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
    edit, explore, fund, get, help, help-search, hook, i, init,
    install, install-ci-test, install-test, it, link, list, ln,
    login, logout, ls, org, outdated, owner, pack, ping, prefix,
    profile, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, token, tst, un,
    uninstall, unpublish, unstar, up, update, v, version, view,
    whoami

npm <command> -h  quick help on <command>
npm -l            display full usage info
npm help <term>   search for help on <term>
npm help npm      involved overview

Specify configs in the ini-formatted file:
    C:\Users\YARKIN\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@6.14.10 D:\nodejs\node_modules\npm

Did you mean this?
    rebuild

EDIT-2: I can't add Jquery to my public\js\app.js eventhough i have is installed and required it it resources\js\app.js. EDIT-2:我无法将 Jquery 添加到我的 public\js\app.js 中,尽管我已经安装并需要它 resources\js\app.js。

Jetstream does not support Bootstrap and jQuery - this is by intention as explained in this Github issue . Jetstream 不支持 Bootstrap 和 jQuery - 这是有意的,如此Github 问题中所述。

There is a package that brings the support for Bootstrap to Jetstream: https://github.com/nascent-africa/jetstrap有一个 package 为 Jetstream 带来了对 Bootstrap 的支持: https://github.com/nascent-africa/jetstrap

jQuery can be installed via npm install jquery and required in your app.js . jQuery 可以通过npm install jquery并在您的app.jsrequired

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM