@mckit/schematics 0.0.2 → 0.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mckit/schematics",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A blank schematics",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -15,11 +15,17 @@
15
15
  "dependencies": {
16
16
  "@angular-devkit/core": "^18.2.6",
17
17
  "@angular-devkit/schematics": "^18.2.6",
18
+ "@mckit/core": "^19.0.1",
19
+ "@ngx-pwa/local-storage": "^19.0.0",
20
+ "@primeng/themes": "^19.0.9",
21
+ "primeicons": "^7.0.0",
22
+ "primeng": "^19.0.9",
23
+ "tailwindcss-primeui": "^0.5.1",
18
24
  "typescript": "~5.5.2"
19
25
  },
20
26
  "devDependencies": {
21
- "@types/node": "^18.18.0",
22
27
  "@types/jasmine": "~5.1.0",
28
+ "@types/node": "^18.18.0",
23
29
  "jasmine": "^5.0.0"
24
30
  }
25
31
  }
package/src/init/index.js CHANGED
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.init = init;
4
4
  const child_process_1 = require("child_process");
5
+ const fs = require("fs");
6
+ const path = require("path");
5
7
  function runCommand(command, _context) {
6
8
  (0, child_process_1.exec)(command, (error, stdout, stderr) => {
7
9
  if (error) {
@@ -14,12 +16,11 @@ function runCommand(command, _context) {
14
16
  _context.logger.info(`✅ Result: ${stdout}`);
15
17
  });
16
18
  }
17
- function createFileWithTemplate(tree, path, template) {
18
- var _a;
19
- const templatePath = './files/' + template;
20
- if (tree.exists(templatePath)) {
21
- const content = ((_a = tree.read(templatePath)) === null || _a === void 0 ? void 0 : _a.toString()) || '';
22
- tree.create(path, content);
19
+ function createFileWithTemplate(tree, fileName, template) {
20
+ const filePath = path.join(__dirname, 'files/' + template);
21
+ if (fs.existsSync(filePath)) {
22
+ let content = fs.readFileSync(filePath, 'utf8');
23
+ tree.create(fileName, content);
23
24
  }
24
25
  }
25
26
  // You don't have to export the function as default. You can also have more than one rule factory
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AA0BA,oBAaC;AAtCD,iDAAqC;AAErC,SAAS,UAAU,CAAC,OAAe,EAAE,QAA0B;IAC7D,IAAA,oBAAI,EAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;QACtC,IAAI,KAAK,EAAE,CAAC;YACV,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACnD,OAAO;QACT,CAAC;QACD,IAAI,MAAM,EAAE,CAAC;YACX,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,MAAM,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAU,EAAE,IAAY,EAAE,QAAgB;;IACxE,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC3C,IAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,CAAA,MAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,0CAAE,QAAQ,EAAE,KAAI,EAAE,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,iGAAiG;AACjG,YAAY;AACZ,SAAgB,IAAI,CAAC,QAAa;IAChC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAEhD,oCAAoC;QACpC,UAAU,CAAC,6FAA6F,EAAE,QAAQ,C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AACH,CAAC;AAED,iGAAiG;AACjG,YAAY;AACZ,SAAgB,IAAI,CAAC,QAAa;IAChC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAEhD,oCAAoC;QACpC,UAAU,CAAC,6FAA6F,EAAE,QAAQ,CAAC,CAAC;QACpH,UAAU,CAAC,8DAA8D,EAAE,QAAQ,CAAC,CAAC;QACrF,UAAU,CAAC,kCAAkC,EAAE,QAAQ,CAAC,CAAC;QAEzD,4CAA4C;QAC5C,sBAAsB,CAAC,IAAI,EAAE,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;QAE5E,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const schematics_1 = require("@angular-devkit/schematics");
13
+ const testing_1 = require("@angular-devkit/schematics/testing");
14
+ const path = require("path");
15
+ const collectionPath = path.join(__dirname, '../collection.json');
16
+ describe('init', () => {
17
+ it('works', () => __awaiter(void 0, void 0, void 0, function* () {
18
+ const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
19
+ const tree = yield runner.runSchematic('init', {}, schematics_1.Tree.empty());
20
+ expect(tree.files[0]).toEqual('/.postcssrc.json');
21
+ expect(tree.files.length).toEqual(1);
22
+ }));
23
+ });
24
+ //# sourceMappingURL=index_spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,EAAE,CAAC,OAAO,EAAE,GAAS,EAAE;QACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAEjE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAClD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -6,7 +6,7 @@ exports.mcSchematic = mcSchematic;
6
6
  function mcSchematic(_options) {
7
7
  return (tree, _context) => {
8
8
  // Aquí puedes definir la lógica para generar archivos o modificar el proyecto
9
- tree.create('hello.txt', 'Hello, World!');
9
+ //tree.create('hello.txt', 'Hello, World!');
10
10
  return tree;
11
11
  };
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAKA,kCAMC;AARD,iGAAiG;AACjG,YAAY;AACZ,SAAgB,WAAW,CAAC,QAAa;IACvC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,8EAA8E;QAC9E,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAKA,kCAMC;AARD,iGAAiG;AACjG,YAAY;AACZ,SAAgB,WAAW,CAAC,QAAa;IACvC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,8EAA8E;QAC9E,4CAA4C;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}