vaderjs 1.3.3-alpha-83 → 1.3.3-alpha-85

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vader.js +13 -7
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "vaderjs",
3
3
  "description": "A Reactive library aimed to helping you build reactive applications inspired by react.js",
4
4
  "module": "vader.js",
5
- "version": "1.3.3-alpha-83",
5
+ "version": "1.3.3-alpha-85",
6
6
  "bin": {
7
7
  "vader": "./vader.js"
8
8
  },
package/vader.js CHANGED
@@ -621,9 +621,17 @@ function Compiler(func, file) {
621
621
 
622
622
  break;
623
623
  case path && path.includes('module.css'):
624
- let css = fs.readFileSync(process.cwd() + path, 'utf8')
625
- css = css.replaceAll('.', '')
626
- newImport = `let ${name} = ${JSON.stringify(parse(css))}`
624
+
625
+ path = path.replace(';', '')
626
+ path = path.replace(/'/g, '').trim().replace(/"/g, '').trim()
627
+ path = path.replaceAll('.jsx', '.js');
628
+ path = path.replaceAll('../', '');
629
+
630
+ let css = fs.readFileSync(process.cwd() + '/' + path, 'utf8')
631
+
632
+ css = css.replaceAll('.', '')
633
+ newImport = `let ${name} = ${JSON.stringify(parse(css))}`
634
+ string = string.replace(beforeimport, newImport)
627
635
  break;
628
636
  case path && path.includes('.css'):
629
637
  newImport = ``
@@ -643,8 +651,7 @@ function Compiler(func, file) {
643
651
  path = '/src/' + path
644
652
  } else if (path.startsWith('src') || path.startsWith('public')) {
645
653
  path = '/' + path
646
- }
647
- console.log(path)
654
+ }
648
655
  path = path.replaceAll('.jsx', '.js');
649
656
 
650
657
 
@@ -874,8 +881,7 @@ async function Build() {
874
881
 
875
882
  scannedFiles.forEach(async (file) => {
876
883
  file = file.split(process.cwd() + '/runtime/')[1]
877
-
878
- console.log(file)
884
+
879
885
  let objCase = {
880
886
  ...file == "app.js" ? { exit: true } : null,
881
887
  ...file.includes("index.html") && fs.existsSync(process.cwd() + "/runtime/" + file) ? { exit: true } : null,