【问题标题】:Laravel Bootstrap scaffolding to VUE scaffolding - how to?Laravel Bootstrap 脚手架到 VUE 脚手架 - 如何?
【发布时间】:2020-03-03 04:54:21
【问题描述】:

如果我使用 Bootstrap 脚手架创建了我的 Laravel 项目,则使用以下命令:

php artisan ui bootstrap

我需要创建新的 Laravel 项目来使用 VUE 脚手架,还是可以将 Bootstrap 脚手架项目转换为 VUE 脚手架项目?

运行这个命令是否安全:

php artisan ui vue

在 Laravel 项目之上,将其转换为 VUE 脚手架?

【问题讨论】:

  • Vue 脚手架已经使用 bootstrap
  • 很好,但我还没有创建 VUE 项目。现在我需要一种将其转换或更改为 VUE 的方法。换句话说:我需要将 VUE 添加到我的 Bootstrap (Laravel) 项目中,反之亦然。

标签: laravel vue.js bootstrap-4


【解决方案1】:

简短的回答,是的,它是安全的

您可以使用 Bootstrap 拥有一个现有的脚手架项目并安装 vue 脚手架(即使使用 auth)并安全编译和运行,因为 Vue 脚手架在 bootstrap.js 中默认包含 Twitter Bootstrap 库

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');

    require('bootstrap');
} catch (e) {}

所有的身份验证和布局视图都是用 TWBS 类设计的

专业提示

如果你想在重要项目上测试一些东西而不把事情搞砸,你可以创建一个新的 git 分支

git branch testing-vue-scaffolding
git checkout testing-vue-scaffolding

随心所欲地修补,如果弄乱了就恢复更改

我有两个很酷的 shell 别名可以快速完成这项工作

alias nah="git clean -df && git checkout -- . && git reset --hard HEAD"
alias wip="git add . && git commit -s -S -m 'Work In Progress' -m 'This is a trash commit to save changes'"

使用wip 保存更改,当您觉得事情搞砸时,只需运行nah 即可返回

希望对你有帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-22
    • 2014-08-14
    • 2017-05-01
    • 1970-01-01
    相关资源
    最近更新 更多