text Sage 9 |在Composer中创建新项目

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Sage 9 |在Composer中创建新项目相关的知识,希望对你有一定的参考价值。

Install a new site to localhost.
cd to the themes directory and run:
\!h composer create-project roots/sage theme-name
Latest version should install, if not update to at least PHP 7 and try again.
On Mac, you will be prompted to answer a few questions about the theme. Eventually you will be asked which framework you want to use, select option 0 to install no framework, or select the option for the framework you would like to use.
On Windows, you will need to cd to the new theme’s directory, and then run the following 3 commands, 1 at a time. Answer all the prompts to complete the Windows setup (https://discourse.roots.io/t/no-option-prompts-for-composer-sage-install-on-windows/11339/3).
Use PowerShell to run these commads.
\!h ./vendor/bin/sage meta
\!h ./vendor/bin/sage config
\!h ./vendor/bin/sage preset
Again, select option 0 when asked which framework you want to use for no framework, or select the framework you would like.
Open app/setup.php, copy/paste and then update the two lines for enqueuing css and js files. Add the sources for your new framework. Alternatively, add them to the appropriate blade.php files.
Optional – open the file resources/assets/build/webpack.config.js and comment out line 180- 183. Stylelint is very strict and could hold you back from working on projects.
Run yarn && yarn build to build the project.
Run yarn start to watch the project.
Cancel the watch (ctrl + c) and then run yarn build to build the main assets folders and files. Yarn start only watches, it doesn’t build at the same time.

以上是关于text Sage 9 |在Composer中创建新项目的主要内容,如果未能解决你的问题,请参考以下文章

无法在 Laravel 中创建 composer .cache 目录

text 用于Wordpress的Sage 9上的Fontawesome SVG

Git 无法在 Azure DevOps 中创建标记

Vagrant 同步文件夹上的 Composer 错误

自动加载中的 Laravel 5.1 Composer.json 调用文件

text 在CLI中创建MySQL用户