Compare commits

..

3 Commits

Author SHA1 Message Date
Lea Anthony
94c56115a5 Release v0.19.0 (#285)
* feat: attempt to support Zorin

* chore: bump version

* Add support for Gentoo

* docs: update contributors

* feat: test support for Fedora

* chore: version bump

* Update README.md

* feat: major refactor

* fix: config errors

* fix: capitalisation and binding fix

* fix: lint

* fix: linting

* config: eslint

* fix: more lint fixes

* fix: linting for hound

* Even more fixes

* chore: bump version

* fix: eslintrc config

* fix: renamed global logger

* fix: Print stdout on error :rolleyes:

* fix: add promises polyfill for the windows target

* style: replace double quotes with single quotes

* Update contributors

* feat: significant overhaul of runtime

* chore: Version Bump

* Fix Masterminds/semver reference import path (case-sensitivity)

* drop lsb_release

Signed-off-by: Chronophylos <nikolai@chronophylos.com>

* change DistributionID to NAME=

Signed-off-by: Chronophylos <nikolai@chronophylos.com>

* show distro id when creating a issue

Signed-off-by: Chronophylos <nikolai@chronophylos.com>

* fix assumption

Signed-off-by: Chronophylos <nikolai@chronophylos.com>

* docs: updated contributors

* fix: add support back for ubuntu, redhat

* chore: version bump

* fix(linux): fedora & centos support

* feat: gcc,npm,node versions on issues

* linux working

* darwin working

* feat: show gcc, node, npm version on issue report

* Delete npm-debug.log

* fix: crashing typo

* trim gcc string

* chore: version bump

* fix: gitbash fixes

* chore: hotfix

* fix: issue report

* fix: typo

* chore: hotfix version bump

* 179 parrot distributionsupport (#181)

* feat: parrot support && git push

* feat: parrot support

* feat: parrot support

* fix: arch support

* fix: gentoos support

* Update README.md

* Update README.md

* chore: bump version

* Linux db (#182)

* feat: refactor linux distro detection

* linux db updates

* feat: add gccversioncommand + windows support

* fix: build-essential

* chore: linter fixes (#185)

* 182 linux bd (#183)

* fix: linuxdb.yaml entries

* fix: typo

* fix: yaml syntax error

* 188 support distribution linux mint (#189)

* chore: update linux db

* chore: bump version

* chore: merge webview back in

* chore: rename webview for clarity

* chore: add stale issue bot config

* chore: add inprogress label

* Azure Pipelines (#192)

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* test: azure pipeline

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* feat: azure pipelines

* chore: remove unused mewn file

* chore: deduplicate library verificaation code

* Update contributors

* fix: undefined: webview during build

* feat: VoidLinux support

* Yaml bug (#207)

* test: azure pipeline

* fix: azure pipeline yaml

* feat: elementary support

* feat: opensuse support

* fix: 0_setup.go line 27

* fix: 0_setup.go line 27

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: yaml

* fix: yaml

* fix: yaml

* fix: opensuse yaml

* fix: opensuse

* fix: opensuse

* fix: opensuse

* fix: opensuse

* fix: string trim os osRelease field NAME

* fix: 0_setup.go if err typo

* test

* test

* fix: typo in linux.go

* test: remove quotes from opensuse case

* test: revert

* test: ""

* test: ""

* test: ""

* test: ""

* fix: replace trim with replace

* fix: drop 0_setup.go and run checks by system.go

* fix: elementary os yaml name

* fix: open suse yaml entry

* fix: commented out result.Release = version

* fix: commented out result.Release = version

* fix: revert Replace to Trim

* fix: Linux Mint yaml entry

* fix: capitalize distros entries

* fix: capitalize distros entries

* fix: capitalize distros entries

* test

* test

* fix: open suse yaml entry

* fix: yaml entris

* test

* test

* test

* test

* test

* test

* branch changing

* fix: bug in setup process

* debugging

* debugging

* debugging

* debugging

* fix: yaml entries & err == nil bug

* Update prerequisites.go

* fix: bug

* fix: 0_setup.go

* fix: yaml bug

* fix: yaml bug

* chore: bump version

* Elementary support + readme update (#210)

* test: azure pipeline

* fix: azure pipeline yaml

* feat: elementary support+readme udpate

* fix: upgrade eslint

* 215 support distribution kali (#219)

* test: azure pipeline

* fix: azure pipeline yaml

* feat: kali linux support

* feat: kali linux support

* fix: allow 0 return types

* duplicate code spotted  (#221)

* fix: duplicate code

* chore: release v0.17.14-pre

* chore: remove debug output

*  (FIX) 215 support distribution kali (#224)

* fix: kali support

* docs: add Mattn

* feat: KDE neon support (#234)

* chore: version bump

* chore: remove some debug output

* fix: binding more than one struct method (#245)

* feat: add runtime typings

* fix: multiple runtime fixes

* manjaro (#248)

* manjaro

* Update go.mod

* chore: version bump

* fix: update runtime

* chore: version bump

* cmd/wails: report error status code to OS (#252)

Fixes #251.

* Update CONTRIBUTORS.md

* chore: version bump

* fix: importing runtime (#254)

* chore: supress warnings

* Patch for file dialog on OSX (#258)

* Patch for file dialog on OSX

* Update CONTRIBUTORS.md

* 262 add wails shutdown method (#264)

* feat: support close in bridge mode

* feat: WailsShutdown callback

Now handles proper shutdown through:
  * runtime.Window.Close()
  * Killing the main window
  * Ctrl-C

* chore: version bump

* fix: force install when node_modules missing (#268)

* fix: detect encoding on windows (#266)

* fix: linting

* chore: bump version

* Migrate tool (#270)

Experimental migration tool for projects < v1.0.0

* chore: version bump

* fix: add flag to fix windows builds (#272)

* Bump version to v0.18.9-pre

* 261 korean fonts (#273)

* fix: linting

* chore: bump version

* fix: unicode text for Windows

* release v0.18.10-pre

* 274 support spaces in windows paths (#275)

* fix: escape windows commands

* fix: allow spaces in path to windres

* Update go.mod

* release v0.18.11-pre

* 261 korean fonts (#276)

* fix: linting

* chore: bump version

* fix: unicode text for Windows

* fix: re-add webview_set_title

* release v0.18.12-pre

* hotfix: build issue for windows

* fix: npm/node version reporting

* fix: debug build should use terminal

* fix: make binary name more os specific

* Backport (#283)

* Develop (#265)


* Patch for file dialog on OSX

* Update CONTRIBUTORS.md

* 262 add wails shutdown method (#264)

* feat: support close in bridge mode

* feat: WailsShutdown callback

Now handles proper shutdown through:
  * runtime.Window.Close()
  * Killing the main window
  * Ctrl-C

* chore: version bump

* chore: version bump

* feat: adjust binary name for OS

* fix: allow spaces in gcc path

* feat: migrate command

* fix: npm/node versions

* fix: allow IE for serve

* feat: go build script

* fix: make runtime ES2015 compliant

* fix: remove invoke patch

* fix: allow any line endings

* chore: remove legacy bridge files

* chore: latest assets

* v0.18.15-pre

* fix: remove unicode flag

* chore: bump version

* release v0.19.0
2019-11-05 14:47:05 +11:00
Lea Anthony
d572418ec3 chore: version bump 2019-10-23 14:12:38 +11:00
Lea Anthony
8c7480d277 Develop (#265)
* Patch for file dialog on OSX

* Update CONTRIBUTORS.md

* 262 add wails shutdown method (#264)

* feat: support close in bridge mode

* feat: WailsShutdown callback

Now handles proper shutdown through:
  * runtime.Window.Close()
  * Killing the main window
  * Ctrl-C

* chore: version bump
2019-10-23 14:08:56 +11:00
28 changed files with 807 additions and 16617 deletions

3
.gitignore vendored
View File

@@ -16,5 +16,4 @@ examples/**/example*
cmd/wails/wails
.DS_Store
tmp
node_modules/
/runtime/js/runtime/dist
node_modules/

View File

@@ -20,4 +20,3 @@ Wails is what it is because of the time and effort given by these great people.
* [Toyam Cox](https://github.com/Vaelatern)
* [Robin Eklind](https://github.com/mewmew)
* [Kris Raney](https://github.com/kraney)
* [soon cheol shin](https://github.com/scshin0572)

8
app.go
View File

@@ -2,7 +2,6 @@ package wails
import (
"os"
"runtime"
"syscall"
"github.com/syossan27/tebata"
@@ -44,7 +43,7 @@ func CreateApp(optionalConfig ...*AppConfig) *App {
}
result := &App{
logLevel: "debug",
logLevel: "info",
renderer: renderer.NewWebView(),
ipc: ipc.NewManager(),
bindingManager: binding.NewManager(),
@@ -103,11 +102,6 @@ func (a *App) start() error {
return err
}
// Set debug mode
if runtime.GOOS == "windows" && BuildMode == cmd.BuildModeDebug {
a.renderer.EnableDebug()
}
// Start signal handler
t := tebata.New(os.Interrupt, os.Kill, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL)
t.Reserve(func() {

File diff suppressed because one or more lines are too long

View File

@@ -9,4 +9,4 @@
last 2 versions
Firefox ESR
not dead
IE 9-11 # For IE 9-11 support, remove 'not'.
not IE 9-11 # For IE 9-11 support, remove 'not'.

View File

@@ -1,4 +1,4 @@
package cmd
// Version - Wails version
const Version = "v0.18.14-pre"
const Version = "v0.19.0"

View File

@@ -94,12 +94,12 @@ func (a *AppConfig) merge(in *AppConfig) error {
// Creates the default configuration
func newConfig(userConfig *AppConfig) (*AppConfig, error) {
result := &AppConfig{
Width: 800,
Height: 600,
Resizable: true,
Title: "My Wails App",
Colour: "#FFF", // White by default
defaultHTML: mewn.String("./runtime/assets/default.html"),
Width: 800,
Height: 600,
Resizable: true,
Title: "My Wails App",
Colour: "#FFF", // White by default
HTML: mewn.String("./runtime/assets/default.html"),
}
if userConfig != nil {

View File

@@ -3,12 +3,10 @@ package interfaces
import (
"github.com/wailsapp/wails/lib/messages"
)
// Renderer is an interface describing a Wails target to render the app to
type Renderer interface {
Initialise(AppConfig, IPCManager, EventManager) error
Run() error
EnableDebug()
// Binding
NewBinding(bindingName string) error

View File

@@ -48,9 +48,6 @@ type Bridge struct {
// Mutex for writing to the socket
lock sync.Mutex
// debug
debug bool
}
// Initialise the Bridge Renderer
@@ -77,11 +74,6 @@ func (h *Bridge) evalJS(js string, mtype messageType) error {
return nil
}
// EnableDebug enables debug!
func (h *Bridge) EnableDebug() {
h.debug = true
}
func (h *Bridge) injectCSS(css string) {
// Minify css to overcome issues in the browser with carriage returns
minified, err := htmlmin.Minify([]byte(css), &htmlmin.Options{
@@ -125,6 +117,7 @@ func (h *Bridge) sendMessage(conn *websocket.Conn, msg string) {
func (h *Bridge) start(conn *websocket.Conn) {
// set external.invoke
h.log.Infof("Connected to frontend.")
wailsRuntime := mewn.String("../../runtime/assets/wails.js")

File diff suppressed because one or more lines are too long

View File

@@ -25,7 +25,6 @@ type WebView struct {
config interfaces.AppConfig
eventManager interfaces.EventManager
bindingCache []string
debug bool
}
// NewWebView returns a new WebView struct
@@ -49,22 +48,13 @@ func (w *WebView) Initialise(config interfaces.AppConfig, ipc interfaces.IPCMana
// Save the config
w.config = config
// defaulthtml
HTML := config.GetDefaultHTML()
if len(HTML) == 0 {
HTML = mewn.String("../../runtime/assets/default.html")
}
HTML = fmt.Sprintf("data:text/html,%s", HTML)
fmt.Printf("*** %s ***", HTML)
w.log.Infof("URL: %s", HTML)
// Create the WebView instance
w.window = wv.NewWebview(wv.Settings{
Width: config.GetWidth(),
Height: config.GetHeight(),
Title: config.GetTitle(),
Resizable: config.GetResizable(),
URL: HTML,
URL: config.GetDefaultHTML(),
Debug: !config.GetDisableInspector(),
ExternalInvokeCallback: func(_ wv.WebView, message string) {
w.ipc.Dispatch(message)
@@ -105,7 +95,6 @@ func (w *WebView) evalJS(js string) error {
if len(js) > 45 {
outputJS += "..."
}
// var outputJS = js
w.log.DebugFields("Eval", logger.Fields{"js": outputJS})
//
w.window.Dispatch(func() {
@@ -114,11 +103,6 @@ func (w *WebView) evalJS(js string) error {
return nil
}
// EnableDebug enables debug!
func (w *WebView) EnableDebug() {
w.debug = true
}
// Escape the Javascripts!
func escapeJS(js string) (string, error) {
result := strings.Replace(js, "\\", "\\\\", -1)
@@ -188,58 +172,51 @@ func (w *WebView) Run() error {
w.log.Info("Running...")
// Inject firebug in debug mode on Windows
if w.debug {
w.log.Debug("Injecting firebug")
// firebugLite := mewn.String("../../runtime/assets/injectFirebug.js")
// w.evalJS(firebugLite)
}
// Runtime assets
wailsRuntime := mewn.String("../../runtime/assets/wails.js")
w.evalJS(wailsRuntime)
// // Runtime assets
// wailsRuntime := mewn.String("../../runtime/assets/wails.js")
// w.evalJS(wailsRuntime)
// Ping the wait channel when the wails runtime is loaded
w.eventManager.On("wails:loaded", func(...interface{}) {
// // Ping the wait channel when the wails runtime is loaded
// w.eventManager.On("wails:loaded", func(...interface{}) {
// Run this in a different go routine to free up the main process
go func() {
// // Run this in a different go routine to free up the main process
// go func() {
// Inject Bindings
for _, binding := range w.bindingCache {
w.evalJSSync(binding)
}
// // Inject Bindings
// for _, binding := range w.bindingCache {
// w.evalJSSync(binding)
// }
// Inject user CSS
if w.config.GetCSS() != "" {
outputCSS := fmt.Sprintf("%.45s", w.config.GetCSS())
if len(outputCSS) > 45 {
outputCSS += "..."
}
w.log.DebugFields("Inject User CSS", logger.Fields{"css": outputCSS})
w.injectCSS(w.config.GetCSS())
} else {
// Use default wails css
w.log.Debug("Injecting Default Wails CSS")
defaultCSS := mewn.String("../../runtime/assets/wails.css")
// // Inject user CSS
// if w.config.GetCSS() != "" {
// outputCSS := fmt.Sprintf("%.45s", w.config.GetCSS())
// if len(outputCSS) > 45 {
// outputCSS += "..."
// }
// w.log.DebugFields("Inject User CSS", logger.Fields{"css": outputCSS})
// w.injectCSS(w.config.GetCSS())
// } else {
// // Use default wails css
// w.log.Debug("Injecting Default Wails CSS")
// defaultCSS := mewn.String("../../runtime/assets/wails.css")
w.injectCSS(defaultCSS)
}
// w.injectCSS(defaultCSS)
// }
// Inject user JS
if w.config.GetJS() != "" {
outputJS := fmt.Sprintf("%.45s", w.config.GetJS())
if len(outputJS) > 45 {
outputJS += "..."
}
w.log.DebugFields("Inject User JS", logger.Fields{"js": outputJS})
w.evalJSSync(w.config.GetJS())
}
// // Inject user JS
// if w.config.GetJS() != "" {
// outputJS := fmt.Sprintf("%.45s", w.config.GetJS())
// if len(outputJS) > 45 {
// outputJS += "..."
// }
// w.log.DebugFields("Inject User JS", logger.Fields{"js": outputJS})
// w.evalJSSync(w.config.GetJS())
// }
// // Emit that everything is loaded and ready
// w.eventManager.Emit("wails:ready")
// }()
// })
// Emit that everything is loaded and ready
w.eventManager.Emit("wails:ready")
}()
})
// Kick off main window loop
w.window.Run()

View File

@@ -13,7 +13,7 @@ package webview
#cgo linux openbsd freebsd CFLAGS: -DWEBVIEW_GTK=1 -Wno-deprecated-declarations
#cgo linux openbsd freebsd pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo windows CFLAGS: -DWEBVIEW_WINAPI=1 -std=c99 -DUNICODE=1 -D_UNICODE=1
#cgo windows CFLAGS: -DWEBVIEW_WINAPI=1 -std=c99
#cgo windows LDFLAGS: -lole32 -lcomctl32 -loleaut32 -luuid -lgdi32
#cgo darwin CFLAGS: -DWEBVIEW_COCOA=1 -x objective-c

View File

@@ -58,7 +58,6 @@ extern "C"
#elif defined(WEBVIEW_WINAPI)
#define CINTERFACE
#include <windows.h>
#include <tchar.h>
#include <commctrl.h>
#include <exdisp.h>
@@ -1351,8 +1350,8 @@ struct webview_priv
}
#define WEBVIEW_KEY_FEATURE_BROWSER_EMULATION \
_T("Software\\Microsoft\\Internet " \
"Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION")
"Software\\Microsoft\\Internet " \
"Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION"
static int webview_fix_ie_compat_mode()
{
@@ -1364,7 +1363,7 @@ struct webview_priv
{
return -1;
}
for (p = &appname[_tcslen(appname) - 1]; p != appname && *p != _T('\\'); p--)
for (p = &appname[strlen(appname) - 1]; p != appname && *p != '\\'; p--)
{
}
p++;
@@ -1873,30 +1872,14 @@ struct webview_priv
type |= MB_ICONERROR;
break;
}
#ifdef UNICODE
WCHAR *wtitle = webview_to_utf16(title);
WCHAR *warg = webview_to_utf16(arg);
MessageBox(w->priv.hwnd, warg, wtitle, type);
GlobalFree(warg);
GlobalFree(wtitle);
#else
MessageBox(w->priv.hwnd, arg, title, type);
#endif
#endif
}
}
WEBVIEW_API void webview_terminate(struct webview *w) { PostQuitMessage(0); }
WEBVIEW_API void webview_exit(struct webview *w) { OleUninitialize(); }
WEBVIEW_API void webview_print_log(const char *s) {
#ifdef UNICODE
WCHAR *ws = webview_to_utf16(s);
OutputDebugString(ws);
GlobalFree(ws);
#else
OutputDebugString(s);
#endif
}
WEBVIEW_API void webview_print_log(const char *s) { OutputDebugString(s); }
#endif /* WEBVIEW_WINAPI */

View File

@@ -204,12 +204,7 @@ function start(callback) {
}
function Init(callback) {
// Bridge window.invoke
window.invoke = function (message) {
window.wailsbridge.websocket.send(message);
}
start(callback);
}
module.exports = Init;
module.exports = Init;

View File

@@ -1 +1,18 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><script src="https://raw.githubusercontent.com/firebug/firebug-lite/master/build/firebug-lite-debug.js#startOpened=true"></script></head><body><div id="app"></div><script type="text/javascript">function AddScript(js, callbackID){var script = document.createElement('script');script.text=js;document.body.appendChild(script);}</script></body></html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<div id="app"></div>
<script type="text/javascript">function AddScript(js, callbackID) {
var script = document.createElement('script');
script.text = js;
document.body.appendChild(script);
}</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
(function(){console.log=function(message){document.body.innerHTML=document.body.innerHTML+'<p>'+message+'</p>';};var script=document.createElement('script');script.src="https://raw.githubusercontent.com/firebug/firebug-lite/master/build/firebug-lite-debug.js#startOpened=true";document.body.appendChild(script);})();

File diff suppressed because one or more lines are too long

View File

@@ -25,4 +25,4 @@
"always"
]
}
}
}

View File

@@ -7,7 +7,7 @@ module.exports = function (api) {
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"useBuiltIns": "entry",
"corejs": {
"version": 3,
"proposals": true
@@ -16,10 +16,7 @@ module.exports = function (api) {
]
];
const plugins = ["@babel/plugin-transform-object-assign", "transform-es2015-shorthand-properties"]
return {
presets,
plugins
};
}

View File

@@ -1,37 +0,0 @@
/* eslint-disable */
const path = require('path');
module.exports = {
entry: './bridge.js',
mode: 'production',
output: {
path: path.resolve(__dirname, '..', 'assets'),
filename: 'bridge.js',
libraryTarget: 'this'
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
plugins: [],
presets: [
[
'@babel/preset-env',
{
'useBuiltIns': 'usage',
'corejs': 3,
'targets': { "browsers": ["last 2 versions", "ie >= 9"] }
}
]
]
}
}
}
]
}
};

File diff suppressed because it is too large Load Diff

View File

@@ -33,15 +33,11 @@
"@babel/core": "^7.5.4",
"@babel/plugin-transform-object-assign": "^7.2.0",
"@babel/preset-env": "^7.5.4",
"babel-core": "^6.26.3",
"babel-loader": "^8.0.6",
"babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-minify": "^0.5.0",
"core-js": "^3.1.4",
"eslint": "^6.5.1",
"webpack": "^4.41.2",
"webpack": "^4.35.3",
"webpack-cli": "^3.3.5"
},
"dependencies": {}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,11 @@
{
"name": "@wailsapp/runtime",
"version": "1.0.8",
"version": "1.0.9",
"description": "Wails Javascript runtime library",
"main": "main.js",
"types": "runtime.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
@@ -22,18 +21,8 @@
"bugs": {
"url": "https://github.com/wailsapp/wails/issues"
},
"files": [
"*.js",
"!webpack.config.js",
"runtime.d.ts",
"README.md"
],
"homepage": "https://github.com/wailsapp/wails#readme",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^8.0.6",
"babel-preset-es2015": "^6.24.1",
"dts-gen": "^0.5.8",
"webpack": "^4.41.2"
"dts-gen": "^0.5.8"
}
}

View File

@@ -1,37 +0,0 @@
/* eslint-disable */
const path = require('path');
module.exports = {
entry: './main.js',
mode: 'production',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'main.js',
libraryTarget: 'this'
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
plugins: [],
presets: [
[
'@babel/preset-env',
{
'useBuiltIns': 'usage',
'corejs': 3,
'targets': { "browsers": ["last 2 versions", "ie >= 9"] }
}
]
]
}
}
}
]
}
};

View File

@@ -17,14 +17,16 @@ module.exports = {
use: {
loader: 'babel-loader',
options: {
plugins: [],
plugins: ['@babel/plugin-transform-object-assign'],
presets: [
[
'@babel/preset-env',
{
'useBuiltIns': 'usage',
'corejs': 3,
'targets': { "browsers": ["last 2 versions", "ie >= 9"] }
'useBuiltIns': 'entry',
'corejs': {
'version': 3,
'proposals': true
}
}
]
]

View File

@@ -59,6 +59,7 @@ func main() {
fmt.Println("**** Building Runtime ****")
runtimeDir, _ := filepath.Abs(filepath.Join(dir, "..", "runtime", "js"))
os.Chdir(runtimeDir)
runCommand("npm", "install")
runCommand("npm", "run", "build")
// Pack assets