@ceylar/ada 0.0.2 → 0.0.4

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/eslint.config.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import js from '@eslint/js';
2
+
2
3
  import react from 'eslint-plugin-react';
3
4
  import reactHooks from 'eslint-plugin-react-hooks';
4
5
  import simpleImportSort from 'eslint-plugin-simple-import-sort';
@@ -20,16 +21,11 @@ export default ts.config(
20
21
  'prefer-const': 'error',
21
22
  'no-else-return': 'error',
22
23
 
23
- 'react-hooks/exhaustive-deps': 'off',
24
-
25
- 'no-console': 'warn',
26
-
27
24
  'simple-import-sort/exports': 'error',
28
25
  'simple-import-sort/imports': [
29
26
  'error',
30
27
  {
31
28
  groups: [
32
- ['^react', '^@?\\w'],
33
29
  ['^@(([\\/.]?\\w)|assets|test-utils)'],
34
30
  ['^\\u0000'],
35
31
  ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
@@ -62,6 +58,6 @@ export default ts.config(
62
58
  files: ['/src/**/*.js', '/src/**/*.jsx']
63
59
  },
64
60
  {
65
- ignores: ['node_modules', 'build', 'dist']
61
+ ignores: ['node_modules', 'bin']
66
62
  }
67
63
  );
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@ceylar/ada",
3
3
  "description": "CLI to help you initialize projects",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "bin": {
8
- "ada": "dist/index.js"
8
+ "ada": "bin/index.js"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "shx rm -rf dist && cross-env NODE_ENV=production rollup -c --bundleConfigAsCjs",
12
12
  "dev": "shx rm -rf dist && cross-env NODE_ENV=development rollup -c --bundleConfigAsCjs --watch",
13
13
  "lint": "eslint .",
14
14
  "lint:fix": "eslint --fix .",
15
- "format": "prettier --check src --ignore-path .gitignore",
16
- "format:fix": "prettier --write src --ignore-path .gitignore"
15
+ "format": "prettier --check src --ignore-path .prettierignore",
16
+ "format:fix": "prettier --write src --ignore-path .prettierignore"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.26.9",
@@ -26,7 +26,6 @@
26
26
  "@rollup/plugin-commonjs": "^28.0.2",
27
27
  "@rollup/plugin-json": "^6.1.0",
28
28
  "@rollup/plugin-node-resolve": "^16.0.0",
29
- "@rollup/plugin-terser": "^0.4.4",
30
29
  "@rollup/plugin-typescript": "^12.1.2",
31
30
  "@types/node": "^22.13.4",
32
31
  "cross-env": "^7.0.3",
package/rollup.config.ts CHANGED
@@ -3,7 +3,6 @@ import babel from '@rollup/plugin-babel';
3
3
  import commonjs from '@rollup/plugin-commonjs';
4
4
  import json from '@rollup/plugin-json';
5
5
  import resolve from '@rollup/plugin-node-resolve';
6
- import terser from '@rollup/plugin-terser';
7
6
  import typescript from '@rollup/plugin-typescript';
8
7
 
9
8
  import packageJSON from './package.json';
@@ -45,15 +44,12 @@ export default [
45
44
  }),
46
45
  babel({
47
46
  exclude: /node_modules/,
48
- extensions: ['.js', '.ts'],
49
- babelHelpers: 'bundled',
50
- presets: ['@babel/preset-env', '@babel/preset-typescript']
47
+ extensions: ['.js', '.ts']
51
48
  }),
52
49
  json(),
53
50
  copy({
54
51
  targets: [{ src: 'resources/*', dest: 'dist/resources' }]
55
- }),
56
- ...(!isDev ? [terser()] : [])
52
+ })
57
53
  ]
58
54
  }
59
55
  ];
@@ -91,7 +91,13 @@ const init: AppCommand<typeof initSchema> = {
91
91
  );
92
92
  }
93
93
 
94
- Object.entries(rest).forEach(([key, value]) => {
94
+ const initOptions = Object.entries(rest);
95
+
96
+ if (initOptions.length === 0) {
97
+ return logger.error('Specify at least one of the instrument to setup.');
98
+ }
99
+
100
+ initOptions.forEach(([key, value]) => {
95
101
  if (value) {
96
102
  setupFunctionsDictionary[key as keyof typeof rest](manager);
97
103
  }
package/src/index.ts CHANGED
@@ -11,7 +11,9 @@ program.name('ada');
11
11
  program.version(packageJSON.version);
12
12
 
13
13
  Object.values(commands).map((command) => {
14
- const currentCommand = program.command(command.name, { isDefault: command.isDefault });
14
+ const currentCommand = program.command(command.name, {
15
+ isDefault: command.isDefault
16
+ });
15
17
 
16
18
  currentCommand.description(command.description);
17
19