Skip to content

Commit

Permalink
refactor: Drop server-deps.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
bebraw committed Feb 28, 2024
1 parent 2b1dd7b commit 574b7a9
Show file tree
Hide file tree
Showing 27 changed files with 29 additions and 32 deletions.
2 changes: 1 addition & 1 deletion build_breeze_for_npm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts";
import { path } from "./server-deps.ts";
import * as path from "node:path";

async function buildForNpm(name: string, version: string) {
if (!version) {
Expand Down
2 changes: 1 addition & 1 deletion build_gustwind_for_npm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts";
import { path } from "./server-deps.ts";
import * as path from "node:path";

async function buildForNpm(name: string, version: string) {
if (!version) {
Expand Down
2 changes: 1 addition & 1 deletion build_htmlisp_for_npm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts";
import { path } from "./server-deps.ts";
import * as path from "node:path";

async function buildForNpm(name: string, version: string) {
if (!version) {
Expand Down
3 changes: 2 additions & 1 deletion compilePluginScripts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as esbuild from "https://deno.land/x/esbuild@v0.19.4/mod.js";
import { fs, path } from "./server-deps.ts";
import * as path from "node:path";
import * as fs from "https://deno.land/std@0.207.0/fs/mod.ts";
import { compileTypeScript } from "./utilities/compileTypeScript.ts";
import editorScriptsToCompile from "./plugins/editor/scriptsToCompile.ts";
import webSocketScriptsToCompile from "./plugins/websocket/scriptsToCompile.ts";
Expand Down
3 changes: 2 additions & 1 deletion gustwind-builder/buildWorker.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/// <reference no-default-lib="true" />
/// <reference lib="deno.worker" />
import * as path from "node:path";
import * as fs from "https://deno.land/std@0.207.0/fs/mod.ts";
import { nanoid } from "https://cdn.skypack.dev/nanoid@5.0.2?min";
import { applyPlugins, importPlugins } from "../gustwind-utilities/plugins.ts";
import { fs, path } from "../server-deps.ts";
import { initLoadApi } from "../load-adapters/deno.ts";
import type { PluginDefinition } from "../gustwind-utilities/plugins.ts";
import type { BuildWorkerEvent } from "../types.ts";
Expand Down
3 changes: 2 additions & 1 deletion gustwind-builder/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fs, path } from "../server-deps.ts";
import * as path from "node:path";
import * as fs from "https://deno.land/std@0.207.0/fs/mod.ts";
import {
cleanUpPlugins,
finishPlugins,
Expand Down
2 changes: 1 addition & 1 deletion gustwind-cli/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <reference lib="dom" />
/// <reference lib="esnext" />
// Derived from https://github.com/kt3k/twd
import { path } from "../server-deps.ts";
import * as path from "node:path";
import * as flags from "https://deno.land/std@0.207.0/flags/mod.ts";
import { VERSION } from "../version.ts";
import { build as buildProject } from "../gustwind-builder/mod.ts";
Expand Down
2 changes: 1 addition & 1 deletion gustwind-dev-server/evaluateTasks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { path } from "../server-deps.ts";
import * as path from "node:path";
import { dir } from "../utilities/fs.ts";
import type { Tasks } from "../types.ts";

Expand Down
2 changes: 1 addition & 1 deletion gustwind-dev-server/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "node:path";
import { contentType } from "https://deno.land/std@0.207.0/media_types/mod.ts";
import { path } from "../server-deps.ts";
import { initLoadApi } from "../load-adapters/deno.ts";
import { respond } from "../gustwind-utilities/respond.ts";
import {
Expand Down
2 changes: 1 addition & 1 deletion gustwind-serve/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from "node:path";
import { contentType } from "https://deno.land/std@0.207.0/media_types/mod.ts";
import { respond } from "../gustwind-utilities/respond.ts";
import { path } from "../server-deps.ts";

function gustwindServe({ cwd, input, port }: {
cwd: string;
Expand Down
2 changes: 1 addition & 1 deletion plugins/breezewind-renderer/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { path } from "../../server-deps.ts";
import * as path from "node:path";
import breezewind from "../../breezewind/mod.ts";
import type { Component } from "../../breezewind/types.ts";
import { applyUtilities } from "../../breezewind/applyUtility.ts";
Expand Down
2 changes: 1 addition & 1 deletion plugins/config-router/expandRoutes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { path as _path } from "../../server-deps.ts";
import * as _path from "node:path";
import { applyUtilities } from "../../breezewind/applyUtility.ts";
import { defaultUtilities } from "../../breezewind/defaultUtilities.ts";
import { get } from "../../utilities/functional.ts";
Expand Down
2 changes: 1 addition & 1 deletion plugins/config-router/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from "node:path";
import { expandRoute, expandRoutes } from "./expandRoutes.ts";
import { flattenRoutes } from "./flattenRoutes.ts";
import { path } from "../../server-deps.ts";
import { trim } from "../../utilities/string.ts";
import type {
DataSources,
Expand Down
2 changes: 1 addition & 1 deletion plugins/copy/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { path } from "../../server-deps.ts";
import * as path from "node:path";
import type { Plugin } from "../../types.ts";

const plugin: Plugin<{
Expand Down
2 changes: 1 addition & 1 deletion plugins/editor/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "node:path";
import { urlJoin } from "https://deno.land/x/url_join@1.0.0/mod.ts";
import { path } from "../../server-deps.ts";
import scriptsToCompile from "./scriptsToCompile.ts";
import { VERSION } from "../../version.ts";
import type { Plugin } from "../../types.ts";
Expand Down
2 changes: 1 addition & 1 deletion plugins/file-watcher/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { path as _path } from "../../server-deps.ts";
import * as _path from "node:path";
import { watch } from "../../utilities/watch.ts";
import type { Plugin } from "../../types.ts";

Expand Down
2 changes: 1 addition & 1 deletion plugins/meta/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { path } from "../../server-deps.ts";
import * as path from "node:path";
import type { Plugin } from "../../types.ts";

const plugin: Plugin<{
Expand Down
2 changes: 1 addition & 1 deletion plugins/og/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from "node:path";
// Note that this depends on --allow-ffi
import sharp from "npm:sharp@0.33.0";
import { path } from "../../server-deps.ts";
import { htmlToBreezewind } from "../../htmlisp/mod.ts";
import breezewind from "../../breezewind/mod.ts";
import type { Plugin } from "../../types.ts";
Expand Down
2 changes: 1 addition & 1 deletion plugins/pagefind/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "node:path";
import * as pagefind from "npm:pagefind@1.0.3";
import { path } from "../../server-deps.ts";
import type { Plugin } from "../../types.ts";

const plugin: Plugin = {
Expand Down
2 changes: 1 addition & 1 deletion plugins/script/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { path } from "../../server-deps.ts";
import * as path from "node:path";
import {
compileTypeScript,
stopEsbuild,
Expand Down
2 changes: 1 addition & 1 deletion plugins/sitemap/mod.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as path from "node:path";
import {
generateSitemap,
sitemapToXML,
} from "https://deno.land/x/sitemap@v1.1.1/mod.ts";
import { path } from "../../server-deps.ts";
import type { Plugin } from "../../types.ts";

// Note that this works only in production mode for now!
Expand Down
2 changes: 1 addition & 1 deletion plugins/twind/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "node:path";
import { extract, install } from "https://esm.sh/@twind/core@1.1.1";
import { path } from "../../server-deps.ts";
import type { Plugin } from "../../types.ts";

const plugin: Plugin<{
Expand Down
2 changes: 1 addition & 1 deletion plugins/uno/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from "node:path";
import { createGenerator } from "https://esm.sh/@unocss/core@0.57.2";
import { presetUno } from "https://esm.sh/@unocss/preset-uno@0.57.2";
import { presetWind } from "https://esm.sh/@unocss/preset-wind@0.57.2";
import { path } from "../../server-deps.ts";
import type { Plugin } from "../../types.ts";

const plugin: Plugin<{
Expand Down
2 changes: 1 addition & 1 deletion plugins/websocket/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "node:path";
import { urlJoin } from "https://deno.land/x/url_join@1.0.0/mod.ts";
import { path } from "../../server-deps.ts";
import { getWebsocketServer } from "../../utilities/getWebSocketServer.ts";
import scriptsToCompile from "./scriptsToCompile.ts";
import { VERSION } from "../../version.ts";
Expand Down
6 changes: 0 additions & 6 deletions server-deps.ts

This file was deleted.

2 changes: 1 addition & 1 deletion utilities/fs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as _path from "node:path";
import { walk } from "https://deno.land/std@0.207.0/fs/walk.ts";
import { path as _path } from "../server-deps.ts";

async function dir(
{ path, extension, recursive }: {
Expand Down
2 changes: 1 addition & 1 deletion utilities/loaders.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "node:path";
import { urlJoin } from "https://deno.land/x/url_join@1.0.0/mod.ts";
import { path } from "../server-deps.ts";
import { htmlToBreezewind } from "../htmlisp/mod.ts";
import type { Component } from "../breezewind/types.ts";
import type { GlobalUtilities } from "../types.ts";
Expand Down

0 comments on commit 574b7a9

Please sign in to comment.