Skip to content

Commit

Permalink
chore: drop node-sass and update carbon css
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jun 24, 2024
1 parent 44579b8 commit 825a738
Show file tree
Hide file tree
Showing 4 changed files with 7,473 additions and 6,389 deletions.
35 changes: 14 additions & 21 deletions buildSass.mjs
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));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"@types/mapbox__tilebelt": "^1.0.4",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"carbon-components": "10.58.12",
"cssnano": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-svelte3": "^4.0.0",
"node-sass": "^9.0.0",
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.5",
"sass": "^1.77.6",
Expand Down
Loading

0 comments on commit 825a738

Please sign in to comment.