wauterboi
wauterboi16mo ago

Deno for SASS dependencies?

I'm trying to understand how I would migrate from Jekyll and NPM to Lume and Deno. Specifically, I used NPM to install some dependencies:
{
"dependencies": {
"breakpoint-sass": "^3.0.0",
"normalize-scss": "^7.0.1"
}
}
{
"dependencies": {
"breakpoint-sass": "^3.0.0",
"normalize-scss": "^7.0.1"
}
}
I would then instruct Jekyll to include node_modules when attempting to resolve SCSS filepaths. I'm not sure what the approach would be for Deno. Since these aren't libraries I'm actually using within my code, it seems inappropriate to stick them inside import maps. Would the solution be to use package.json and install using NPM as normal, or is there a better way to handle these SASS frameworks?
2 Replies
Óscar
Óscar16mo ago
These two dependencies are not updated very often, so I'd download them manually to my project, it's the simplest solution. Alternatively, you can use remoteFiles (https://lume.land/docs/core/remote-files/) to use these files without downloading. For example:
site.remoteFile("includes/scss/_breakpoint.scss", "https://unpkg.com/breakpoint-sass@3.0.0/stylesheets/_breakpoint.scss");
site.remoteFile("includes/scss/_breakpoint.scss", "https://unpkg.com/breakpoint-sass@3.0.0/stylesheets/_breakpoint.scss");
Remote files
Load remote files as fallback of missing local files
wauterboi
wauterboiOP16mo ago
That sounds great!