Skip to content

Commit

Permalink
feat(sass): allow sass to be used as a scss compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
wisestmumbler committed Jun 14, 2021
1 parent 651ec58 commit b342bc3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# opensphere-build-resolver

Resolves sources and other input for the Google Closure Compiler, sass for node-sass, template views for angular, and other items through a project's dependency tree.
Resolves sources and other input for the Google Closure Compiler, scss for sass/node-sass, template views for angular, and other items through a project's dependency tree.

## Problem
You want to use npm to manage your project and its dependencies, but you need to resolve source, css, sass, templates, or other resources from those dependencies and pass them as arguments on the command line to tools like the google-closure-compiler, node-sass, and others.
You want to use npm to manage your project and its dependencies, but you need to resolve source, css, scss, templates, or other resources from those dependencies and pass them as arguments on the command line to tools like the google-closure-compiler, sass/node-sass, and others.

## Solution
This.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opensphere-build-resolver",
"version": "8.0.0",
"description": "Resolves projects, their dependencies, plugins, and config to the correct arguments for compilation via the Google Closure Compiler, node-sass, and other tools.",
"description": "Resolves projects, their dependencies, plugins, and config to the correct arguments for compilation via the Google Closure Compiler, sass/node-sass, and other tools.",
"bin": {
"os-resolve": "./resolve.js"
},
Expand Down
9 changes: 6 additions & 3 deletions plugins/scss/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ const addScssRequires = function(pack, dir) {

const writer = function(thisPackage, outputDir) {
if (scssPaths.length || scssEntries.length) {
var options = {
'include-path': scssPaths
};
var options = {};
if (thisPackage.build.scssCompiler === 'sass') {
options['load-path'] = scssPaths
} else {
options['include-path'] = scssPaths
}

var args = [];

Expand Down

0 comments on commit b342bc3

Please sign in to comment.