@ceylar/ada 0.0.9 → 0.0.11

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.
@@ -0,0 +1,8 @@
1
+ import antfuConfig from '@antfu/eslint-config'
2
+
3
+ export default antfuConfig(
4
+ {
5
+ typescript: true,
6
+ e18e: false,
7
+ },
8
+ )
@@ -1,12 +1,12 @@
1
- /** @type {import('prettier').Config} */
2
- export default {
3
- printWidth: 120,
4
- singleQuote: true,
5
- jsxSingleQuote: true,
6
- trailingComma: 'none',
7
- semi: true,
8
- tabWidth: 2,
9
- useTabs: false,
10
- endOfLine: 'crlf',
11
- arrowParens: 'always'
12
- };
1
+ /** @type {import('prettier').Config} */
2
+ export default {
3
+ printWidth: 120,
4
+ singleQuote: true,
5
+ jsxSingleQuote: true,
6
+ trailingComma: 'none',
7
+ semi: true,
8
+ tabWidth: 2,
9
+ useTabs: false,
10
+ endOfLine: 'crlf',
11
+ arrowParens: 'always',
12
+ }
@@ -0,0 +1,7 @@
1
+ /** @type {import('stylelint').Config} */
2
+ export default {
3
+ extends: 'stylelint-config-standard-scss',
4
+ rules: {
5
+ 'selector-class-pattern': ['^[a-z][a-zA-Z0-9]*$', { message: 'Selector should be in camelCase' }],
6
+ },
7
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "jsx": "react-jsx",
5
+ "lib": [
6
+ "dom",
7
+ "dom.iterable",
8
+ "esnext"
9
+ ],
10
+ "baseUrl": ".",
11
+ "module": "esnext",
12
+ "moduleResolution": "bundler",
13
+ "paths": {
14
+ "@/*": [
15
+ "./src/*"
16
+ ]
17
+ },
18
+ "resolveJsonModule": true,
19
+ "allowJs": true,
20
+ "strict": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noUnusedLocals": true,
23
+ "noUnusedParameters": true,
24
+ "newLine": "lf",
25
+ "noEmit": true,
26
+ "sourceMap": true,
27
+ "allowSyntheticDefaultImports": true,
28
+ "esModuleInterop": true,
29
+ "forceConsistentCasingInFileNames": true,
30
+ "isolatedModules": true,
31
+ "skipLibCheck": true
32
+ },
33
+ "exclude": [
34
+ "dist",
35
+ "node_modules"
36
+ ]
37
+ }
@@ -0,0 +1,14 @@
1
+ import antfuConfig from '@antfu/eslint-config'
2
+
3
+ export default antfuConfig(
4
+ {
5
+ typescript: true,
6
+ react: false,
7
+ e18e: false,
8
+ },
9
+ {
10
+ rules: {
11
+ 'no-console': 'off',
12
+ },
13
+ },
14
+ )
package/package.json CHANGED
@@ -1,51 +1,45 @@
1
- {
2
- "name": "@ceylar/ada",
3
- "description": "CLI to help you initialize projects",
4
- "version": "0.0.9",
5
- "license": "MIT",
6
- "type": "module",
7
- "bin": {
8
- "ada": "bin/index.js"
9
- },
10
- "scripts": {
11
- "build": "shx rm -rf dist && cross-env NODE_ENV=production rollup -c --bundleConfigAsCjs",
12
- "dev": "shx rm -rf dist && cross-env NODE_ENV=development rollup -c --bundleConfigAsCjs --watch",
13
- "lint": "eslint .",
14
- "lint:fix": "eslint --fix .",
15
- "format": "prettier --check src --ignore-path .gitignore",
16
- "format:fix": "prettier --write src --ignore-path .gitignore"
17
- },
18
- "devDependencies": {
19
- "@babel/core": "^7.26.9",
20
- "@babel/preset-env": "^7.26.9",
21
- "@babel/preset-react": "^7.26.3",
22
- "@babel/preset-typescript": "^7.26.0",
23
- "@eslint/js": "^9.21.0",
24
- "@rollup/plugin-alias": "^5.1.1",
25
- "@rollup/plugin-babel": "^6.0.4",
26
- "@rollup/plugin-commonjs": "^28.0.2",
27
- "@rollup/plugin-json": "^6.1.0",
28
- "@rollup/plugin-node-resolve": "^16.0.0",
29
- "@rollup/plugin-typescript": "^12.1.2",
30
- "@types/node": "^22.13.4",
31
- "cross-env": "^7.0.3",
32
- "eslint": "^9.21.0",
33
- "eslint-plugin-react": "^7.37.4",
34
- "eslint-plugin-react-hooks": "^5.1.0",
35
- "eslint-plugin-simple-import-sort": "^12.1.1",
36
- "globals": "^16.0.0",
37
- "prettier": "^3.5.2",
38
- "rollup": "^4.34.8",
39
- "rollup-plugin-copy": "^3.5.0",
40
- "shx": "^0.3.4",
41
- "tslib": "^2.8.1",
42
- "typescript": "^5.7.3",
43
- "typescript-eslint": "^8.24.1"
44
- },
45
- "dependencies": {
46
- "commander": "^13.1.0",
47
- "zod": "^3.24.2"
48
- },
49
- "repository": "https://github.com/Ceylar37/ada.git",
50
- "author": "ceylar37 <ceylar37@gmail.com>"
51
- }
1
+ {
2
+ "name": "@ceylar/ada",
3
+ "type": "module",
4
+ "version": "0.0.11",
5
+ "description": "CLI to help you initialize projects",
6
+ "author": "ceylar37 <ceylar37@gmail.com>",
7
+ "license": "MIT",
8
+ "repository": "https://github.com/Ceylar37/ada.git",
9
+ "bin": {
10
+ "ada": "bin/index.js"
11
+ },
12
+ "scripts": {
13
+ "build": "shx rm -rf dist && cross-env NODE_ENV=production rollup -c --bundleConfigAsCjs",
14
+ "dev": "shx rm -rf dist && cross-env NODE_ENV=development rollup -c --bundleConfigAsCjs --watch",
15
+ "lint": "eslint -c eslint.config.ts .",
16
+ "lint:fix": "eslint -c eslint.config.ts --fix .",
17
+ "format": "prettier --check src --ignore-path .gitignore",
18
+ "format:fix": "prettier --write src --ignore-path .gitignore"
19
+ },
20
+ "dependencies": {
21
+ "commander": "^13.1.0",
22
+ "zod": "^3.24.2"
23
+ },
24
+ "devDependencies": {
25
+ "@antfu/eslint-config": "^8.0.0",
26
+ "@babel/core": "^7.26.9",
27
+ "@babel/preset-env": "^7.26.9",
28
+ "@babel/preset-typescript": "^7.26.0",
29
+ "@rollup/plugin-alias": "^5.1.1",
30
+ "@rollup/plugin-babel": "^6.0.4",
31
+ "@rollup/plugin-commonjs": "^28.0.2",
32
+ "@rollup/plugin-json": "^6.1.0",
33
+ "@rollup/plugin-node-resolve": "^16.0.0",
34
+ "@rollup/plugin-typescript": "^12.1.2",
35
+ "@types/node": "^25.5.0",
36
+ "cross-env": "^7.0.3",
37
+ "eslint": "^10.1.0",
38
+ "jiti": "^2.6.1",
39
+ "rollup": "^4.34.8",
40
+ "rollup-plugin-copy": "^3.5.0",
41
+ "shx": "^0.3.4",
42
+ "tslib": "^2.8.1",
43
+ "typescript": "^5.7.3"
44
+ }
45
+ }
package/readme.md CHANGED
@@ -1,3 +1,3 @@
1
- ### ada
2
-
3
- CLI to help you initialize your javascript projects
1
+ ### ada
2
+
3
+ CLI to help you initialize your javascript projects
@@ -1,67 +1,8 @@
1
- import js from '@eslint/js';
2
- import react from 'eslint-plugin-react';
3
- import reactHooks from 'eslint-plugin-react-hooks';
4
- import simpleImportSort from 'eslint-plugin-simple-import-sort';
5
- import globals from 'globals';
6
- import ts from 'typescript-eslint';
7
-
8
- /** @type {import('eslint').Linter.Config<Linter.RulesRecord>[]} */
9
- export default ts.config(
10
- js.configs.recommended,
11
- ...ts.configs.recommended,
12
- {
13
- plugins: {
14
- react: react,
15
- 'react-hooks': reactHooks,
16
- 'simple-import-sort': simpleImportSort,
17
- ts: ts.plugin
18
- },
19
- rules: {
20
- 'prefer-const': 'error',
21
- 'no-else-return': 'error',
22
-
23
- 'react-hooks/exhaustive-deps': 'off',
24
-
25
- 'no-console': 'warn',
26
-
27
- 'simple-import-sort/exports': 'error',
28
- 'simple-import-sort/imports': [
29
- 'error',
30
- {
31
- groups: [
32
- ['^react', '^@?\\w'],
33
- ['^@(([\\/.]?\\w)|assets|test-utils)'],
34
- ['^\\u0000'],
35
- ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
36
- ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
37
- ['^.+\\.s?css$']
38
- ]
39
- }
40
- ]
41
- },
42
- languageOptions: {
43
- globals: {
44
- ...globals.node,
45
- ...globals.browser,
46
- ...globals.es2022
47
- }
48
- }
49
- },
50
- {
51
- languageOptions: {
52
- parserOptions: {
53
- project: ['tsconfig.json']
54
- }
55
- },
56
- files: ['/src/**/*.ts', '/src/**/*.tsx']
57
- },
58
- {
59
- languageOptions: {
60
- parserOptions: react.configs.recommended.parserOptions
61
- },
62
- files: ['/src/**/*.js', '/src/**/*.jsx']
63
- },
64
- {
65
- ignores: ['node_modules', 'build', 'dist']
66
- }
67
- );
1
+ import antfuConfig from '@antfu/eslint-config'
2
+
3
+ export default antfuConfig(
4
+ {
5
+ typescript: true,
6
+ e18e: false,
7
+ },
8
+ )
@@ -1,12 +1,12 @@
1
- /** @type {import('prettier').Config} */
2
- export default {
3
- printWidth: 120,
4
- singleQuote: true,
5
- jsxSingleQuote: true,
6
- trailingComma: 'none',
7
- semi: true,
8
- tabWidth: 2,
9
- useTabs: false,
10
- endOfLine: 'crlf',
11
- arrowParens: 'always'
12
- };
1
+ /** @type {import('prettier').Config} */
2
+ export default {
3
+ printWidth: 120,
4
+ singleQuote: true,
5
+ jsxSingleQuote: true,
6
+ trailingComma: 'none',
7
+ semi: true,
8
+ tabWidth: 2,
9
+ useTabs: false,
10
+ endOfLine: 'crlf',
11
+ arrowParens: 'always',
12
+ }
@@ -1,7 +1,7 @@
1
- /** @type {import('stylelint').Config} */
2
- export default {
3
- extends: 'stylelint-config-standard-scss',
4
- rules: {
5
- 'selector-class-pattern': ['^[a-z][a-zA-Z0-9]*$', { message: 'Selector should be in camelCase' }]
6
- }
7
- };
1
+ /** @type {import('stylelint').Config} */
2
+ export default {
3
+ extends: 'stylelint-config-standard-scss',
4
+ rules: {
5
+ 'selector-class-pattern': ['^[a-z][a-zA-Z0-9]*$', { message: 'Selector should be in camelCase' }],
6
+ },
7
+ }
@@ -1,37 +1,37 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "lib": [
5
- "dom",
6
- "dom.iterable",
7
- "esnext"
8
- ],
9
- "allowJs": true,
10
- "skipLibCheck": true,
11
- "esModuleInterop": true,
12
- "allowSyntheticDefaultImports": true,
13
- "strict": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "module": "esnext",
16
- "newLine": "lf",
17
- "moduleResolution": "bundler",
18
- "isolatedModules": true,
19
- "resolveJsonModule": true,
20
- "noEmit": true,
21
- "jsx": "react-jsx",
22
- "sourceMap": true,
23
- "noUnusedLocals": true,
24
- "noUnusedParameters": true,
25
- "noFallthroughCasesInSwitch": true,
26
- "baseUrl": ".",
27
- "paths": {
28
- "@/*": [
29
- "./src/*"
30
- ],
31
- }
32
- },
33
- "exclude": [
34
- "dist",
35
- "node_modules",
36
- ]
37
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "jsx": "react-jsx",
5
+ "lib": [
6
+ "dom",
7
+ "dom.iterable",
8
+ "esnext"
9
+ ],
10
+ "baseUrl": ".",
11
+ "module": "esnext",
12
+ "moduleResolution": "bundler",
13
+ "paths": {
14
+ "@/*": [
15
+ "./src/*"
16
+ ]
17
+ },
18
+ "resolveJsonModule": true,
19
+ "allowJs": true,
20
+ "strict": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noUnusedLocals": true,
23
+ "noUnusedParameters": true,
24
+ "newLine": "lf",
25
+ "noEmit": true,
26
+ "sourceMap": true,
27
+ "allowSyntheticDefaultImports": true,
28
+ "esModuleInterop": true,
29
+ "forceConsistentCasingInFileNames": true,
30
+ "isolatedModules": true,
31
+ "skipLibCheck": true
32
+ },
33
+ "exclude": [
34
+ "dist",
35
+ "node_modules"
36
+ ]
37
+ }
package/rollup.config.ts CHANGED
@@ -1,55 +1,56 @@
1
- import alias from '@rollup/plugin-alias';
2
- import babel from '@rollup/plugin-babel';
3
- import commonjs from '@rollup/plugin-commonjs';
4
- import json from '@rollup/plugin-json';
5
- import resolve from '@rollup/plugin-node-resolve';
6
- import typescript from '@rollup/plugin-typescript';
7
-
8
- import packageJSON from './package.json';
9
-
10
- import { resolve as resolvePath } from 'path';
11
- import copy from 'rollup-plugin-copy';
12
-
13
- const sourcemap = false;
14
- const input = 'src/index.ts';
15
- const banner = `/* @license ${packageJSON.name} v${packageJSON.version} */`;
16
-
17
- const isDev = process.env.NODE_ENV === 'development';
18
-
19
- /** @type {import('rollup').RollupOptions[]} */
20
- export default [
21
- {
22
- input,
23
- output: Object.values(packageJSON.bin).map((bin) => ({
24
- format: 'esm',
25
- file: bin,
26
- sourcemap,
27
- banner
28
- })),
29
- plugins: [
30
- alias({
31
- entries: [{ find: '@', replacement: resolvePath(__dirname, './src') }]
32
- }),
33
- resolve({
34
- extensions: ['.js', '.ts']
35
- }),
36
- commonjs({
37
- include: /node_modules/,
38
- ignoreDynamicRequires: true
39
- }),
40
- typescript({
41
- tsconfig: './tsconfig.json',
42
- compilerOptions: { noCheck: isDev },
43
- noForceEmit: true
44
- }),
45
- babel({
46
- exclude: /node_modules/,
47
- extensions: ['.js', '.ts']
48
- }),
49
- json(),
50
- copy({
51
- targets: [{ src: 'resources/*', dest: 'bin/resources' }]
52
- })
53
- ]
54
- }
55
- ];
1
+ import { resolve as resolvePath } from 'node:path'
2
+ import process from 'node:process'
3
+ import alias from '@rollup/plugin-alias'
4
+ import babel from '@rollup/plugin-babel'
5
+ import commonjs from '@rollup/plugin-commonjs'
6
+ import json from '@rollup/plugin-json'
7
+
8
+ import resolve from '@rollup/plugin-node-resolve'
9
+
10
+ import typescript from '@rollup/plugin-typescript'
11
+ import copy from 'rollup-plugin-copy'
12
+ import packageJSON from './package.json'
13
+
14
+ const sourcemap = false
15
+ const input = 'src/index.ts'
16
+ const banner = `/* @license ${packageJSON.name} v${packageJSON.version} */`
17
+
18
+ const isDev = process.env.NODE_ENV === 'development'
19
+
20
+ /** @type {import('rollup').RollupOptions[]} */
21
+ export default [
22
+ {
23
+ input,
24
+ output: Object.values(packageJSON.bin).map(bin => ({
25
+ format: 'esm',
26
+ file: bin,
27
+ sourcemap,
28
+ banner,
29
+ })),
30
+ plugins: [
31
+ alias({
32
+ entries: [{ find: '@', replacement: resolvePath(__dirname, './src') }],
33
+ }),
34
+ resolve({
35
+ extensions: ['.js', '.ts'],
36
+ }),
37
+ commonjs({
38
+ include: /node_modules/,
39
+ ignoreDynamicRequires: true,
40
+ }),
41
+ typescript({
42
+ tsconfig: './tsconfig.json',
43
+ compilerOptions: { noCheck: isDev },
44
+ noForceEmit: true,
45
+ }),
46
+ babel({
47
+ exclude: /node_modules/,
48
+ extensions: ['.js', '.ts'],
49
+ }),
50
+ json(),
51
+ copy({
52
+ targets: [{ src: 'resources/*', dest: 'bin/resources' }],
53
+ }),
54
+ ],
55
+ },
56
+ ]
@@ -1,21 +1,21 @@
1
- import { get as getConfig } from '@/config';
2
- import { selectConfigSchema } from '@/config/schema';
3
- import { isEmpty } from '@/util';
4
-
5
- import { AppCommand } from '../type';
6
-
7
- const get: AppCommand<typeof selectConfigSchema> = {
8
- name: 'get',
9
- description: 'get variables from config',
10
- options: [['-m, --manager', 'package manager that will be used to install dependencies']],
11
- schema: selectConfigSchema,
12
- action: (options) => {
13
- if (isEmpty(options)) {
14
- console.log(getConfig());
15
- return;
16
- }
17
- console.log(getConfig(options));
18
- }
19
- };
20
-
21
- export { get };
1
+ import type { AppCommand } from '../type'
2
+ import { get as getConfig } from '@/config'
3
+ import { selectConfigSchema } from '@/config/schema'
4
+
5
+ import { isEmpty } from '@/util'
6
+
7
+ const get: AppCommand<typeof selectConfigSchema> = {
8
+ name: 'get',
9
+ description: 'get variables from config',
10
+ options: [['-m, --manager', 'package manager that will be used to install dependencies']],
11
+ schema: selectConfigSchema,
12
+ action: (options) => {
13
+ if (isEmpty(options)) {
14
+ console.log(getConfig())
15
+ return
16
+ }
17
+ console.log(getConfig(options))
18
+ },
19
+ }
20
+
21
+ export { get }
@@ -1,3 +1,3 @@
1
- export { get } from './get';
2
- export { init } from './init';
3
- export { set } from './set';
1
+ export { get } from './get'
2
+ export { init } from './init'
3
+ export { set } from './set'