简体   繁体   中英

Laravel with XAMPP with SASS/SCSS

I'm using Laravel locally with XAMPP, with some code written by someone else. After installing everything I get the following directory tree:

xampp
    ...
    htdocs
        myproj
            .git
            app
                assets
                classes
                commands
                config
                controllers
                database
                lang
                models
                start
                storage
                tests
                views
            bootstrap
            provider
            public
            sphinx
            vendor
            wpplugin
        ...
    ...

I know the code uses Zurb Foundation (among other tools), with SCSS files.

In XAMPP Control Panel, in the Apache httpd.conf, I define DocumentRoot as C:/xampp/htdocs/myproj/public and this works fine.

The files xxxxxx.blade.php under views/layouts contain blade lines that look like:

{{ stylesheet_link_tag('yyyyyy') }}

Googling this, I think (not sure) it's using something called CodeSleeve to resolve yyyyyy, which, as I understand, look for yyyyyy.css files under app/assets/stylesheets . In this directory I can see both yyyyyy.css files and _yyyyyy.scss files, and I can see the former is presumably calling the latter with a require command in an alleged comment.

As long as I update controllers and/or views, I can see the changes reflected immediately under localhost in the browser. However, any attempt to modify a _yyyyyy.scss (even as much as adding a space) - results in an error in browsing, losing all the styling etc.

My question is: What is the mechanism that presumably converts the SCSS files into CSS in real-time, and how can I do testing locally with modifying the SCSS files?

It's Notepad adding the UTF-8 BOM in the beginning of the file!!

When editing with Notepad++ and saving the new file with no BOM, styling comes back again.


(Thanks to Andy who helped solving this)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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