esm-styles 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/build.js CHANGED
@@ -24,7 +24,7 @@ export async function build(configPath = 'esm-styles.config.js') {
24
24
  const mainCssFile = config.mainCssFile || 'styles.css';
25
25
  // Helper function to generate CSS comment header
26
26
  const generateCssComment = (sourceName) => {
27
- const normalizedBasePath = (config.basePath || '.').replace(/^\.\//, '');
27
+ const normalizedBasePath = (config.basePath || '.').replace(/^\.*\//, '');
28
28
  const sourceFilePath = path.join(normalizedBasePath, config.sourcePath || '', `${sourceName}${suffix}`);
29
29
  return `/* This CSS was automatically generated from ${sourceFilePath}, do not edit directly */\n`;
30
30
  };
@@ -224,7 +224,7 @@ export async function build(configPath = 'esm-styles.config.js') {
224
224
  }
225
225
  const importedFloorFiles = floorFiles.filter(isImportedFloor);
226
226
  const floorImports = importedFloorFiles.map(importStatement).join('\n');
227
- const normalizedBasePath = (config.basePath || '.').replace(/^\.\//, '');
227
+ const normalizedBasePath = (config.basePath || '.').replace(/^\.*\//, '');
228
228
  const mainCssComment = `/* This CSS was automatically generated as the main styles file from ${normalizedBasePath}, do not edit directly */\n`;
229
229
  const mainCss = mainCssComment +
230
230
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esm-styles",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "A library for working with ESM styles",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",