You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,6 @@ When you're developing your application, you want to run Dart Sass in watch mode
16
16
1. Run `./bin/bundle add dartsass-rails`
17
17
2. Run `./bin/rails dartsass:install`
18
18
19
-
20
19
## Building in production
21
20
22
21
The `dartsass:build` is automatically attached to `assets:precompile`, so before the asset pipeline digests the files, the Dart Sass output will be generated.
@@ -39,6 +38,30 @@ The hash key is the relative path to a Sass file in `app/assets/stylesheets/` an
39
38
## Importing assets from gems
40
39
`dartsass:build` includes application [assets paths](https://guides.rubyonrails.org/asset_pipeline.html#search-paths) as Sass [load paths](https://sass-lang.com/documentation/at-rules/use#load-paths). Assuming the gem has made assets visible to the Rails application, no additional configuration is required to use them.
41
40
41
+
## Migrating from sass-rails
42
+
43
+
If you're migrating from [sass-rails](https://github.com/rails/sass-rails)
44
+
(applies to [sassc-rails](https://github.com/sass/sassc-rails) as well)
45
+
and want to switch to dartsass-rails, follow these instructions below:
46
+
47
+
1. Remove the sass-rails gem from the Gemfile by running
48
+
49
+
```
50
+
./bin/bundle remove sass-rails
51
+
```
52
+
53
+
1. Install dartsass-rails by following the
54
+
[Installation](#installation) instructions above
55
+
56
+
1. Remove any references to Sass files from the Sprockets manifest file:
57
+
`app/assets/config/manifest.js`
58
+
59
+
1. In your continues integration pipeline, before running any tests that
60
+
interacts with the browser, make sure to build the Sass files by running:
0 commit comments