@lmjs/cli 1.0.37 → 1.0.39

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/lib/fcs.js +7 -21
  2. package/package.json +1 -1
package/lib/fcs.js CHANGED
@@ -87,9 +87,9 @@ exports.rd = rd;
87
87
 
88
88
  function create(conf) {
89
89
  let t =
90
- conf.type == "v" || conf.type == "s" || conf.type == "c" ? conf.type : "p";
90
+ conf.type == "v" || conf.type == "s" || conf.type == "t" ? conf.type : "p";
91
91
  let n =
92
- conf.type == "v" || conf.type == "s" || conf.type == "c"
92
+ conf.type == "v" || conf.type == "s" || conf.type == "t"
93
93
  ? lw(conf.name[0])
94
94
  : conf.name.join(" ");
95
95
  if (t == "p") {
@@ -210,10 +210,10 @@ function create(conf) {
210
210
  }
211
211
  });
212
212
  } else {
213
- let file = t == "s" ? "sub_view.view" : t == "c" ? "tpl.tpl" : "view.view";
214
- let ident = t == "s" ? "SubView" : t == "c" ? "Template" : "View";
215
- let dir = t == "c" ? "tpls" : "views";
216
- let ext = t == "c" ? "tpl" : "view";
213
+ let file = t == "s" ? "sub_view.view" : t == "t" ? "tpl.tpl" : "view.view";
214
+ let ident = t == "s" ? "SubView" : t == "t" ? "Template" : "View";
215
+ let dir = t == "t" ? "tpls" : "views";
216
+ let ext = t == "t" ? "tpl" : "view";
217
217
  let html5 = Buffer.from(
218
218
  fs
219
219
  .readFileSync(`${__dirname}` + path.sep + `files` + path.sep + file)
@@ -237,19 +237,6 @@ function create(conf) {
237
237
  }
238
238
  }
239
239
 
240
- function _mini(st) {
241
- for (const key in st) {
242
- st[key] = st[key].replace(/\/\*[\s\S]*?\*\/|(?<=[^:])\/\/.*|^\/\/.*/g, "");
243
- // st[key] = st[key].replace(/(\r?\n|\n)/g, "");
244
- // st[key] = st[key].replace(" var ", " ;var ");
245
- // st[key] = st[key].replace(" let ", " ;let ");
246
- // st[key] = st[key].replace(" const ", " ;const ");
247
- st[key] = st[key].replace(/(\t)/g, "");
248
- // st[key] = st[key].replace(/\s\s+/g, " ");
249
- }
250
- return st;
251
- }
252
-
253
240
  function getAllFiles(dirPath, arrayOfFiles = {}, mini = false) {
254
241
  files = fs.readdirSync(dirPath);
255
242
  files.forEach(function (file) {
@@ -271,9 +258,9 @@ function getAllFiles(dirPath, arrayOfFiles = {}, mini = false) {
271
258
  collapseWhitespace: true,
272
259
  collapseInlineTagWhitespace: true,
273
260
  conservativeCollapse: true,
261
+ removeComments: true,
274
262
  minifyJS: true,
275
263
  minifyCSS: false,
276
- removeComments: true,
277
264
  processConditionalComments: true,
278
265
  collapseBooleanAttributes: true,
279
266
  decodeEntities: true,
@@ -304,7 +291,6 @@ function getAllFiles(dirPath, arrayOfFiles = {}, mini = false) {
304
291
  arrayOfFiles[fileKey] = result;
305
292
  }
306
293
  });
307
- if(mini) return _mini(arrayOfFiles);
308
294
  return arrayOfFiles;
309
295
  }
310
296
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmjs/cli",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
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",