gpt4 book ai didi

javascript - 如何将 meanjs v0.4.2 默认应用程序与 Bootstrap v3.3.7 主题集成

转载 作者:行者123 更新时间:2023-12-04 01:38:06 27 4
gpt4 key购买 nike

我已经知道如何将 Python-flask 和 WordPress 与 Bootstrap 集成。我也知道如何使用 generator-meanjs 的 yeomon CRUD 模块子生成器添加和更改新 CRUD 模块的行为和 View 。然而,我现在对 meanjs.org 平均堆栈应用程序生成器生成的文件结构感到不知所措。我知道与 MVC 模式相关的一般文件结构和交互。但是我如何集成使用 meanjs.org v0.4.2 生成的默认应用程序?用bootstrap v3.3.7 theme .我肯定可以让它以某种方式工作,但我更愿意从一开始就以正确的方式设置它。

在安装了 meanjs 的所有依赖项(nodejs、npm、bower ruby​​、sass、grunt-cli)之后,包括全局带有 meanjs 骨架的 yeamon 生成器:

sudo npm install -g yo
sudo npm install -g generator-meanjs

并生成默认的应用框架:

yo meanjs

使用此 CLI 菜单选项:

What mean.js version would you like to generate? 0.4.2
In which folder would you like the project to be generated? This can be changed later. (mean)
What would you like to call your application? (MEAN)
How would you describe your application? (Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js)
How would you describe your application in comma separated key words? (MongoDB, Express, AngularJS, and Node.js)
What is your company/author name? AUTHOR
Would you like to generate the article example CRUD module? Y
Would you like to generate the chat example module? Y

生成的文件夹结构可能包含与 Bootstrap 相关的文件:

/mean
/config
(some folders and files with configurations)
/modules
/core
/client
/controllers
header.client.controller.js
home.client.controller.js
/css
core.css
/views
(some other html files)
(some other folders)
/server
/controllers
core.server.controllers.js
errors.server.controller.js
/routes
core.server.routes.js
/services
menus.client.service.js
(another folder and js file)
/views
index.server.view.html
layout.server.view.html
(some other html files)
(another js file)
/tests
(nested folders /client and /server)
/users
(same structure like /core folder)
(and /articles and /chat which yould not be existend dependent on the cli menu selection)
/node_modules
(a lot of node modules)
/public
/lib
/angular-bootstrap
(some js, json and css files)
/bootstrap
(some folders and files)
(some other angular, jquery and other stuff)
/scripts
(shell and js script)
.bluemix
.git
(a lot of environment/tool configuration files)
(some javascript files ~ environment/tools)

主题文件夹/文件结构如下:

/css
bootstrap.css (= bootstrap v3.3.7 !?)
bootstrap.min.css (= bootstrap v3.3.7 !?)
scrolling-nav.css (theme specfic)
/fonts
(.eot, .svg, .ttf, woff and .woff2 glyphicons)
/js
bootstrap.js (= bootstrap v3.3.7 !?)
bootstrap.min.js (= bootstrap v3.3.7 !?)
jquery.easing.min.js (= bootstrap v3.3.7 !?)
jquery.js (= bootstrap v3.3.7 !?)
scrolling-nav.js (theme specifc)
index.hmtl (theme specific)
(license and readme file)

最佳答案

我不太确定将 bootstrap 与 Meanjs 集成是什么意思,根据我的说法,它已经集成在默认应用程序中。如果你去 config/assets/default.jsconfig/assets/production.js (一个用于开发,另一个用于生产)在client.lib.css下和 client.lib.js指定 Bootstrap 模块。这些模块加载在 modules/core/server/views/layout.server.view.html 中就在评论下<!-- Application CSS Files --><!--Application JavaScript Files-->应用程序启动时。

如果您想升级到最新的 Bootstrap,只需更改 bower.json 中的版本号即可文件并运行命令 bower update .

关于javascript - 如何将 meanjs v0.4.2 默认应用程序与 Bootstrap v3.3.7 主题集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39256251/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com