@mckit/schematics 0.0.1 → 0.0.2

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.1",
3
+ "version": "0.0.2",
4
4
  "description": "A blank schematics",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -0,0 +1,5 @@
1
+ {
2
+ "plugins": {
3
+ "@tailwindcss/postcss": {}
4
+ }
5
+ }
package/src/init/index.js CHANGED
@@ -14,6 +14,14 @@ function runCommand(command, _context) {
14
14
  _context.logger.info(`✅ Result: ${stdout}`);
15
15
  });
16
16
  }
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);
23
+ }
24
+ }
17
25
  // You don't have to export the function as default. You can also have more than one rule factory
18
26
  // per file.
19
27
  function init(_options) {
@@ -22,6 +30,8 @@ function init(_options) {
22
30
  runCommand('npm install --save @mckit/core primeng @primeng/themes primeicons @ngx-pwa/local-storage@19', _context);
23
31
  runCommand('npm install tailwindcss @tailwindcss/postcss postcss --force', _context);
24
32
  runCommand('npm i tailwindcss-primeui --save', _context);
33
+ // Create .postcssrc.json file from template
34
+ createFileWithTemplate(tree, '.postcssrc.json', '.postcssrc.json.template');
25
35
  return tree;
26
36
  };
27
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAkBA,oBAUC;AA3BD,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,C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