Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 22e6ea7515 | |||
| 81af3da8b4 |
@@ -21,6 +21,8 @@ module SpeckleSystems
|
||||
|
||||
# Run from localhost or from build files
|
||||
DEV_MODE = false
|
||||
puts("Loading Speckle Connector v#{CONNECTOR_VERSION} from #{DEV_MODE ? 'dev' : 'build'}")
|
||||
|
||||
|
||||
unless file_loaded?(__FILE__)
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@ module SpeckleSystems::SpeckleConnector
|
||||
init_local_accounts
|
||||
|
||||
end
|
||||
puts DEV_MODE
|
||||
if DEV_MODE
|
||||
puts('Launching Speckle Connector from http://localhost:8081')
|
||||
@dialog.set_url("http://localhost:8081")
|
||||
else
|
||||
basedir = File.join(File.dirname(File.expand_path(__FILE__)), "html")
|
||||
html = File.read(File.join(basedir, "index.html"))
|
||||
@dialog.set_html(html)
|
||||
html_file = File.join(File.dirname(File.expand_path(__FILE__)), "html", "index.html")
|
||||
puts("Launching Speckle Connector from #{html_file}")
|
||||
@dialog.set_file(html_file)
|
||||
end
|
||||
|
||||
@dialog.show
|
||||
|
||||
@@ -11,6 +11,8 @@ const AUTH_TOKEN = `SpeckleSketchup.AuthToken`
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
localStorage.setItem(AUTH_TOKEN, process.env.VUE_APP_DEV_TOKEN)
|
||||
localStorage.setItem('serverUrl', process.env.VUE_APP_DEFAULT_SERVER)
|
||||
} else if (!localStorage.getItem('serverUrl')) {
|
||||
localStorage.setItem('serverUrl', 'https://speckle.xyz')
|
||||
}
|
||||
|
||||
const authLink = setContext((_, { headers }) => {
|
||||
|
||||
+1
-4
@@ -1,10 +1,7 @@
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
publicPath:
|
||||
process.env.NODE_ENV === 'production'
|
||||
? path.resolve(__dirname, '../speckle_connector', 'html')
|
||||
: '/',
|
||||
publicPath: "./",
|
||||
outputDir: path.resolve(__dirname, '../speckle_connector', 'html'),
|
||||
transpileDependencies: ['vuetify', '@speckle/objectloader']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user