xatriumcss 1.0.21 → 1.0.23
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 +1 -1
- package/src/collectClasses.js +8 -7
- package/src/parser.js +1 -1
package/package.json
CHANGED
package/src/collectClasses.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
7
|
-
|
|
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
|
-
|
|
538
|
+
export default collectClasses;
|
package/src/parser.js
CHANGED