@lmjs/cli 1.0.33 → 1.0.35

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.
@@ -5,8 +5,8 @@ const path = require('path');
5
5
  const fs = require("fs");
6
6
  const fcs = require("./fcs.js");
7
7
  const BEA_Libs = {
8
- "BEACSS": "https://s.beacdn.com/beacss/latest",
9
- "BEAJS": "https://s.beacdn.com/beajs/latest"
8
+ "BEACSS": "https://s.beacdn.com/beacss/latest",
9
+ "BEAJS": "https://s.beacdn.com/beajs/latest"
10
10
  };
11
11
  const m = process.version.match(/(\d+)\.(\d+)\.(\d+)/);
12
12
  if (!semver.satisfies(m[0].toString(), '>=12')) {
package/lib/fcs.js CHANGED
@@ -143,22 +143,22 @@ function create(conf) {
143
143
 
144
144
  fs.writeFileSync(
145
145
  filePath +
146
- path.sep +
147
- "src" +
148
- path.sep +
149
- "js" +
150
- path.sep +
151
- "bea.js",
146
+ path.sep +
147
+ "src" +
148
+ path.sep +
149
+ "js" +
150
+ path.sep +
151
+ "bea.js",
152
152
  String(beajs.data)
153
153
  );
154
154
  fs.writeFileSync(
155
155
  filePath +
156
- path.sep +
157
- "src" +
158
- path.sep +
159
- "css" +
160
- path.sep +
161
- "bea.css",
156
+ path.sep +
157
+ "src" +
158
+ path.sep +
159
+ "css" +
160
+ path.sep +
161
+ "bea.css",
162
162
  String(beacss.data)
163
163
  );
164
164
  });
@@ -436,22 +436,22 @@ function processCommands(cmd) {
436
436
  fs.writeFileSync(libsPath + path.sep + "bea.css", String(beacss));
437
437
  fs.writeFileSync(
438
438
  filePath +
439
- path.sep +
440
- "src" +
441
- path.sep +
442
- "js" +
443
- path.sep +
444
- "bea.js",
439
+ path.sep +
440
+ "src" +
441
+ path.sep +
442
+ "js" +
443
+ path.sep +
444
+ "bea.js",
445
445
  String(beajs)
446
446
  );
447
447
  fs.writeFileSync(
448
448
  filePath +
449
- path.sep +
450
- "src" +
451
- path.sep +
452
- "css" +
453
- path.sep +
454
- "bea.css",
449
+ path.sep +
450
+ "src" +
451
+ path.sep +
452
+ "css" +
453
+ path.sep +
454
+ "bea.css",
455
455
  String(beacss)
456
456
  );
457
457
  spinner.succeed("Successfully Purged!");
@@ -592,17 +592,28 @@ var _beaTn = "` +
592
592
  dest + path.sep + "css" + path.sep + "bea.css",
593
593
  String(beaCSSCode)
594
594
  );
595
+
596
+ let _dT = new Date().getTime();
597
+ fs.renameSync(
598
+ dest + path.sep + "js" + path.sep + "bea.js",
599
+ dest + path.sep + "js" + path.sep + "app." + _dT + ".js"
600
+ );
601
+ fs.renameSync(
602
+ dest + path.sep + "js" + path.sep + "bea.js",
603
+ dest + path.sep + "js" + path.sep + "app." + _dT + ".css"
604
+ );
605
+
595
606
  fs.writeFileSync(
596
607
  dest + path.sep + "index.html",
597
608
  String(indexCode)
598
609
  .split('<script src="/index.js" type="text/javascript"></script>')
599
610
  .join("")
600
611
  .split("/js/bea.js")
601
- .join("/js/bea.js?v" + new Date().getTime())
612
+ .join("/js/app." + _dT + ".js")
602
613
  .split("/css/styles.css")
603
614
  .join("/css/styles.css?v" + new Date().getTime())
604
615
  .split("/css/bea.css")
605
- .join("/css/bea.css?v" + new Date().getTime())
616
+ .join("/css/app." + _dT + ".css")
606
617
  );
