feat: ✨ create the eslegant package
This commit is contained in:
5
.changeset/pretty-buckets-cover.md
Normal file
5
.changeset/pretty-buckets-cover.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"eslegant": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Created the ESLegant package, being now the actual command that runs the CLI with the ESLegant's configs
|
||||||
5
.changeset/swift-dragons-tell.md
Normal file
5
.changeset/swift-dragons-tell.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"create-eslegant": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Created the "create-eslegant" package, as a _alias_ to the eslegant package, so it is compatible with `npm init` or `npm create` commands
|
||||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -23,6 +23,6 @@
|
|||||||
"yaml"
|
"yaml"
|
||||||
],
|
],
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"ESLIT"
|
"eslegant"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
4
packages/create-eslegant/bin.js
Normal file
4
packages/create-eslegant/bin.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import Cli from '@eslit/cli';
|
||||||
|
|
||||||
|
const cli = new Cli({ configs: (await import('./configs.js')).default, dir: process.cwd() });
|
||||||
|
await cli.run();
|
||||||
34
packages/create-eslegant/configs.js
Normal file
34
packages/create-eslegant/configs.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
/** @type {import('@eslit/cli').Config[]} */
|
||||||
|
const cliConfig = [
|
||||||
|
{
|
||||||
|
name: 'framework',
|
||||||
|
type: 'multiple',
|
||||||
|
description: 'The UI frameworks being used in the project',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'svelte',
|
||||||
|
packages: { 'svelte': 'svelte' },
|
||||||
|
configs: ['svelte.recommended'],
|
||||||
|
detect: ['**/*.svelte', 'svelte.config.{js,ts,cjs,cts}'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'vue',
|
||||||
|
packages: { 'vue': ['vue', ['hello', 'world']], 'svelte': ['hello'] },
|
||||||
|
configs: ['vue.recommended'],
|
||||||
|
detect: ['nuxt.config.{js,ts,cjs,cts}', '**/*.vue'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'strict',
|
||||||
|
type: 'confirm',
|
||||||
|
manual: true,
|
||||||
|
options: [{
|
||||||
|
name: 'yes',
|
||||||
|
packages: { 'eslint': 'config', 'svelte': ['test1'] },
|
||||||
|
configs: ['config.strict'],
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export default cliConfig;
|
||||||
5
packages/create-eslegant/jsconfig.json
Normal file
5
packages/create-eslegant/jsconfig.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"exclude": ["./node_modules/**", "./dist/**"],
|
||||||
|
"include": ["**/*.ts", "**/*.js"],
|
||||||
|
}
|
||||||
33
packages/create-eslegant/package.json
Normal file
33
packages/create-eslegant/package.json
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "create-eslegant",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "",
|
||||||
|
"keywords": [],
|
||||||
|
"author": {
|
||||||
|
"email": "contact.guz013@gmail.com",
|
||||||
|
"name": "Gustavo \"Guz\" L. de Mello",
|
||||||
|
"url": "https://guz.one"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"./bin.js",
|
||||||
|
"./configs.js"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"@eslit/cli": "workspace:*"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/LoredDev/ESLit",
|
||||||
|
"type": "module",
|
||||||
|
"repository": {
|
||||||
|
"directory": "packages/create-eslegant",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/LoredDev/ESLit"
|
||||||
|
},
|
||||||
|
"bin": "./bin.js",
|
||||||
|
"license": "MIT",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^20.5.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
4
packages/eslegant/bin.js
Normal file
4
packages/eslegant/bin.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import Cli from '@eslit/cli';
|
||||||
|
|
||||||
|
const cli = new Cli({ configs: (await import('./configs.js')).default, dir: process.cwd() });
|
||||||
|
await cli.run();
|
||||||
34
packages/eslegant/configs.js
Normal file
34
packages/eslegant/configs.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
/** @type {import('@eslit/cli').Config[]} */
|
||||||
|
const cliConfig = [
|
||||||
|
{
|
||||||
|
name: 'framework',
|
||||||
|
type: 'multiple',
|
||||||
|
description: 'The UI frameworks being used in the project',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'svelte',
|
||||||
|
packages: { 'svelte': 'svelte' },
|
||||||
|
configs: ['svelte.recommended'],
|
||||||
|
detect: ['**/*.svelte', 'svelte.config.{js,ts,cjs,cts}'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'vue',
|
||||||
|
packages: { 'vue': ['vue', ['hello', 'world']], 'svelte': ['hello'] },
|
||||||
|
configs: ['vue.recommended'],
|
||||||
|
detect: ['nuxt.config.{js,ts,cjs,cts}', '**/*.vue'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'strict',
|
||||||
|
type: 'confirm',
|
||||||
|
manual: true,
|
||||||
|
options: [{
|
||||||
|
name: 'yes',
|
||||||
|
packages: { 'eslint': 'config', 'svelte': ['test1'] },
|
||||||
|
configs: ['config.strict'],
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export default cliConfig;
|
||||||
5
packages/eslegant/jsconfig.json
Normal file
5
packages/eslegant/jsconfig.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"exclude": ["./node_modules/**", "./dist/**"],
|
||||||
|
"include": ["**/*.ts", "**/*.js"],
|
||||||
|
}
|
||||||
20
pnpm-lock.yaml
generated
20
pnpm-lock.yaml
generated
@@ -177,6 +177,26 @@ importers:
|
|||||||
specifier: ^5.1.6
|
specifier: ^5.1.6
|
||||||
version: 5.1.6
|
version: 5.1.6
|
||||||
|
|
||||||
|
packages/create-eslegant:
|
||||||
|
dependencies:
|
||||||
|
'@eslit/cli':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../cli
|
||||||
|
devDependencies:
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^20.5.3
|
||||||
|
version: 20.5.3
|
||||||
|
|
||||||
|
packages/eslegant:
|
||||||
|
dependencies:
|
||||||
|
'@eslit/cli':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../cli
|
||||||
|
devDependencies:
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^20.5.3
|
||||||
|
version: 20.5.3
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
/@aashutoshrathi/word-wrap@1.2.6:
|
/@aashutoshrathi/word-wrap@1.2.6:
|
||||||
|
|||||||
Reference in New Issue
Block a user