You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
353 B
16 lines
353 B
const isWin = /^win/.test(process.platform);
|
|
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path);
|
|
|
|
module.exports = {
|
|
normalizePath,
|
|
generateAsset (stringSource) {
|
|
return {
|
|
size () {
|
|
return Buffer.byteLength(stringSource, 'utf8');
|
|
},
|
|
source () {
|
|
return stringSource;
|
|
},
|
|
};
|
|
},
|
|
};
|
|
|