Skip to content

Commit

Permalink
refactor: separate project in core and cli
Browse files Browse the repository at this point in the history
Split the project in two main parts: the
core and the cli.

The core module contains plugin implementations
and the builtin templates, as well as types
and interfaces definitions required to use
the core code.

The cli module contains the code to build the
CLI using the code and builtin templates from
the core.
  • Loading branch information
oesgalha committed Sep 2, 2021
1 parent eb40a48 commit 02b86ad
Show file tree
Hide file tree
Showing 62 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,4 +1,4 @@
cov_profile
app.bundle.js
bin/*
!bin/.gitkeep
cli/bin/*
!cli/bin/.gitkeep
File renamed without changes.
2 changes: 1 addition & 1 deletion buckets.ts → cli/buckets.ts
Expand Up @@ -5,7 +5,7 @@ export default {
buckets: [
{
name: "templates",
folder: "templates",
folder: "../core/templates",
},
],
output: "app.bundle.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
import { platformWriters } from "../../../plugins/platforms/mod.ts";
import { platformWriters } from "../../../../core/plugins/platforms/mod.ts";
import { introspect } from "../../stack/mod.ts";
import { renderTemplates } from "../../template/mod.ts";
import { prelude } from "../prelude/mod.ts";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
import { colors, log } from "../../../deps.ts";
import { introspectors } from "../../../plugins/mod.ts";
import { introspectors } from "../../../../core/plugins/mod.ts";

/**
* Behaves like the ConsoleHandler, but doesn't change the
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
import { log } from "../../deps.ts";
import { context } from "../plugin/mod.ts";
import { introspectors, ProjectData } from "../../plugins/stack/mod.ts";
import { introspectors, ProjectData } from "../../../core/plugins/stack/mod.ts";

export type Stack = Record<string, ProjectData>;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions core/plugins/platforms/deps.ts
@@ -0,0 +1,2 @@
export { ensureFile, log } from "../../../cli/deps.ts";
export * from "../../../cli/src/platform/plugin.ts";
@@ -1,6 +1,6 @@
import { context } from "../../../src/plugin/mod.ts";
import { assertEquals, deepMerge } from "../../../deps.ts";
import { RenderedTemplate } from "../../../src/platform/plugin.ts";
import { context } from "../../../../cli/src/plugin/mod.ts";
import { assertEquals, deepMerge } from "../../../../cli/deps.ts";
import { RenderedTemplate } from "../../../../cli/src/platform/plugin.ts";

import { github } from "./mod.ts";

Expand Down
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
import { context } from "../../../../src/plugin/mod.ts";
import { assertEquals, deepMerge } from "../../../../deps.ts";
import { context } from "../../../../../cli/src/plugin/mod.ts";
import { assertEquals, deepMerge } from "../../../../../cli/deps.ts";

import { introspect } from "./mod.ts";

Expand Down
File renamed without changes.
@@ -1,5 +1,5 @@
import { context } from "../../../../src/plugin/mod.ts";
import { assertEquals, deepMerge } from "../../../../deps.ts";
import { context } from "../../../../../cli/src/plugin/mod.ts";
import { assertEquals, deepMerge } from "../../../../../cli/deps.ts";

import { introspect } from "./mod.ts";

Expand Down
@@ -1,5 +1,5 @@
import { context } from "../../../../src/plugin/mod.ts";
import { assertEquals, deepMerge, WalkEntry } from "../../../../deps.ts";
import { context } from "../../../../../cli/src/plugin/mod.ts";
import { assertEquals, deepMerge, WalkEntry } from "../../../../../cli/deps.ts";

import { introspect } from "./mod.ts";

Expand Down
File renamed without changes.
@@ -1,5 +1,5 @@
import { context } from "../../../../src/plugin/mod.ts";
import { assertEquals, deepMerge, WalkEntry } from "../../../../deps.ts";
import { context } from "../../../../../cli/src/plugin/mod.ts";
import { assertEquals, deepMerge, WalkEntry } from "../../../../../cli/deps.ts";

import { introspect } from "./mod.ts";

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions core/plugins/stack/deps.ts
@@ -0,0 +1 @@
export * from "../../../cli/src/plugin/mod.ts";
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
import { context } from "../../../src/plugin/mod.ts";
import { assertEquals, deepMerge, WalkEntry } from "../../../deps.ts";
import { context } from "../../../../cli/src/plugin/mod.ts";
import { assertEquals, deepMerge, WalkEntry } from "../../../../cli/deps.ts";

import { introspector } from "./mod.ts";

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions plugins/platforms/deps.ts

This file was deleted.

1 change: 0 additions & 1 deletion plugins/stack/deps.ts

This file was deleted.

0 comments on commit 02b86ad

Please sign in to comment.