fix RADAR_NAME env variable
This commit is contained in:
2
.env
2
.env
@@ -1,2 +1,2 @@
|
||||
RADAR_NAME=AOE Technology Radar
|
||||
REACT_APP_RADAR_NAME=AOE Technology Radar
|
||||
PUBLIC_URL=/techradar
|
||||
@@ -56,7 +56,7 @@ cp -r build techradar
|
||||
You can customize the following parts of the tech radar.
|
||||
|
||||
### Change title, description and headline
|
||||
Set the environment variable `RADAR_NAME`. The default is "AOE Technology Radar".
|
||||
Set the environment variable `REACT_APP_RADAR_NAME`. The default is "AOE Technology Radar".
|
||||
|
||||
### Host the application under a sub path
|
||||
To host the application under a sub path, set the environment variable `PUBLIC_URL`, e.g. "/techradar".
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.assetUrl = exports.isMobileViewport = exports.translate = exports.showEmptyRings = exports.getItemPageNames = exports.rings = exports.quadrants = exports.radarNameShort = exports.radarName = void 0;
|
||||
exports.radarName = process.env.RADAR_NAME || "AOE Technology Radar";
|
||||
exports.radarName = process.env.REACT_APP_RADAR_NAME || "AOE Technology Radar";
|
||||
exports.radarNameShort = exports.radarName;
|
||||
exports.quadrants = [
|
||||
"languages-and-frameworks",
|
||||
|
||||
@@ -16,9 +16,15 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
||||
return to;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getFirstLetter = exports.groupByFirstLetter = exports.groupByQuadrants = exports.featuredOnly = void 0;
|
||||
var featuredOnly = function (items) { return items.filter(function (item) { return item.featured; }); };
|
||||
exports.getFirstLetter = exports.groupByFirstLetter = exports.groupByQuadrants = exports.unfeaturedOnly = exports.featuredOnly = void 0;
|
||||
var featuredOnly = function (items) {
|
||||
return items.filter(function (item) { return item.featured; });
|
||||
};
|
||||
exports.featuredOnly = featuredOnly;
|
||||
var unfeaturedOnly = function (items) {
|
||||
return items.filter(function (item) { return !item.featured; });
|
||||
};
|
||||
exports.unfeaturedOnly = unfeaturedOnly;
|
||||
var groupByQuadrants = function (items) {
|
||||
return items.reduce(function (quadrants, item) {
|
||||
var _a;
|
||||
@@ -52,5 +58,7 @@ var addItemToRing = function (ring, item) {
|
||||
if (ring === void 0) { ring = []; }
|
||||
return __spreadArray(__spreadArray([], ring), [item]);
|
||||
};
|
||||
var getFirstLetter = function (item) { return item.title.substr(0, 1).toUpperCase(); };
|
||||
var getFirstLetter = function (item) {
|
||||
return item.title.substr(0, 1).toUpperCase();
|
||||
};
|
||||
exports.getFirstLetter = getFirstLetter;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "husky install && yarn build:scripts",
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"build:scripts": "tsc --project tsconfig.scripts.json",
|
||||
"test": "react-scripts test",
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="description" content="%RADAR_NAME%" />
|
||||
<meta name="description" content="%REACT_APP_RADAR_NAME%" />
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.svg" />
|
||||
<meta property="og:title" content="%RADAR_NAME%" />
|
||||
<meta property="og:title" content="%REACT_APP_RADAR_NAME%" />
|
||||
<meta property="og:image" content="%PUBLIC_URL%/logo.svg" />
|
||||
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0, user-scalable=0" />
|
||||
|
||||
<title>%RADAR_NAME%</title>
|
||||
<title>%REACT_APP_RADAR_NAME%</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
export var radarName = process.env.RADAR_NAME || 'AOE Technology Radar';
|
||||
export var radarNameShort = radarName;
|
||||
export var quadrants = [
|
||||
'languages-and-frameworks',
|
||||
'methods-and-patterns',
|
||||
'platforms-and-aoe-services',
|
||||
'tools',
|
||||
];
|
||||
export var rings = [
|
||||
'all',
|
||||
'adopt',
|
||||
'trial',
|
||||
'assess',
|
||||
'hold'
|
||||
];
|
||||
export var getItemPageNames = function (items) { return items.map(function (item) { return item.quadrant + "/" + item.name; }); };
|
||||
export var showEmptyRings = false;
|
||||
var messages = {
|
||||
'languages-and-frameworks': 'Languages & Frameworks',
|
||||
'methods-and-patterns': 'Methods & Patterns',
|
||||
'platforms-and-aoe-services': 'Platforms and Operations',
|
||||
'tools': 'Tools',
|
||||
};
|
||||
export var translate = function (key) { return (messages[key] || '-'); };
|
||||
export function isMobileViewport() {
|
||||
// return false for server side rendering
|
||||
if (typeof window == 'undefined')
|
||||
return false;
|
||||
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
return width < 1200;
|
||||
}
|
||||
export function assetUrl(file) {
|
||||
return process.env.PUBLIC_URL + '/' + file;
|
||||
// return `/techradar/assets/${file}`
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Item } from "./model";
|
||||
|
||||
export const radarName = process.env.RADAR_NAME || "AOE Technology Radar";
|
||||
export const radarName =
|
||||
process.env.REACT_APP_RADAR_NAME || "AOE Technology Radar";
|
||||
export const radarNameShort = radarName;
|
||||
|
||||
export const quadrants = [
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||
monospace;
|
||||
}
|
||||
Reference in New Issue
Block a user