File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
- EXEC_PATH = "#{ Pathname . new ( __dir__ ) . to_s } /../../exe/dartsass"
1
+ EXEC_PATH = "#{ Pathname . new ( __dir__ ) . to_s } /../../exe/dartsass"
2
+ CSS_LOAD_PATH = Rails . root . join ( "app/assets/stylesheets" )
3
+ CSS_BUILD_PATH = Rails . root . join ( "app/assets/builds" )
2
4
3
5
def dartsass_build_mapping
4
6
Rails . application . config . dartsass . builds . map { |input , output |
5
- "#{ Rails . root . join ( "app/assets/stylesheets" , input ) } :#{ Rails . root . join ( "app/assets/builds" , output ) } "
7
+ "#{ CSS_LOAD_PATH . join ( input ) } :#{ CSS_BUILD_PATH . join ( output ) } "
6
8
} . join ( " " )
7
9
end
8
10
11
+ def dartsass_load_path
12
+ "--load-path #{ CSS_LOAD_PATH } "
13
+ end
14
+
9
15
def dartsass_compile_command
10
- "#{ EXEC_PATH } #{ dartsass_build_mapping } "
16
+ "#{ EXEC_PATH } #{ dartsass_load_path } #{ dartsass_build_mapping } "
11
17
end
12
18
13
19
namespace :dartsass do
You can’t perform that action at this time.
0 commit comments