shithub: mycel

Download patch

ref: fdbd295dc114a5a0c3429ecccaf665cbff5bfc66
parent: 8423f45cf12438346a1aea3cf4cd4f834d55cce9
author: Philip Silva <philip.silva@protonmail.com>
date: Fri May 21 11:12:26 EDT 2021

Put cmd/6to5 into separate repo

diff: cannot open a/cmd/6to5//null: file does not exist: 'a/cmd/6to5//null'
--- a/README.md
+++ b/README.md
@@ -80,6 +80,7 @@
 Very simple jQuery based code works though, e.g. jQuery UI Tab view
 https://jqueryui.com/resources/demos/tabs/default.html or the toggle buttons on
 https://golang.org/pkg There is also highly experimental ES6 support with Babel.
+(Needs also https://github.com/psilva261/6to5)
 
 Try on Plan 9 with e.g.:
 
--- a/cmd/6to5/main.go
+++ /dev/null
@@ -1,38 +1,0 @@
-// Conversion of ES6+ into ES5.1 (wip)
-//
-// TODO: turn into a script that uses devjs
-package main
-
-import (
-	"fmt"
-	"github.com/jvatic/goja-babel"
-	"io"
-	"log"
-	"os"
-)
-
-func Main() (err error) {
-	babel.Init(1) // Setup 1 transformer (can be any number > 0)
-	r, err := babel.Transform(os.Stdin, map[string]interface{}{
-		"plugins": []string{
-			"transform-arrow-functions",
-			"transform-block-scoping",
-			"transform-classes",
-			"transform-destructuring",
-			"transform-spread",
-			"transform-parameters",
-		},
-	})
-	if err != nil {
-		return fmt.Errorf("transform: %v", err)
-	}
-	_, err = io.Copy(os.Stdout, r)
-
-	return
-}
-
-func main() {
-	if err := Main(); err != nil {
-		log.Fatalf("%v",err)
-	}
-}
--- a/go.mod
+++ b/go.mod
@@ -12,10 +12,11 @@
 	9fans.net/go v0.0.0-00010101000000-000000000000
 	github.com/andybalholm/cascadia v1.1.0
 	github.com/chris-ramon/douceur v0.2.1-0.20160603235419-f3463056cd52
+	github.com/dlclark/regexp2 v1.4.0 // indirect
 	github.com/dop251/goja v0.0.0-20210317175251-bb14c2267b76
 	github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7
+	github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
 	github.com/gorilla/css v1.0.0 // indirect
-	github.com/jvatic/goja-babel v0.0.0-20210308004931-b9e24388e7b1
 	github.com/mjl-/duit v0.0.0-20200330125617-580cb0b2843f
 	github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
 	github.com/srwiley/oksvg v0.0.0-20210320200257-875f767ac39a
@@ -23,4 +24,5 @@
 	golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
 	golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4
 	golang.org/x/text v0.3.5
+	gopkg.in/yaml.v2 v2.4.0 // indirect
 )
--- a/go.sum
+++ b/go.sum
@@ -2,10 +2,8 @@
 github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
 github.com/chris-ramon/douceur v0.2.1-0.20160603235419-f3463056cd52 h1:xJWyi77j4VQwdeo6bO3wQSQ7o7yVwEM0ZvwXpyKHZZ8=
 github.com/chris-ramon/douceur v0.2.1-0.20160603235419-f3463056cd52/go.mod h1:wDW5xjJdeoMm1mRt4sD4c/LbF/mWdEpRXQKjTR8nIBE=
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
 github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
-github.com/dop251/goja v0.0.0-20210227132020-101e13ab2c34/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA=
 github.com/dop251/goja v0.0.0-20210317175251-bb14c2267b76 h1:da/WKkWtBnwAC/DPGZQ7W2pKVEHGEyFU1u40L73DJN8=
 github.com/dop251/goja v0.0.0-20210317175251-bb14c2267b76/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA=
 github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7 h1:tYwu/z8Y0NkkzGEh3z21mSWggMg4LwLRFucLS7TjARg=
@@ -14,14 +12,6 @@
 github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
 github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
 github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
-github.com/jvatic/goja-babel v0.0.0-20210308004931-b9e24388e7b1 h1:EY2d0ZMYeM/Dt9/y5rUOnRAD3zKYZGVRSJsHVffjGDs=
-github.com/jvatic/goja-babel v0.0.0-20210308004931-b9e24388e7b1/go.mod h1:5NHa0M/kGAhy4C5ELE23ujvNwbUrMz88DvVZkU6usqg=
-github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/mjl-/duit v0.0.0-20200330125617-580cb0b2843f h1:eGFou1VfXmiti7EMQED6BIzfALMYi6/fBMIRL4usKfw=
 github.com/mjl-/duit v0.0.0-20200330125617-580cb0b2843f/go.mod h1:OlRagobzQ97GoM+WaQ5kyzdyts952BFYsuY5bMyv9tw=
 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
@@ -32,8 +22,6 @@
 github.com/srwiley/oksvg v0.0.0-20210320200257-875f767ac39a/go.mod h1:afMbS0qvv1m5tfENCwnOdZGOF8RGR/FsZ7bvBxQGZG4=
 github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 h1:m59mIOBO4kfcNCEzJNy71UkeF4XIx2EVmL9KLwDQdmM=
 github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU=
-github.com/stvp/assert v0.0.0-20170616060220-4bc16443988b h1:GlTM/aMVIwU3luIuSN2SIVRuTqGPt1P97YxAi514ulw=
-github.com/stvp/assert v0.0.0-20170616060220-4bc16443988b/go.mod h1:CC7OXV9IjEZRA+znA6/Kz5vbSwh69QioernOHeDCatU=
 golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk=
 golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
 golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=