forked from cerc-io/laconic-console
DXOS Console -> Kubenet Console. Fix console-app to honor CONFIG_FILE.
This commit is contained in:
parent
c0ff3a7969
commit
d96af1ef1b
@ -1,5 +1,5 @@
|
||||
# Console
|
||||
|
||||
DXOS Network GraphQL server and console application.
|
||||
DXOS Kubenet GraphQL server and console application.
|
||||
|
||||
![Console](./docs/images/console.png)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@dxos/console",
|
||||
"version": "1.0.0-beta.0",
|
||||
"description": "DXOS Console",
|
||||
"description": "Kubenet Console",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: dxos.network/console-app
|
||||
displayName: DXOS Console Client
|
||||
displayName: Kubenet Console Client
|
||||
build: yarn dist
|
||||
version: 0.0.6
|
||||
package: QmZpM8u7ZUfQpXLgtdB1ug7nGExUrXhebtTSfSBPrRwcLX
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# NODE_ENV === production
|
||||
# NODE_ENV=development
|
||||
# NOTE: Set CONFIG_FILE to swap out this config file.
|
||||
#
|
||||
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DXOS'
|
||||
title: 'Kubnet Console'
|
||||
org': 'DXOS.org'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# NODE_ENV === production
|
||||
# NODE_ENV=development
|
||||
# NOTE: Set CONFIG_FILE to swap out this config file.
|
||||
#
|
||||
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DXOS'
|
||||
title: 'Kubnet Console'
|
||||
org': 'DXOS.org'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# NODE_ENV === production
|
||||
# NODE_ENV=production
|
||||
# NOTE: Set CONFIG_FILE to swap out this config file.
|
||||
#
|
||||
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DXOS'
|
||||
title: 'Kubenet Console'
|
||||
org': 'DXOS.org'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# NODE_ENV === production
|
||||
# NODE_ENV=development
|
||||
# NOTE: Set CONFIG_FILE to swap out this config file.
|
||||
#
|
||||
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DXOS'
|
||||
title: 'Kubenet Console'
|
||||
org': 'DXOS.org'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@dxos/console-app",
|
||||
"version": "1.0.0-beta.17",
|
||||
"description": "DXOS Console Client",
|
||||
"description": "Kubenet Console Client",
|
||||
"main": "dist/es/index.js",
|
||||
"files": [
|
||||
"src/gql"
|
||||
@ -10,10 +10,10 @@
|
||||
"analyzer": "webpack --config webpack-analyzer.config.js",
|
||||
"build:babel": "babel ./src --out-dir ./dist/es --ignore \"**/*.test.js\" --source-maps inline",
|
||||
"build": "yarn dist",
|
||||
"dist": "yarn clean && cp -f config-production.yml config.yml && yarn build:babel && webpack",
|
||||
"dist": "yarn clean && CONFIG_FILE=config-production.yml yarn build:babel && webpack",
|
||||
"clean": "rm -rf dist",
|
||||
"lint": "semistandard 'src/**/*.js'",
|
||||
"start": "cp -f ${CONFIG_FILE:-config-local.yml} config.yml && VERBOSE=true webpack-dev-server --mode development",
|
||||
"start": "CONFIG_FILE=${CONFIG_FILE:-config-testnet.yml} VERBOSE=true webpack-dev-server --mode development",
|
||||
"test": "jest --rootDir ./src --passWithNoTests --no-cache"
|
||||
},
|
||||
"author": "DXOS.org",
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright 2020 DXOS.org.org
|
||||
// Copyright 2020 DXOS.org
|
||||
//
|
||||
|
||||
import React from 'react';
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright 2020 DXOS.org.org
|
||||
// Copyright 2020 DXOS.org
|
||||
//
|
||||
|
||||
import React from 'react';
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright 2020 DXOS.org.org
|
||||
// Copyright 2020 DXOS.org
|
||||
//
|
||||
|
||||
import React from 'react';
|
||||
|
8
packages/console-app/src/config.js
Normal file
8
packages/console-app/src/config.js
Normal file
@ -0,0 +1,8 @@
|
||||
//
|
||||
// Copyright 2020 DXOS.org
|
||||
//
|
||||
|
||||
// See webpack-common.config.js
|
||||
import config from '__CONFIG_FILE__';
|
||||
|
||||
export default config;
|
@ -6,7 +6,7 @@ import debug from 'debug';
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
|
||||
import config from '../config.yml';
|
||||
import config from './config';
|
||||
|
||||
import Main from './containers/Main';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"build": {
|
||||
"name": "@dxos/console-app",
|
||||
"buildDate": "2020-07-20T17:06:29.786Z",
|
||||
"version": "1.0.0-beta.16"
|
||||
"buildDate": "2020-07-20T20:15:46.769Z",
|
||||
"version": "1.0.0-beta.17"
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,7 @@ const webpack = require('webpack');
|
||||
|
||||
const PUBLIC_URL = process.env.PUBLIC_URL || '';
|
||||
|
||||
// TODO(burdon): Remove.
|
||||
const STACK_CONFIG = process.env.CONFIG || 'default';
|
||||
const CONFIG_FILE = path.relative('./src', process.env.CONFIG_FILE || 'config-local.yml');
|
||||
|
||||
module.exports = {
|
||||
devtool: 'eval-source-map',
|
||||
@ -76,8 +75,8 @@ module.exports = {
|
||||
|
||||
// Define the build config file based on the target.
|
||||
// https://webpack.js.org/plugins/normal-module-replacement-plugin
|
||||
new webpack.NormalModuleReplacementPlugin(/(.*)__STACK_CONFIG__/, (resource) => {
|
||||
resource.request = resource.request.replace(/__STACK_CONFIG__/, STACK_CONFIG);
|
||||
new webpack.NormalModuleReplacementPlugin(/(.*)__CONFIG_FILE__/, (resource) => {
|
||||
resource.request = resource.request.replace(/__CONFIG_FILE__/, CONFIG_FILE);
|
||||
}),
|
||||
|
||||
// https://www.npmjs.com/package/webpack-version-file-plugin
|
||||
|
@ -15,7 +15,7 @@ module.exports = merge(commonConfig, {
|
||||
new HtmlWebPackPlugin({
|
||||
template: './public/index.html',
|
||||
templateParameters: {
|
||||
title: 'DXOS Console'
|
||||
title: 'Kubenet Console'
|
||||
}
|
||||
})
|
||||
]
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# NODE_ENV === production
|
||||
# NODE_ENV=development
|
||||
# NOTE: Set CONFIG_FILE to swap out this config file.
|
||||
#
|
||||
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DXOS'
|
||||
title: 'Kubenet Console'
|
||||
org': 'DXOS.org'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# NODE_ENV === production
|
||||
# NODE_ENV=development
|
||||
# NOTE: Set CONFIG_FILE to swap out this config file.
|
||||
#
|
||||
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DXOS'
|
||||
title: 'Kubenet Console'
|
||||
org': 'DXOS.org'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# NODE_ENV === production
|
||||
# NODE_ENV=production
|
||||
# NOTE: Set CONFIG_FILE to swap out this config file.
|
||||
#
|
||||
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DXOS'
|
||||
title: 'Kubenet Console'
|
||||
org': 'DXOS.org'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@dxos/console-server",
|
||||
"version": "1.0.0-beta.17",
|
||||
"description": "DXOS Console Server",
|
||||
"description": "Kubenet Console Server",
|
||||
"main": "dist/es/index.js",
|
||||
"bin": {
|
||||
"dxos-console": "bin/console.js"
|
||||
|
@ -67,7 +67,7 @@ module.exports = {
|
||||
new HtmlWebPackPlugin({
|
||||
template: './public/index.html',
|
||||
templateParameters: {
|
||||
title: 'DXOS Console'
|
||||
title: 'Kubenet Console'
|
||||
}
|
||||
}),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user