mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-26 07:24:55 +02:00
refactor: convert local images to data URIs
I’ve added a SCSS function that, when passed a file path, will inject the file as a data URI. This is super helpful since it ensures that the cursor images will always be available for the CSS. This issue currently prevents the npm version of the library from being usable at all.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
const { types } = require('node-sass'); /* eslint-disable-line import/no-extraneous-dependencies */
|
||||
|
||||
const getBuildData = require('./getBuildData');
|
||||
const getFileAsDataURI = require('./getFileAsDataURI');
|
||||
|
||||
module.exports = {
|
||||
'build-data()': () => types.String(getBuildData(true)),
|
||||
'get-file-as-data-uri($filepath)': filepath => types.String(getFileAsDataURI(filepath)),
|
||||
};
|
||||
|
Reference in New Issue
Block a user