Skip to content

Commit

Permalink
start removing esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Apr 20, 2024
1 parent bd8b218 commit 5289159
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 291 deletions.
12 changes: 12 additions & 0 deletions importmap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"imports": {
"@socketsupply/tonic": "npm:@socketsupply/tonic",
"@socketsupply/components": "npm:@socketsupply/components",
"@socketsupply/components/*": "npm:@socketsupply/components/*",
"@socketsupply/indexed": "npm:@socketsupply/indexed",
"monaco-editor": "npm:monaco-editor",
"xterm": "npm:xterm",
"xterm-addon-fit": "npm:xterm-addon-fit",
"xterm-addon-search": "npm:xterm-addon-search"
}
}
38 changes: 35 additions & 3 deletions socket.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,43 @@ name = "union"
output = "build"

; The build script. It runs before the `[build] copy` phase.
script = "node build.js"
; script = "node build.js"

; Key value pairs added to the envrionment.
[env]
DEV = true


[build.copy-map]
;
; What node modules to allow
;
importmap.json = importmap.json

;
; Application Files
;
src/index.html = index.html
src/index.js = index.js
src/vm.js = vm.js
src/preview.js = preview.js
src/worker.js = worker.js
src/git-data.js = git-data.js
src/settings.json = settings.json

src/components = components
src/views = views
src/fonts = fonts
src/lib = lib
src/pages = pages
src/css = css

;
; Node modules
;
node_modules = node_modules


[build.script]
; If true, it will pass build arguments to the build script. WARNING: this could be deprecated in the future.
; default value: false
Expand All @@ -64,8 +94,9 @@ forward_arguments = false
; Could be a string or an array of strings
sources[] = "src"


[webview]
importmap = "/importmap.json"

; Make root open index.html
; default value: "/"
root = "/"
Expand All @@ -79,7 +110,6 @@ root = "/"
watch = true

; Custom headers injected on all webview routes
[webview]
; default value: ""
; headers[] = "X-Custom-Header: Some-Value"

Expand All @@ -99,6 +129,8 @@ $HOST_HOME = /user/home
allowed[] = "https://*.stripe.com/*"
allowed[] = "https://stripe.com/*"
allowed[] = "https://*.stripe.network/*"
allowed[] = "https://*.stripecdn.com/*"
allowed[] = "https://newassets.hcaptcha.com/*"

[permissions]
; Allow/Disallow fullscreen in application
Expand Down
2 changes: 1 addition & 1 deletion src/components/confirm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TonicDialog } from '@socketsupply/components/dialog'
import { TonicDialog } from 'npm:@socketsupply/components/dialog.js'

class DialogConfirm extends TonicDialog {
async prompt (opts) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import fs from 'socket:fs'
import path from 'socket:path'
import { sha256 } from 'socket:network'

import * as monaco from 'monaco-editor'
import Tonic from '@socketsupply/tonic'
import * as monaco from 'npm:monaco-editor'
import Tonic from 'npm:@socketsupply/tonic'

function rgbaToHex (rgbaString) {
const rgbaValues = rgbaString.match(/\d+/g)
Expand Down
2 changes: 1 addition & 1 deletion src/components/git-status.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tonic from '@socketsupply/tonic'
import Tonic from 'npm:@socketsupply/tonic'
import { exec } from 'socket:child_process'

class GitStatus extends Tonic {
Expand Down
2 changes: 1 addition & 1 deletion src/components/patch-requests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tonic from '@socketsupply/tonic'
import Tonic from 'npm:@socketsupply/tonic'
import path from 'socket:path'
import fs from 'socket:fs'
import { exec } from 'socket:child_process'
Expand Down
2 changes: 1 addition & 1 deletion src/components/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from 'socket:path'
import { lookup } from 'socket:mime'
import { cp, rm } from '../lib/fs.js'

import Tonic from '@socketsupply/tonic'
import Tonic from 'npm:@socketsupply/tonic'

const EXPANDED_STATE = 1
const CLOSED_STATE = 0
Expand Down
2 changes: 1 addition & 1 deletion src/components/properties.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tonic from '@socketsupply/tonic'
import Tonic from 'npm:@socketsupply/tonic'
import process from 'socket:process'

import Config from '../lib/config.js'
Expand Down
4 changes: 2 additions & 2 deletions src/components/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import fs from 'socket:fs'
import path from 'socket:path'
import { exec, execSync } from 'socket:child_process'

import Tonic from '@socketsupply/tonic'
import { TonicDialog } from '@socketsupply/components/dialog'
import Tonic from 'npm:@socketsupply/tonic'
import { TonicDialog } from 'npm:@socketsupply/components/dialog'

export class DialogPublish extends TonicDialog {
click (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/relative-date.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tonic from '@socketsupply/tonic'
import Tonic from 'npm:@socketsupply/tonic'

const T_YEARS = 1000 * 60 * 60 * 24 * 365
const T_MONTHS = 1000 * 60 * 60 * 24 * 30
Expand Down
2 changes: 1 addition & 1 deletion src/components/sprite.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tonic from '@socketsupply/tonic'
import Tonic from 'npm:@socketsupply/tonic'

class AppSprite extends Tonic {
render () {
Expand Down
4 changes: 2 additions & 2 deletions src/components/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import fs from 'socket:fs'
import path from 'socket:path'
import { Encryption, sha256 } from 'socket:network'

import Tonic from '@socketsupply/tonic'
import { TonicDialog } from '@socketsupply/components/dialog'
import Tonic from 'npm:@socketsupply/tonic'
import { TonicDialog } from 'npm:@socketsupply/components/dialog'

export class DialogSubscribe extends TonicDialog {
async show () {
Expand Down
8 changes: 4 additions & 4 deletions src/components/terminal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Tonic from '@socketsupply/tonic'
import { Terminal } from 'xterm'
import { FitAddon as Resizer } from 'xterm-addon-fit'
import { SearchAddon as Search } from 'xterm-addon-search'
import Tonic from 'npm:@socketsupply/tonic'
import { Terminal } from 'npm:xterm'
import { FitAddon as Resizer } from 'npm:xterm-addon-fit'
import { SearchAddon as Search } from 'npm:xterm-addon-search'

// const SECOND = 1000
// const MAX_ROWS = 30 * SECOND
Expand Down
9 changes: 5 additions & 4 deletions src/css/page-account.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ body {
display: flex;
justify-content: center;
align-content: center;
height: 100vh;
width: 100vw;
overflow: hidden;
}

form {
Expand All @@ -30,8 +29,10 @@ form {

#card-element {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
border: 1px solid var(--tonic-border);
border-radius: 4px;
width: 100%;
height: 42px;
}

.StripeElement {
Expand Down
Loading

0 comments on commit 5289159

Please sign in to comment.