如何安装 Dart Sass? [英] How to install Dart Sass?

查看:188
本文介绍了如何安装 Dart Sass?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站上的说明说:

您可以在 Windows、Mac 或 Linux 上安装 Sass,方法是从 GitHub 下载适用于您的操作系统的软件包并将其添加到您的 PATH.这就是全部 - 没有外部依赖项,您无需安装其他任何东西.

我从这里下载了 Windows 包:

  • 点击环境变量"

  • 在系统变量下找到PATH变量,选择它,然后点击编辑".

  • 如果没有PATH变量,点击新建",这里写PATH.

  • 转到您的 dard-sass 文件夹并复制目录.

  • 将您的目录添加到变量值的开头,后跟 ;(分号).例如,如果值为 C:\Windows\dart-sass,请将其更改为 C:\Users\Me\bin;C:\Windows\dart-sass.如果没有其他目录,只需在此处添加您的目录.然后单击确定".

  • 打开命令提示符".

  • 在这里写上sass --version"并点击回车以确保它安装正确.

  • 创建 style.scss 和 style.css 文件.

  • 在命令提示符cd"上写入您的目录(style.scss 和 style.css 文件在哪里).例如cd Desktop\webdev"

  • 然后写这个sass --watch style.scss style.css".然后最小化它.

  • 就是这样.您可以打开文本编辑器,然后打开 style.scss 文件并编写 Sass 代码.它会自动编译为 css 代码.

  • https://katiek2.github.io/path-doc/

    The instructions on the website say:

    You can install Sass on Windows, Mac, or Linux by downloading the package for your operating system from GitHub and adding it to your PATH. That's all—there are no external dependencies and nothing else you need to install.

    I downloaded the Windows package from here: https://github.com/sass/dart-sass/releases/tag/1.10.1 and now what? Where do I place the zip? Do I need to extract it? I have no idea what this means - "To install Dart Sass 1.10.1, download one of the packages above and add it to your PATH." Sass is not being recognized when I try to check the version from the command line.

    Can someone provide a step by step guide?

    I've also installed Ruby, if it matters (but I don't want Ruby Sass, I want Dart Sass).

    解决方案

    For windows 10

    1. Go here dart-sass and download dart-sass which is suitable for your operating system.

    2. Extract it where you want.

    3. Open windows search and search this "system environment variables" then click it to open.

    4. Click "Environment Variables"

    5. Under system varibles find the PATH variable, select it, and click "Edit".

    6. If there is no PATH variable, click "New" and write here PATH.

    7. Go your dard-sass folder and copy directory.

    8. Add your directory to the beginning of the variable value followed by ; (a semicolon). For example, if the value was C:\Windows\dart-sass, change it to C:\Users\Me\bin;C:\Windows\dart-sass. If there is not another directory just add your directory here. Then click "Ok".

    9. Open "Command Prompt".

    10. Write here "sass --version" and click enter to be sure it installed correctly.

    11. Create style.scss and style.css file.

    12. Write on Command Prompt "cd" then your directory(where is style.scss and style.css file). For example "cd Desktop\webdev"

    13. Then write this "sass --watch style.scss style.css". Then minimize it.

    14. That's it. You can open your text editor then style.scss file and write your Sass code. It's automatically compile to the css code.

    https://katiek2.github.io/path-doc/

    这篇关于如何安装 Dart Sass?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