xatriumcss 1.0.20 → 1.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xatriumcss",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Ultra-fast utility-first CSS framework",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -34,11 +34,11 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@parcel/watcher": "^2.4.0",
37
- "glob": "^10.5.0"
37
+ "glob": "^10.5.0",
38
+ "@xatriumcss/oxide": "^4.1.18"
38
39
  },
39
40
  "devDependencies": {
40
- "@napi-rs/cli": "^2.18.0",
41
- "@xatriumcss/oxide": "^4.1.18"
41
+ "@napi-rs/cli": "^2.18.0"
42
42
  },
43
43
  "license": "MIT"
44
44
  }
@@ -1,12 +1,14 @@
1
- const fs = require('fs');
2
- const { glob } = require('glob');
1
+ import fs from 'fs';
2
+ import { glob } from 'glob';
3
+ import path from 'path';
3
4
 
4
5
  let nativeScanner;
5
6
  try {
6
- nativeScanner = require('../index');
7
- console.log("using native scanner")
7
+ const module = await import('@xatriumcss/oxide');
8
+ nativeScanner = module.default || module;
9
+ console.log("using native scanner");
8
10
  } catch (e) {
9
- console.log("using fallback scanner")
11
+ console.log("using fallback scanner");
10
12
  console.log("ERROR:", e.message);
11
13
  nativeScanner = null;
12
14
  }
@@ -354,7 +356,6 @@ function collectClassesJS(contentPaths) {
354
356
 
355
357
  // Apply base path if set
356
358
  if (sourceConfig.basePath) {
357
- const path = require('path');
358
359
  pathsArray = pathsArray.map(p => {
359
360
  const resolved = path.resolve(path.dirname(process.cwd()), sourceConfig.basePath, p);
360
361
  return resolved;
@@ -534,4 +535,4 @@ function collectClassesJS(contentPaths) {
534
535
  return Array.from(allClasses);
535
536
  }
536
537
 
537
- module.exports = collectClasses;
538
+ export default collectClasses;