qwik-ui 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.
Files changed (36) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/index.d.ts +2 -0
  3. package/bin/index.js +304 -0
  4. package/bin/index.js.map +1 -0
  5. package/generators.json +19 -0
  6. package/package.json +17 -15
  7. package/src/_shared/config-filenames.d.ts +2 -0
  8. package/src/_shared/config-filenames.js +6 -0
  9. package/src/_shared/config-filenames.js.map +1 -0
  10. package/src/_shared/styled-kits.d.ts +9 -0
  11. package/src/_shared/styled-kits.js +21 -0
  12. package/src/_shared/styled-kits.js.map +1 -0
  13. package/src/generators/component/component-generator.d.ts +4 -0
  14. package/src/generators/component/component-generator.js +56 -0
  15. package/src/generators/component/component-generator.js.map +1 -0
  16. package/src/generators/component/schema.d.ts +3 -0
  17. package/src/generators/component/schema.json +18 -0
  18. package/src/generators/index.d.ts +3 -0
  19. package/src/generators/index.js +7 -0
  20. package/src/generators/index.js.map +1 -0
  21. package/src/generators/init/init-generator.d.ts +4 -0
  22. package/src/generators/init/init-generator.js +27 -0
  23. package/src/generators/init/init-generator.js.map +1 -0
  24. package/src/generators/init/schema.d.ts +4 -0
  25. package/src/generators/init/schema.json +48 -0
  26. package/src/generators/setup-tailwind/schema.d.ts +4 -0
  27. package/src/generators/setup-tailwind/schema.json +20 -0
  28. package/src/generators/setup-tailwind/setup-tailwind-generator.d.ts +4 -0
  29. package/src/generators/setup-tailwind/setup-tailwind-generator.js +91 -0
  30. package/src/generators/setup-tailwind/setup-tailwind-generator.js.map +1 -0
  31. package/types/qwik-ui-config.type.d.ts +4 -0
  32. package/types/qwik-ui-config.type.js +3 -0
  33. package/types/qwik-ui-config.type.js.map +1 -0
  34. package/.idea/modules.xml +0 -8
  35. package/.idea/qwik-ui.iml +0 -12
  36. package/.idea/vcs.xml +0 -6
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # qwik-ui
2
+
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Initial release of qwik-ui cli (by [@shairez](https://github.com/shairez) in [`34b788d`](https://github.com/qwikifiers/qwik-ui/commit/34b788d4ac30f4c4439c52066bdd259535b4efdb))
8
+ This is not production ready, yet. It was released for testing purposes only.
package/bin/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export declare function getCwd(): string;
package/bin/index.js ADDED
@@ -0,0 +1,304 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getCwd = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const prompts_1 = require("@clack/prompts");
7
+ const devkit_1 = require("@nx/devkit");
8
+ const child_process_1 = require("child_process");
9
+ const fs_1 = require("fs");
10
+ const colors_1 = require("kleur/colors");
11
+ const yargs_1 = require("yargs");
12
+ const config_filenames_1 = require("../src/_shared/config-filenames");
13
+ const styled_kits_1 = require("../src/_shared/styled-kits");
14
+ const COMMANDS = ['init', 'add'];
15
+ const listOfCommands = COMMANDS.join(', ');
16
+ main();
17
+ function main() {
18
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
+ console.clear();
20
+ const command = process.argv[2];
21
+ if (!command) {
22
+ exitWithError(`A command is missing, please choose one of the following commands: ${(0, colors_1.green)(listOfCommands)}`);
23
+ }
24
+ (0, prompts_1.intro)('🐨 Qwik UI');
25
+ if (command === 'init') {
26
+ yield handleInit();
27
+ prompts_1.log.success('Successfully initialized Qwik UI! 🎉');
28
+ }
29
+ else if (command === 'add') {
30
+ yield handleAdd();
31
+ }
32
+ else {
33
+ exitWithError(`Invalid command: ${(0, colors_1.red)(command)}
34
+ Please choose one of the following commands: ${(0, colors_1.green)(listOfCommands)}`);
35
+ }
36
+ (0, prompts_1.outro)('Done! 💪');
37
+ });
38
+ }
39
+ function handleInit() {
40
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+ const InitCommand = {
42
+ command: 'init',
43
+ describe: 'Initialize Qwik UI',
44
+ builder: (yargs) => yargs
45
+ .option('projectRoot', {
46
+ description: 'The root of the project (default: "/")',
47
+ type: 'string',
48
+ })
49
+ .option('styledKit', {
50
+ description: 'Preferred styled kit',
51
+ type: 'string',
52
+ choices: [styled_kits_1.StyledKit.FLUFFY, styled_kits_1.StyledKit.MINIMAL],
53
+ })
54
+ .option('uiComponentsPath', {
55
+ description: 'Generated components folder',
56
+ type: 'string',
57
+ })
58
+ .option('rootCssPath', {
59
+ description: 'Global css file location (where you defined your tailwind directives)',
60
+ type: 'string',
61
+ })
62
+ .option('installTailwind', {
63
+ description: 'Skip tailwind confirmation',
64
+ type: 'boolean',
65
+ default: false,
66
+ hidden: true,
67
+ })
68
+ .option('e2e', {
69
+ description: 'Install styled packages tagged as e2e for tests',
70
+ type: 'boolean',
71
+ default: false,
72
+ hidden: true,
73
+ })
74
+ .option('components', {
75
+ description: 'components to auto install',
76
+ type: 'string',
77
+ hidden: true,
78
+ }),
79
+ handler: () => { },
80
+ };
81
+ const args = yield parseCommands(InitCommand);
82
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
83
+ yield installNxIfNeeded();
84
+ const config = {
85
+ projectRoot: args['projectRoot'],
86
+ styledKit: args['styledKit'],
87
+ uiComponentsPath: args['uiComponentsPath'],
88
+ rootCssPath: args['rootCssPath'],
89
+ };
90
+ if (!config.projectRoot) {
91
+ config.projectRoot = cancelable(yield (0, prompts_1.text)({
92
+ message: 'Specify the root of the project (leave empty for "/")',
93
+ initialValue: '/',
94
+ }));
95
+ }
96
+ if (!config.styledKit) {
97
+ config.styledKit = cancelable(yield (0, prompts_1.select)({
98
+ message: (0, colors_1.cyan)('What is your preferred styled kit?'),
99
+ options: [
100
+ { label: 'Fluffy', value: styled_kits_1.StyledKit.FLUFFY },
101
+ { label: 'Minimal', value: styled_kits_1.StyledKit.MINIMAL },
102
+ ],
103
+ initialValue: 'fluffy',
104
+ }));
105
+ }
106
+ if (!config.uiComponentsPath) {
107
+ config.uiComponentsPath = cancelable(yield (0, prompts_1.text)({
108
+ message: (0, colors_1.cyan)('UI components folder'),
109
+ initialValue: 'src/components/ui',
110
+ }));
111
+ }
112
+ if (!config.rootCssPath) {
113
+ config.rootCssPath = yield collectFileLocationFromUser({
114
+ message: (0, colors_1.cyan)('Your global css file location (where you defined your tailwind directives)'),
115
+ errorMessageName: 'Global css file',
116
+ initialValue: 'src/global.css',
117
+ });
118
+ }
119
+ // INSTALL TAILWIND IF NEEDED
120
+ let installTailwind = args['installTailwind'];
121
+ if (!installTailwind) {
122
+ installTailwind = cancelable(yield (0, prompts_1.confirm)({
123
+ message: (0, colors_1.cyan)('Would you like to instal Tailwind? (required)'),
124
+ initialValue: false,
125
+ }));
126
+ }
127
+ // TODO: Add "cwd" with the project root, and see if we can skip the interactive question from qwik cli
128
+ if (installTailwind) {
129
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().exec} qwik add tailwind --skipConfirmation=true`, {
130
+ stdio: 'inherit',
131
+ });
132
+ }
133
+ // ADD QWIK UI CLI TO DEPENDENCIES
134
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().addDev} qwik-ui@latest`, {
135
+ stdio: 'inherit',
136
+ });
137
+ // CREATE CONFIG FILE
138
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().exec} nx g qwik-ui:init --interactive false --project-root=${config.projectRoot} --ui-components-path=${config.uiComponentsPath} --styled-kit=${config.styledKit}`, {
139
+ stdio: 'inherit',
140
+ });
141
+ // INSTALL STYLED KIT
142
+ const styledPackage = styled_kits_1.styledPackagesMap[config.styledKit];
143
+ const packageTag = args['e2e'] ? 'e2e' : 'latest';
144
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().addDev} ${styledPackage}@${packageTag}`, {
145
+ stdio: 'inherit',
146
+ });
147
+ // SETUP TAILWIND
148
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().exec} nx g qwik-ui:setup-tailwind --interactive false --project-root=${config.projectRoot} --root-css-path=${config.rootCssPath}`, {
149
+ stdio: 'inherit',
150
+ });
151
+ yield handleAdd(config.projectRoot, args['components']);
152
+ });
153
+ }
154
+ function installNxIfNeeded() {
155
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
156
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
157
+ // const nxVersion = require('../package.json').dependencies['@nx/devkit'];
158
+ if ((0, fs_1.existsSync)('nx.json')) {
159
+ prompts_1.log.info('seems like nx.json already exists. cool!');
160
+ }
161
+ else {
162
+ // const haveNxInstalled = cancelable(
163
+ // await confirm({
164
+ // message: 'Do you already have Nx installed? (required)',
165
+ // initialValue: false,
166
+ // }),
167
+ // );
168
+ // if (!haveNxInstalled) {
169
+ const initSpinner = (0, prompts_1.spinner)();
170
+ prompts_1.log.info('Installing Nx...');
171
+ initSpinner.start('Installing Nx...');
172
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().addDev} nx@latest`, {
173
+ stdio: 'inherit',
174
+ });
175
+ // TODO: Just add "nx: {} " to package.json and see if it still works
176
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().exec} nx init --interactive false`, {
177
+ stdio: 'inherit',
178
+ });
179
+ initSpinner.stop('Installed Nx!');
180
+ }
181
+ prompts_1.log.success('nx init done');
182
+ // }
183
+ });
184
+ }
185
+ function handleAdd(projectRoot, componentsFromInit) {
186
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
187
+ if (!(0, fs_1.existsSync)(config_filenames_1.QWIK_UI_CONFIG_FILENAME)) {
188
+ exitWithError(`${config_filenames_1.QWIK_UI_CONFIG_FILENAME} not found, please run ${(0, colors_1.green)('qwik-ui init')} first`);
189
+ }
190
+ const config = yield (0, devkit_1.readJsonFile)(config_filenames_1.QWIK_UI_CONFIG_FILENAME);
191
+ const styledPackage = styled_kits_1.styledPackagesMap[config.styledKit];
192
+ // read config file to collect components and add to description below
193
+ const componentsJsonPath = require.resolve(`${styledPackage}/${config_filenames_1.COMPONENTS_REGISTRY_FILENAME}`);
194
+ const componentsJson = (0, devkit_1.readJsonFile)(componentsJsonPath);
195
+ const possibleComponents = componentsJson.components;
196
+ const possibleComponentNames = componentsJson.components.map((c) => c.displayName);
197
+ const componentsMap = componentsJson.components.reduce((acc, curr) => {
198
+ acc[curr.type] = curr;
199
+ return acc;
200
+ }, {});
201
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
202
+ const AddCommand = {
203
+ command: 'add [components]',
204
+ describe: 'Add components to your project',
205
+ builder: (yargs) => yargs
206
+ .positional('components', {
207
+ description: `Choose which components to add
208
+ Options: [${possibleComponentNames.join(', ')}]`,
209
+ type: 'string',
210
+ coerce: (components) => componentTypesFromString(components),
211
+ })
212
+ .option('projectRoot', {
213
+ description: 'The root of the project (default: "/")',
214
+ type: 'string',
215
+ default: '/',
216
+ }),
217
+ handler: () => { },
218
+ };
219
+ function componentTypesFromString(components) {
220
+ return components.split(',').map((c) => {
221
+ return componentsMap[c.trim()].type;
222
+ });
223
+ }
224
+ const args = parseCommands(AddCommand);
225
+ if (!projectRoot && !args['projectRoot']) {
226
+ projectRoot = cancelable(yield (0, prompts_1.text)({
227
+ message: (0, colors_1.cyan)('Specify the root of the project (leave empty for "/")'),
228
+ initialValue: '/',
229
+ }));
230
+ }
231
+ // CHOOSE COMPONENTS TO ADD
232
+ let componentsToAdd;
233
+ if (componentsFromInit) {
234
+ componentsToAdd = componentsFromInit.split(',');
235
+ }
236
+ if (!componentsToAdd) {
237
+ componentsToAdd = args['components'];
238
+ }
239
+ if (!componentsToAdd) {
240
+ componentsToAdd = cancelable(yield (0, prompts_1.multiselect)({
241
+ message: (0, colors_1.cyan)(`Choose which components to add`),
242
+ options: possibleComponents.map((c) => ({
243
+ label: c.displayName,
244
+ value: c.type,
245
+ })),
246
+ }));
247
+ }
248
+ // GENERATE COMPONENTS
249
+ (0, child_process_1.execSync)(`${(0, devkit_1.getPackageManagerCommand)().exec} nx g qwik-ui:component ${componentsToAdd.join(',')} --interactive false --project-root=${projectRoot}`, {
250
+ stdio: 'inherit',
251
+ });
252
+ prompts_1.log.success(`Successfully added ${componentsToAdd.join(',')} to your project! 🎉`);
253
+ });
254
+ }
255
+ function parseCommands(command) {
256
+ return (0, yargs_1.default)(process.argv.slice(2))
257
+ .parserConfiguration({
258
+ 'strip-dashed': true,
259
+ 'dot-notation': false,
260
+ })
261
+ .strict()
262
+ .scriptName('qwik-ui')
263
+ .usage((0, colors_1.bold)('Usage: $0 <command> [options]'))
264
+ .demandCommand(1)
265
+ .command(command)
266
+ .help().argv;
267
+ }
268
+ function collectFileLocationFromUser(config) {
269
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
270
+ const filePath = cancelable(yield (0, prompts_1.text)({
271
+ message: config.message,
272
+ initialValue: config.initialValue,
273
+ }));
274
+ if (!(0, fs_1.existsSync)(filePath)) {
275
+ prompts_1.log.error(`${config.errorMessageName} not found at ${filePath}, want to try again?`);
276
+ return collectFileLocationFromUser(Object.assign(Object.assign({}, config), { initialValue: filePath }));
277
+ }
278
+ return filePath;
279
+ });
280
+ }
281
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
282
+ function cancelable(result) {
283
+ if ((0, prompts_1.isCancel)(result)) {
284
+ (0, prompts_1.cancel)('Operation canceled');
285
+ process.exit(0);
286
+ }
287
+ return result;
288
+ }
289
+ // function capitalizeFirstLetter(word: string) {
290
+ // return word.charAt(0).toUpperCase() + word.slice(1);
291
+ // }
292
+ function exitWithError(message) {
293
+ prompts_1.log.error(message);
294
+ (0, prompts_1.cancel)();
295
+ process.exit(1);
296
+ }
297
+ function getCwd() {
298
+ var _a;
299
+ return ((_a = process.env.INIT_CWD) === null || _a === void 0 ? void 0 : _a.startsWith(devkit_1.workspaceRoot))
300
+ ? process.env.INIT_CWD
301
+ : process.cwd();
302
+ }
303
+ exports.getCwd = getCwd;
304
+ //# sourceMappingURL=index.js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C,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,IAAA,gBAAM,GAAE,CAAC;IACT,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,SAAgB,MAAM;;IACpB,OAAO,CAAA,MAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,0CAAE,UAAU,CAAC,sBAAa,CAAC;QACpD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ;QACtB,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC;AAJD,wBAIC"}
@@ -0,0 +1,19 @@
1
+ {
2
+ "generators": {
3
+ "init": {
4
+ "factory": "./src/generators/init/init-generator",
5
+ "schema": "./src/generators/init/schema.json",
6
+ "description": "Init a new qwik-ui cli environment"
7
+ },
8
+ "setup-tailwind": {
9
+ "factory": "./src/generators/setup-tailwind/setup-tailwind-generator",
10
+ "schema": "./src/generators/setup-tailwind/schema.json",
11
+ "description": "Setup Tailwind config generator"
12
+ },
13
+ "component": {
14
+ "factory": "./src/generators/component/component-generator",
15
+ "schema": "./src/generators/component/schema.json",
16
+ "description": "Component generator"
17
+ }
18
+ }
19
+ }
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "qwik-ui",
3
- "version": "0.0.2",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
3
+ "version": "0.0.3",
4
+ "publishConfig": {
5
+ "access": "public"
8
6
  },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/QwikTools/qwik-ui.git"
7
+ "description": "Qwik UI Command line interface",
8
+ "dependencies": {
9
+ "@clack/prompts": "^0.7.0",
10
+ "@nx/devkit": "17.1.3",
11
+ "kleur": "^4.1.5",
12
+ "tslib": "^2.3.0",
13
+ "yargs": "17.7.2"
12
14
  },
13
- "keywords": [],
14
- "author": "",
15
- "license": "ISC",
16
- "bugs": {
17
- "url": "https://github.com/QwikTools/qwik-ui/issues"
15
+ "type": "commonjs",
16
+ "main": "./src/generators/index.js",
17
+ "typings": "./src/index.d.ts",
18
+ "bin": {
19
+ "qwik-ui": "./bin/index.js"
18
20
  },
19
- "homepage": "https://github.com/QwikTools/qwik-ui#readme"
20
- }
21
+ "generators": "./generators.json"
22
+ }
@@ -0,0 +1,2 @@
1
+ export declare const QWIK_UI_CONFIG_FILENAME = "qwik-ui.config.json";
2
+ export declare const COMPONENTS_REGISTRY_FILENAME = "components-registry.json";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COMPONENTS_REGISTRY_FILENAME = exports.QWIK_UI_CONFIG_FILENAME = void 0;
4
+ exports.QWIK_UI_CONFIG_FILENAME = 'qwik-ui.config.json';
5
+ exports.COMPONENTS_REGISTRY_FILENAME = 'components-registry.json';
6
+ //# sourceMappingURL=config-filenames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-filenames.js","sourceRoot":"","sources":["../../../../../packages/cli/src/_shared/config-filenames.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAEhD,QAAA,4BAA4B,GAAG,0BAA0B,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare enum StyledKit {
2
+ FLUFFY = "fluffy",
3
+ MINIMAL = "minimal"
4
+ }
5
+ export declare const styledPackagesMap: {
6
+ fluffy: string;
7
+ minimal: string;
8
+ };
9
+ export declare function getKitRoot(styledKit: StyledKit): string;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getKitRoot = exports.styledPackagesMap = exports.StyledKit = void 0;
4
+ const path_1 = require("path");
5
+ const config_filenames_1 = require("./config-filenames");
6
+ var StyledKit;
7
+ (function (StyledKit) {
8
+ StyledKit["FLUFFY"] = "fluffy";
9
+ StyledKit["MINIMAL"] = "minimal";
10
+ })(StyledKit || (exports.StyledKit = StyledKit = {}));
11
+ exports.styledPackagesMap = {
12
+ [StyledKit.FLUFFY]: '@qwik-ui/fluffy',
13
+ [StyledKit.MINIMAL]: '@qwik-ui/minimal',
14
+ };
15
+ function getKitRoot(styledKit) {
16
+ const styledPackageName = exports.styledPackagesMap[styledKit];
17
+ const kitRoot = (0, path_1.dirname)(require.resolve(`${styledPackageName}/${config_filenames_1.COMPONENTS_REGISTRY_FILENAME}`));
18
+ return kitRoot;
19
+ }
20
+ exports.getKitRoot = getKitRoot;
21
+ //# sourceMappingURL=styled-kits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled-kits.js","sourceRoot":"","sources":["../../../../../packages/cli/src/_shared/styled-kits.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yDAAkE;AAElE,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;AACrB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAEY,QAAA,iBAAiB,GAAG;IAC/B,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,iBAAiB;IACrC,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,kBAAkB;CACxC,CAAC;AAEF,SAAgB,UAAU,CAAC,SAAoB;IAC7C,MAAM,iBAAiB,GAAG,yBAAiB,CAAC,SAAS,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,IAAA,cAAO,EACrB,OAAO,CAAC,OAAO,CAAC,GAAG,iBAAiB,IAAI,+CAA4B,EAAE,CAAC,CACxE,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAND,gCAMC"}
@@ -0,0 +1,4 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { ComponentGeneratorSchema } from './schema';
3
+ export declare function componentGenerator(tree: Tree, options: ComponentGeneratorSchema): Promise<void>;
4
+ export default componentGenerator;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.componentGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const fs_1 = require("fs");
7
+ const path_1 = require("path");
8
+ const config_filenames_1 = require("../../_shared/config-filenames");
9
+ const styled_kits_1 = require("../../_shared/styled-kits");
10
+ function componentGenerator(tree, options) {
11
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
+ const configContent = tree.read(config_filenames_1.QWIK_UI_CONFIG_FILENAME, 'utf-8');
13
+ if (!options.types) {
14
+ throw new Error('You must specify at least one component type');
15
+ }
16
+ if (!configContent) {
17
+ throw new Error(`Could not find ${config_filenames_1.QWIK_UI_CONFIG_FILENAME}`);
18
+ }
19
+ const config = JSON.parse(configContent);
20
+ const outputComponentsFolder = config.componentsRoot;
21
+ if (!outputComponentsFolder) {
22
+ throw new Error(`Could not find componentsRoot in ${config_filenames_1.QWIK_UI_CONFIG_FILENAME}`);
23
+ }
24
+ const kitRoot = (0, styled_kits_1.getKitRoot)(config.styledKit);
25
+ const componentsJsonPath = (0, path_1.join)(kitRoot, config_filenames_1.COMPONENTS_REGISTRY_FILENAME);
26
+ const componentsRegistry = (0, devkit_1.readJsonFile)(componentsJsonPath);
27
+ const componentTypes = componentsRegistry.components.map((component) => component.type);
28
+ const requestedComponents = options.types.split(',');
29
+ requestedComponents.forEach((component) => {
30
+ const indexOfComponent = componentTypes.indexOf(component.trim());
31
+ if (indexOfComponent === -1) {
32
+ throw new Error(`${component} is not a registered component.
33
+ Please file an issue if you want it to be implemented.`);
34
+ }
35
+ const specificComponentConfig = componentsRegistry.components[indexOfComponent];
36
+ const componentTemplateBasePath = (0, path_1.join)(kitRoot, componentsRegistry.componentsRoot, specificComponentConfig.componentFolder);
37
+ const outputComponentBasePath = (0, path_1.join)(outputComponentsFolder, specificComponentConfig.componentFolder);
38
+ generateComponent(tree, componentTemplateBasePath, outputComponentBasePath, specificComponentConfig.files);
39
+ });
40
+ yield (0, devkit_1.formatFiles)(tree);
41
+ });
42
+ }
43
+ exports.componentGenerator = componentGenerator;
44
+ exports.default = componentGenerator;
45
+ function generateComponent(tree, baseComponentTemplatePath, outputComponentBasePath, templateFiles) {
46
+ templateFiles.forEach((file) => {
47
+ const filePath = (0, devkit_1.joinPathFragments)(baseComponentTemplatePath, file);
48
+ const fileContent = (0, fs_1.readFileSync)(filePath, 'utf-8');
49
+ if (!fileContent) {
50
+ throw new Error(`Could not read ${filePath}`);
51
+ }
52
+ const newFilePath = (0, devkit_1.joinPathFragments)(outputComponentBasePath, file);
53
+ tree.write(newFilePath, fileContent);
54
+ });
55
+ }
56
+ //# sourceMappingURL=component-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-generator.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/generators/component/component-generator.ts"],"names":[],"mappings":";;;;AAAA,uCAAgF;AAChF,2BAAkC;AAClC,+BAA4B;AAC5B,qEAGwC;AACxC,2DAAuD;AAUvD,SAAsB,kBAAkB,CAAC,IAAU,EAAE,OAAiC;;QACpF,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,0CAAuB,EAAE,OAAO,CAAC,CAAC;QAElE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,kBAAkB,0CAAuB,EAAE,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAEzC,MAAM,sBAAsB,GAAG,MAAM,CAAC,cAAc,CAAC;QAErD,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,oCAAoC,0CAAuB,EAAE,CAAC,CAAC;QACjF,CAAC;QAED,MAAM,OAAO,GAAG,IAAA,wBAAU,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAE7C,MAAM,kBAAkB,GAA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;QACrC,MAAM,QAAQ,GAAG,IAAA,0BAAiB,EAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC;QACpE,MAAM,WAAW,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,MAAM,WAAW,GAAG,IAAA,0BAAiB,EAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;QAErE,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ export interface ComponentGeneratorSchema {
2
+ types?: string;
3
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "Add",
4
+ "title": "",
5
+ "type": "object",
6
+ "properties": {
7
+ "types": {
8
+ "type": "string",
9
+ "description": "",
10
+ "$default": {
11
+ "$source": "argv",
12
+ "index": 0
13
+ },
14
+ "x-prompt": "Which components would you like to generate?"
15
+ }
16
+ },
17
+ "required": ["types"]
18
+ }
@@ -0,0 +1,3 @@
1
+ export * from './component/component-generator';
2
+ export * from './init/init-generator';
3
+ export * from './setup-tailwind/setup-tailwind-generator';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./component/component-generator"), exports);
5
+ tslib_1.__exportStar(require("./init/init-generator"), exports);
6
+ tslib_1.__exportStar(require("./setup-tailwind/setup-tailwind-generator"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/cli/src/generators/index.ts"],"names":[],"mappings":";;;AAAA,0EAAgD;AAChD,gEAAsC;AACtC,oFAA0D"}
@@ -0,0 +1,4 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { InitGeneratorSchema } from './schema';
3
+ export declare function initGenerator(tree: Tree, options: InitGeneratorSchema): Promise<void>;
4
+ export default initGenerator;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const config_filenames_1 = require("../../_shared/config-filenames");
7
+ const styled_kits_1 = require("../../_shared/styled-kits");
8
+ function initGenerator(tree, options) {
9
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
+ if (tree.exists(config_filenames_1.QWIK_UI_CONFIG_FILENAME)) {
11
+ console.log(`${config_filenames_1.QWIK_UI_CONFIG_FILENAME} already exists`);
12
+ return;
13
+ }
14
+ options.projectRoot || (options.projectRoot = '/');
15
+ options.styledKit || (options.styledKit = styled_kits_1.StyledKit.FLUFFY);
16
+ options.componentsRoot || (options.componentsRoot = 'src/components/ui');
17
+ const fullConfigPath = (0, devkit_1.joinPathFragments)(options.projectRoot, config_filenames_1.QWIK_UI_CONFIG_FILENAME);
18
+ tree.write(fullConfigPath, JSON.stringify({
19
+ componentsRoot: options.componentsRoot,
20
+ styledKit: options.styledKit,
21
+ }));
22
+ yield (0, devkit_1.formatFiles)(tree);
23
+ });
24
+ }
25
+ exports.initGenerator = initGenerator;
26
+ exports.default = initGenerator;
27
+ //# sourceMappingURL=init-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-generator.js","sourceRoot":"","sources":["../../../../../../packages/cli/src/generators/init/init-generator.ts"],"names":[],"mappings":";;;;AAAA,uCAAkE;AAClE,qEAAyE;AACzE,2DAAsD;AAGtD,SAAsB,aAAa,CAAC,IAAU,EAAE,OAA4B;;QAC1E,IAAI,IAAI,CAAC,MAAM,CAAC,0CAAuB,CAAC,EAAE,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,GAAG,0CAAuB,iBAAiB,CAAC,CAAC;YACzD,OAAO;QACT,CAAC;QAED,OAAO,CAAC,WAAW,KAAnB,OAAO,CAAC,WAAW,GAAK,GAAG,EAAC;QAC5B,OAAO,CAAC,SAAS,KAAjB,OAAO,CAAC,SAAS,GAAK,uBAAS,CAAC,MAAM,EAAC;QACvC,OAAO,CAAC,cAAc,KAAtB,OAAO,CAAC,cAAc,GAAK,mBAAmB,EAAC;QAE/C,MAAM,cAAc,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,WAAW,EAAE,0CAAuB,CAAC,CAAC;QAEvF,IAAI,CAAC,KAAK,CACR,cAAc,EACd,IAAI,CAAC,SAAS,CAAC;YACb,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CACH,CAAC;QAEF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AArBD,sCAqBC;AAED,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { QwikUIConfig } from '../../../types/qwik-ui-config.type';
2
+ export interface InitGeneratorSchema extends QwikUIConfig {
3
+ projectRoot?: string;
4
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "Preset",
4
+ "title": "",
5
+ "type": "object",
6
+ "properties": {
7
+ "projectRoot": {
8
+ "type": "string",
9
+ "description": "The root directory you want the config file to be created in.",
10
+ "x-prompt": "Which project do you ?"
11
+ },
12
+ "tailwindConfigPath": {
13
+ "type": "string",
14
+ "description": "Tailwind config path",
15
+ "x-prompt": "Tailwind config path"
16
+ },
17
+ "rootCssPath": {
18
+ "type": "string",
19
+ "description": "The root css file where you declare all the tailwind related directives",
20
+ "x-prompt": "Where is you root/global css file located?"
21
+ },
22
+ "styledKit": {
23
+ "type": "string",
24
+ "description": "Styled Kit",
25
+ "x-prompt": {
26
+ "message": "Which styled kit of style would you like to install?",
27
+ "type": "list",
28
+ "items": [
29
+ {
30
+ "value": "fluffy",
31
+ "label": "Fluffy - the full styled kit"
32
+ },
33
+ {
34
+ "value": "minimal",
35
+ "label": "Minimal - the bare minimum styled kit"
36
+ }
37
+ ],
38
+ "default:": "fluffy"
39
+ }
40
+ },
41
+ "componentsRoot": {
42
+ "type": "string",
43
+ "description": "Path to the components folder",
44
+ "x-prompt": "Where will your components be located?"
45
+ }
46
+ },
47
+ "required": []
48
+ }
@@ -0,0 +1,4 @@
1
+ export interface SetupTailwindGeneratorSchema {
2
+ projectRoot?: string;
3
+ rootCssPath?: string;
4
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "Preset",
4
+ "title": "",
5
+ "type": "object",
6
+ "properties": {
7
+ "projectRoot": {
8
+ "type": "string",
9
+ "description": "The root directory you want the config file to be created in.",
10
+ "x-prompt": "Which project do you ?"
11
+ },
12
+
13
+ "rootCssPath": {
14
+ "type": "string",
15
+ "description": "The root css file where you declare all the tailwind related directives",
16
+ "x-prompt": "Where is you root/global css file located?"
17
+ }
18
+ },
19
+ "required": []
20
+ }
@@ -0,0 +1,4 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { SetupTailwindGeneratorSchema } from './schema';
3
+ export declare function setupTailwindGenerator(tree: Tree, options: SetupTailwindGeneratorSchema): Promise<void>;
4
+ export default setupTailwindGenerator;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupTailwindGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const fs_1 = require("fs");
7
+ const path_1 = require("path");
8
+ const config_filenames_1 = require("../../_shared/config-filenames");
9
+ const styled_kits_1 = require("../../_shared/styled-kits");
10
+ function setupTailwindGenerator(tree, options) {
11
+ var _a, _b;
12
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ const configContent = tree.read(config_filenames_1.QWIK_UI_CONFIG_FILENAME, 'utf-8');
14
+ if (!configContent) {
15
+ throw new Error(`Could not find ${config_filenames_1.QWIK_UI_CONFIG_FILENAME}, please run "init" first`);
16
+ }
17
+ const config = JSON.parse(configContent);
18
+ const kitRoot = (0, styled_kits_1.getKitRoot)(config.styledKit);
19
+ const globalCssPath = (_a = options.rootCssPath) !== null && _a !== void 0 ? _a : 'src/global.css';
20
+ options.projectRoot = (_b = options.projectRoot) !== null && _b !== void 0 ? _b : '';
21
+ updateTailwindConfig(tree, options.projectRoot, kitRoot);
22
+ updateRootCss(tree, globalCssPath, kitRoot);
23
+ yield (0, devkit_1.formatFiles)(tree);
24
+ });
25
+ }
26
+ exports.setupTailwindGenerator = setupTailwindGenerator;
27
+ function updateTailwindConfig(tree, projectRoot, kitRoot) {
28
+ const tailwindConfigPath = getTailwindConfigPath(tree, projectRoot, devkit_1.workspaceRoot);
29
+ if (!tailwindConfigPath) {
30
+ throw new Error('Could not find a tailwind config file');
31
+ }
32
+ const tailwindConfigContent = tree.read(tailwindConfigPath, 'utf-8');
33
+ if (!tailwindConfigContent) {
34
+ throw new Error('Could not read the tailwind config file');
35
+ }
36
+ const tailwindConfigTemplatePath = (0, devkit_1.joinPathFragments)(kitRoot, 'src', 'templates', 'tailwind.extend._template');
37
+ const cssVarsTemplate = (0, fs_1.readFileSync)(tailwindConfigTemplatePath, 'utf-8');
38
+ const extendKeyword = /\bextend:\s*\{/;
39
+ const match = tailwindConfigContent.match(extendKeyword);
40
+ if (!match || !match.index) {
41
+ throw new Error('Could not find the "extend" property in your tailwind config file');
42
+ }
43
+ if (match && match.index) {
44
+ const startIndex = match.index + match[0].length;
45
+ const modifiedTailwindConfigContent = tailwindConfigContent.slice(0, startIndex) +
46
+ cssVarsTemplate +
47
+ tailwindConfigContent.slice(startIndex);
48
+ tree.write(tailwindConfigPath, modifiedTailwindConfigContent);
49
+ }
50
+ }
51
+ function updateRootCss(tree, globalCssPath, kitRoot) {
52
+ const rootCssContent = tree.read(globalCssPath, 'utf-8');
53
+ const tailwindUtilsDirective = '@tailwind utilities;';
54
+ const utilsDirectiveIndex = rootCssContent === null || rootCssContent === void 0 ? void 0 : rootCssContent.indexOf(tailwindUtilsDirective);
55
+ if (!utilsDirectiveIndex) {
56
+ console.error('Could not find the tailwind directives in your global css file');
57
+ return;
58
+ }
59
+ const afterTailwindDirectives = utilsDirectiveIndex + tailwindUtilsDirective.length;
60
+ const firstPart = rootCssContent === null || rootCssContent === void 0 ? void 0 : rootCssContent.slice(0, afterTailwindDirectives);
61
+ const secondPart = rootCssContent === null || rootCssContent === void 0 ? void 0 : rootCssContent.slice(afterTailwindDirectives, rootCssContent.length);
62
+ const pathToGlobalCssTemplate = (0, devkit_1.joinPathFragments)(kitRoot, 'src', 'templates', 'root.css_template');
63
+ const rootCssTemplate = (0, fs_1.readFileSync)(pathToGlobalCssTemplate, 'utf-8');
64
+ const updatedGlobalCssContent = `
65
+ ${firstPart}
66
+ ${rootCssTemplate}
67
+ ${secondPart}
68
+ `;
69
+ tree.write(globalCssPath, updatedGlobalCssContent);
70
+ }
71
+ // CREDIT FOR CODE: Nx Angular plugin
72
+ function getTailwindConfigPath(tree, projectRoot, workspaceRoot) {
73
+ // valid tailwind config files https://github.com/tailwindlabs/tailwindcss/blob/master/src/util/resolveConfigPath.js#L4
74
+ const tailwindConfigFiles = [
75
+ 'tailwind.config.js',
76
+ 'tailwind.config.cjs',
77
+ 'tailwind.config.mjs',
78
+ 'tailwind.config.ts',
79
+ ];
80
+ for (const basePath of [projectRoot, workspaceRoot]) {
81
+ for (const configFile of tailwindConfigFiles) {
82
+ const fullPath = (0, path_1.join)(basePath, configFile);
83
+ if (tree.read(fullPath)) {
84
+ return fullPath;
85
+ }
86
+ }
87
+ }
88
+ return undefined;
89
+ }
90
+ exports.default = setupTailwindGenerator;
91
+ //# sourceMappingURL=setup-tailwind-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-tailwind-generator.js","sourceRoot":"","sources":["../../../../../../pack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{
2
+ componentsRoot?: string;
3
+ styledKit?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=qwik-ui-config.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qwik-ui-config.type.js","sourceRoot":"","sources":["../../../../packages/cli/types/qwik-ui-config.type.ts"],"names":[],"mappings":""}
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/qwik-ui.iml" filepath="$PROJECT_DIR$/.idea/qwik-ui.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/qwik-ui.iml DELETED
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/temp" />
6
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>