607
618
  } else {
608
619
  copyDir(`${__dirname}` + path.sep + `files` + path.sep + buildPath, dest);
@@ -620,12 +631,12 @@ var _beaTn = "` +
620
631
  var appCode = fs.readFileSync(appFile, "utf8");
621
632
  var serverJsCode = fs.readFileSync(
622
633
  `${__dirname}` +
623
- path.sep +
624
- `files` +
625
- path.sep +
626
- buildPath +
627
- path.sep +
628
- "server.js",
634
+ path.sep +
635
+ `files` +
636
+ path.sep +
637
+ buildPath +
638
+ path.sep +
639
+ "server.js",
629
640
  "utf8"
630
641
  );
631
642
  fs.writeFileSync(
@@ -659,6 +670,31 @@ var _beaTn = "` +
659
670
  dest + path.sep + "src" + path.sep + "css" + path.sep + "bea.css",
660
671
  String(beaCSSCode)
661
672
  );
673
+
674
+
675
+ let _dT = new Date().getTime();
676
+ fs.renameSync(
677
+ dest + path.sep + "src" + path.sep + "js" + path.sep + "bea.js",
678
+ dest + path.sep + "src" + path.sep + "js" + path.sep + "app." + _dT + ".js"
679
+ );
680
+ fs.renameSync(
681
+ dest + path.sep + "src" + path.sep + "js" + path.sep + "bea.js",
682
+ dest + path.sep + "src" + path.sep + "js" + path.sep + "app." + _dT + ".css"
683
+ );
684
+
685
+ fs.writeFileSync(
686
+ dest + path.sep + "src" + path.sep + "index.html",
687
+ String(indexCode)
688
+ .split('<script src="/index.js" type="text/javascript"></script>')
689
+ .join("")
690
+ .split("/js/bea.js")
691
+ .join("/js/app." + _dT + ".js")
692
+ .split("/css/styles.css")
693
+ .join("/css/styles.css?v" + new Date().getTime())
694
+ .split("/css/bea.css")
695
+ .join("/css/app." + _dT + ".css")
696
+ );
697
+
662
698
  fs.writeFileSync(
663
699
  dest + path.sep + "src" + path.sep + "index.html",
664
700
  String(indexCode)
@@ -706,10 +742,10 @@ var _beaTn = "` +
706
742
  2
707
743
  )
708
744
  ) +
709
- "% " +
710
- "Uploading " +
711
- data.filename +
712
- " "
745
+ "% " +
746
+ "Uploading " +
747
+ data.filename +
748
+ " "
713
749
  );
714
750
  });
715
751
  // _fD.on("uploaded", function (data) {
@@ -725,7 +761,12 @@ var _beaTn = "` +
725
761
  });
726
762
  }
727
763
 
764
+ function clear(isSoft) {
765
+ process.stdout.write(isSoft ? "\x1B[H\x1B[2J" : "\x1B[2J\x1B[3J\x1B[H\x1Bc");
766
+ }
767
+
728
768
  function startServer() {
769
+ clear();
729
770
  nodemon({
730
771
  script: path.join(__dirname.toString(), "app.js"),
731
772
  ext: "view,js,css,json,tpl,html",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmjs/cli",
3
- "version": "1.0.33",
4
- "description": "Command line interface for robust LumenJS development. LumenJS is a tiny robust reactive javascript framework for building scalable and high-performant web applications and web user interfaces, be it simple or complex, with standard HTML, CSS and JavaScript",
3
+ "version": "1.0.35",
4
+ "description": "Command line interface for super fast LumenJS development. LumenJS is a tiny robust reactive javascript framework for building scalable and high-performant web applications and web user interfaces, be it simple or complex, with standard HTML, CSS and JavaScript",
5
5
  "bin": {
6
6
  "lm": "./bin/commands.js",
7
7
  "lu": "./bin/commands.js",