让 Foundation 使用 Laravel - 没有 SCSS 文件夹

Getting Foundation working with Laravel - no SCSS folder

我一直在尝试按照 this tutorial 让 Foundation 与 Laravel 8 一起工作,但我卡在了第 4 步,因为我的资源中根本没有 SCSS 文件夹文件夹:

resources 
-- css
-- js
-- lang
-- views

为什么会这样,我如何确保拥有所有必要的文件和文件夹以继续遵循该指南并让 Foundation 与 Laravel 一起工作?

相反,执行此操作(60 秒安装):

  1. 将以下内容添加到您的 composer.json
    "dijitaq/foundation-for-laravel": "^1.2",

    ...

    "repositories": [
        {
            "type": "vcs",
            "url":  "https://github.com/jeremykenedy/foundation-for-laravel.git"
        }
    ],

完成后看起来像这样:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "dijitaq/foundation-for-laravel": "^1.2",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.12",
        "laravel/tinker": "^2.5",
        "laravel/ui": "^3.2"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "repositories": [
        {
            "type": "vcs",
            "url":  "https://github.com/jeremykenedy/foundation-for-laravel.git"
        }
    ],
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\": "app/",
            "Database\Factories\": "database/factories/",
            "Database\Seeders\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}
  1. 运行 composer update
  2. 运行 composer require laravel/ui
  3. 运行 php artisan ui bootstrap * 如果您没有 sass 文件夹。
  4. 运行 php artisan foundation-ui --auth
  5. 运行 npm install && npm run dev

这是我为您整理的一个工作示例:

这是我为 PR 制作的回购协议的分支:

最终结果截图: