-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from pipelinit/refactor/separation-of-core-and…
…-cli Split the project into core and cli
- Loading branch information
Showing
74 changed files
with
410 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
cov_profile | ||
app.bundle.js | ||
bin/* | ||
!bin/.gitkeep | ||
cli/bin/* | ||
!cli/bin/.gitkeep | ||
core/dist/* | ||
!core/dist/.gitkeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Pipelinit CLI | ||
|
||
Here is the code for the Pipelinit CLI, to learn more about the project, read | ||
the [README in the project root](../README.md). | ||
|
||
## Developmenting and contributing | ||
|
||
Pipelinit is built with Deno. To develop, test or build the project, make sure | ||
you have Deno installed. You can check how to install it | ||
[in the official Deno website](https://deno.land/#installation) | ||
|
||
### Manual testing | ||
|
||
To quickly test the tool in your local environment, install it as a script. In | ||
this project root run: | ||
|
||
``` | ||
deno install \ | ||
--unstable \ | ||
--allow-read=. \ | ||
--allow-write=. \ | ||
pipelinit.ts | ||
``` | ||
|
||
When you update the code in the repository, just run "pipelinit" again in the | ||
target project to start the CLI with the latest changes. | ||
|
||
### Compiling | ||
|
||
To generate compiled executables for Linux, Windows, and macOS, run the | ||
following command: | ||
|
||
``` | ||
deno run --unstable --allow-read --allow-write --allow-net --allow-env --allow-run build.ts | ||
``` | ||
|
||
This creates one executable per target with the following name pattern: | ||
|
||
``` | ||
pipelinit-<VERSION>-<TARGET> | ||
``` | ||
|
||
And the correspondent compressed file: | ||
|
||
- .tar.gz for Linux and macOS | ||
- .zip for Widnows | ||
|
||
It also generates one executable named just "pipelinit", that uses the native | ||
target (the computer where you ran the build). | ||
|
||
The build script puts those files in the "bin" directory. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
src/cli/commands/default.ts → cli/src/cli/commands/default.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Context, log, PIPELINIT_VERSION, semver } from "../../deps.ts"; | ||
import { | ||
each, | ||
includes, | ||
readJSON, | ||
readLines, | ||
readText, | ||
readToml, | ||
} from "./files.ts"; | ||
import { errors } from "./errors.ts"; | ||
|
||
export const context: Context = { | ||
getLogger: log.getLogger, | ||
files: { | ||
each, | ||
includes, | ||
readJSON, | ||
readLines, | ||
readText, | ||
readToml, | ||
}, | ||
errors: { | ||
add: errors.add, | ||
}, | ||
semver, | ||
suggestDefault: true, | ||
version: PIPELINIT_VERSION, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# @pipelinit/core | ||
|
||
Stack detection and CI configuration writing from pipelinit | ||
|
||
## Developmenting and contributing | ||
|
||
### Publishing | ||
|
||
To prepare this library to publish at npm, run | ||
``` | ||
deno run \ | ||
--unstable \ | ||
--allow-read \ | ||
--allow-write \ | ||
--allow-run package.ts | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// std | ||
export { assertEquals } from "https://deno.land/std@0.106.0/testing/asserts.ts"; | ||
export { deepMerge } from "https://deno.land/std@0.104.0/collections/mod.ts"; | ||
|
||
// x/semver | ||
export * as semver from "https://deno.land/x/semver@v1.4.0/mod.ts"; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from "./types.ts"; | ||
export * from "./version.ts"; | ||
export * from "./plugins/mod.ts"; | ||
export * from "./templates/mod.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "@pipelinit/core", | ||
"version": "0.1.0-rc.3", | ||
"description": "Stack detection and CI configuration writing from pipelinit", | ||
"exports": "./dist/mod.js", | ||
"types": "./dist/mod.d.ts", | ||
"repository": "https://github.com/pipelinit/pipelinit-cli", | ||
"author": "Pipelinit Developers", | ||
"license": "MIT", | ||
"type": "module", | ||
"private": false, | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
"files": [ | ||
"dist" | ||
] | ||
} |
Oops, something went wrong.