@lmjs/cli 1.0.28 → 1.0.29

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 (3) hide show
  1. package/index.js +2 -12
  2. package/lib/fcs.js +11 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -16,16 +16,6 @@ const BEA_Libs = {
16
16
  BEAJS: "https://s.beacdn.com/beajs/latest",
17
17
  };
18
18
 
19
- function _min(st) {
20
- for (const key in st) {
21
- st[key] = st[key].replace(/\/\*[\s\S]*?\*\/|(?<=[^:])\/\/.*|^\/\/.*/g, "");
22
- st[key] = st[key].replace(/(\r?\n|\n)/g, "");
23
- st[key] = st[key].replace(/(\t)/g, "");
24
- st[key] = st[key].replace(/\s\s+/g, " ");
25
- }
26
- return st;
27
- }
28
-
29
19
  function processCommands(cmd) {
30
20
  var command = cmd ? cmd : process.argv[2];
31
21
  if (command == "run" || command == "serve") {
@@ -143,10 +133,10 @@ async function buildProject(cmds) {
143
133
  `
144
134
  var _vcData = {
145
135
  "views": ` +
146
- JSON.stringify(_min(_views)) +
136
+ JSON.stringify(_views) +
147
137
  `,
148
138
  "tpls": ` +
149
- JSON.stringify(_min(_tpls)) +
139
+ JSON.stringify(_tpls) +
150
140
  `
151
141
  };
152
142
  `;
package/lib/fcs.js CHANGED
@@ -10,6 +10,16 @@ const BEA_Libs = {
10
10
  exports.getAllFiles = getAllFiles;
11
11
  exports.ucwords = ucwords;
12
12
 
13
+ function _mini(st) {
14
+ for (const key in st) {
15
+ st[key] = st[key].replace(/\/\*[\s\S]*?\*\/|(?<=[^:])\/\/.*|^\/\/.*/g, "");
16
+ st[key] = st[key].replace(/(\r?\n|\n)/g, "");
17
+ st[key] = st[key].replace(/(\t)/g, "");
18
+ st[key] = st[key].replace(/\s\s+/g, " ");
19
+ }
20
+ return st;
21
+ }
22
+
13
23
  function getAllFiles(dirPath, arrayOfFiles) {
14
24
  files = fs.readdirSync(dirPath)
15
25
  arrayOfFiles = arrayOfFiles || {}
@@ -22,7 +32,7 @@ function getAllFiles(dirPath, arrayOfFiles) {
22
32
  arrayOfFiles[fileKey] = fs.readFileSync(filePath, { encoding: 'utf8' });
23
33
  }
24
34
  });
25
- return arrayOfFiles;
35
+ return _mini(arrayOfFiles);
26
36
  }
27
37
 
28
38
  exports.getConfig = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmjs/cli",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "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
  "main": "./index.js",
6
6
  "bin": {