-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: drop node-sass and update carbon css
- Loading branch information
1 parent
44579b8
commit 825a738
Showing
4 changed files
with
7,473 additions
and
6,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
import sass from 'node-sass'; | ||
import * as sass from 'sass'; | ||
import fs from 'fs'; | ||
|
||
const outputPath = './src/carbon.css'; | ||
sass.render( | ||
{ | ||
file: './src/carbon.scss', | ||
includePaths: ['./node_modules'], | ||
outFile: outputPath, | ||
}, | ||
function (err, result) { | ||
if (!err) { | ||
// No errors during the compilation, write this result on the disk | ||
fs.writeFile(outputPath, result.css, function (err) { | ||
if (err) { | ||
console.error(err); | ||
//file written on disk | ||
} | ||
}); | ||
} else { | ||
console.error(err); | ||
} | ||
} | ||
); | ||
sass | ||
.compileAsync('./src/carbon.scss', { | ||
loadPaths: ['./node_modules'], | ||
}) | ||
.then((result) => { | ||
fs.writeFile(outputPath, result.css, function (err) { | ||
if (err) { | ||
console.error(err); | ||
//file written on disk | ||
} | ||
}); | ||
}) | ||
.catch((err) => console.error(err)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.