alex-c-line 1.26.1 → 1.26.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/LICENSE +21 -0
- package/README.md +106 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License Copyright (c) 2026 alextheman231
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free
|
|
4
|
+
of charge, to any person obtaining a copy of this software and associated
|
|
5
|
+
documentation files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use, copy, modify, merge,
|
|
7
|
+
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice
|
|
12
|
+
(including the next paragraph) shall be included in all copies or substantial
|
|
13
|
+
portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
16
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
18
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
19
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
20
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# alex-c-line
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
[](https://github.com/alextheman231/alex-c-line/actions/workflows/ci.yml)
|
|
8
|
+
[](https://github.com/alextheman231/alex-c-line/actions/workflows/publish.yml)
|
|
9
|
+
|
|
10
|
+
<img src="./artwork/alex-c-line.png" alt="alex-c-line artwork" width=250 height=250>
|
|
11
|
+
|
|
12
|
+
This is my command-line tool, which serves as a developer toolkit that can be used in any repository to streamline the developer workflow. It provides a flexible configuration system so you can customise its behaviour to match your workflow.
|
|
13
|
+
|
|
14
|
+
`alex-c-line` is designed to be developer-first, opinionated where it matters, and safe by default, especially when mutating repository state.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
To install the command-line tool, you can do this locally per working repository using the following command:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install alex-c-line
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`npm` may be replaced with your package manager of choice.
|
|
25
|
+
|
|
26
|
+
Alternatively, you can install it globally for usage all throughout your system, in any working repository. This will allow you to then use `alex-c-line` in repositories that may not even necessarily support it directly, so you can still feel the benefits of some of the more context-agnostic commands.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g alex-c-line
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
You can use any command by typing out `alex-c-line` in the terminal, followed by the command you want to run. For example:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
alex-c-line say-hello
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Some commands may even take extra arguments. For example:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
alex-c-line increment-version v1.2.3 major
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Flags may also be passed through in the following way.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
alex-c-line increment-version v1.2.3 major --no-prefix
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Note that for `use-local-package` specifically, you will need to add `--` before the local `alex-c-line` arguments to ensure that all flags get passed through correctly. Example:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
alex-c-line use-local-package alex-c-line -- increment-version v1.2.3 major --no-prefix
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configs
|
|
59
|
+
|
|
60
|
+
Some commands also support usage of the config system. For example, `pre-commit-2` supports the `alex-c-line.config.js` file, and `use-local-package` supports the more user-specific `.alex-c-line.private.config.js` file. `alex-c-line.config.js` is intended for shared configurations per repository, whereas `.alex-c-line.private.config.js` are for configurations specific to the user's usage.
|
|
61
|
+
|
|
62
|
+
The `configs` subpath provides some helper functions and types that may be helpful when constructing these configs. Namely, `defineAlexCLineConfig` can be used as a type helper, so that you get better type hints in the editor.
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
import { defineAlexCLineConfig } from "alex-c-line/configs";
|
|
66
|
+
|
|
67
|
+
export default defineAlexCLineConfig({
|
|
68
|
+
createPullRequestTemplate: {
|
|
69
|
+
category: "general",
|
|
70
|
+
projectType: "package",
|
|
71
|
+
},
|
|
72
|
+
preCommit: {
|
|
73
|
+
packageManager: "pnpm",
|
|
74
|
+
steps: ["build", "format", "lint", "test"],
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Alternatively, you can create a TypeScript file, then build it to a pure JavaScript file, and the benefit of that is that you'd be able to use the types directly instead, which may be better as it even takes a type argument for the pre-commit steps.
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import type { AlexCLineConfig } from "alex-c-line/configs";
|
|
83
|
+
|
|
84
|
+
import { scripts } from "./package.json" with { type: "json" };
|
|
85
|
+
|
|
86
|
+
const alexCLineConfig: AlexCLineConfig<keyof typeof scripts> = {
|
|
87
|
+
createPullRequestTemplate: {
|
|
88
|
+
category: "general",
|
|
89
|
+
projectType: "package",
|
|
90
|
+
},
|
|
91
|
+
preCommit: {
|
|
92
|
+
packageManager: "pnpm",
|
|
93
|
+
steps: ["build", "format", "lint", "test"],
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default alexCLineConfig;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Note, however, that we do not support directly running config files with TypeScript just yet. This may be planned in the near future, but for now, building the pure TypeScript file to pure JavaScript and using that as the config file is the best bet as of now.
|
|
101
|
+
|
|
102
|
+
Private configs can be treated in the same way, except the type would be `AlexCLinePrivateConfig`, and the function `defineAlexCLinePrivateConfig`. Please also note that if you create a private config in a shared repository, it MUST be added to `.gitignore` so that it stays user-specific and does not get included in version control.
|
|
103
|
+
|
|
104
|
+
## Documentation
|
|
105
|
+
|
|
106
|
+
A full documentation site is coming soon. In the meantime, you may run `alex-c-line --help` for more information about how to use all commands.
|
package/dist/index.cjs
CHANGED
|
@@ -1576,7 +1576,7 @@ function formatError(error) {
|
|
|
1576
1576
|
//#endregion
|
|
1577
1577
|
//#region package.json
|
|
1578
1578
|
var name = "alex-c-line";
|
|
1579
|
-
var version = "1.26.
|
|
1579
|
+
var version = "1.26.2";
|
|
1580
1580
|
var description = "Command-line tool with commands to streamline the developer workflow.";
|
|
1581
1581
|
var package_default = {
|
|
1582
1582
|
name,
|
|
@@ -1586,7 +1586,7 @@ var package_default = {
|
|
|
1586
1586
|
"type": "git",
|
|
1587
1587
|
"url": "git+https://github.com/alextheman231/alex-c-line.git"
|
|
1588
1588
|
},
|
|
1589
|
-
license: "
|
|
1589
|
+
license: "MIT",
|
|
1590
1590
|
author: "alextheman",
|
|
1591
1591
|
type: "module",
|
|
1592
1592
|
exports: {
|
package/dist/index.js
CHANGED
|
@@ -1538,7 +1538,7 @@ function formatError(error) {
|
|
|
1538
1538
|
//#endregion
|
|
1539
1539
|
//#region package.json
|
|
1540
1540
|
var name = "alex-c-line";
|
|
1541
|
-
var version = "1.26.
|
|
1541
|
+
var version = "1.26.2";
|
|
1542
1542
|
var description = "Command-line tool with commands to streamline the developer workflow.";
|
|
1543
1543
|
var package_default = {
|
|
1544
1544
|
name,
|
|
@@ -1548,7 +1548,7 @@ var package_default = {
|
|
|
1548
1548
|
"type": "git",
|
|
1549
1549
|
"url": "git+https://github.com/alextheman231/alex-c-line.git"
|
|
1550
1550
|
},
|
|
1551
|
-
license: "
|
|
1551
|
+
license: "MIT",
|
|
1552
1552
|
author: "alextheman",
|
|
1553
1553
|
type: "module",
|
|
1554
1554
|
exports: {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alex-c-line",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.2",
|
|
4
4
|
"description": "Command-line tool with commands to streamline the developer workflow.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/alextheman231/alex-c-line.git"
|
|
8
8
|
},
|
|
9
|
-
"license": "
|
|
9
|
+
"license": "MIT",
|
|
10
10
|
"author": "alextheman",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|