forked from AOEpeople/aoe_technology_radar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02c81de
commit e2aec44
Showing
8 changed files
with
133 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
PUBLIC_URL=techradar/ | ||
PUBLIC_URL=/techradar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,39 @@ | ||
"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.RADAR_NAME || "AOE Technology Radar"; | ||
exports.radarNameShort = exports.radarName; | ||
exports.quadrants = [ | ||
'languages-and-frameworks', | ||
'methods-and-patterns', | ||
'platforms-and-aoe-services', | ||
'tools', | ||
"languages-and-frameworks", | ||
"methods-and-patterns", | ||
"platforms-and-aoe-services", | ||
"tools", | ||
]; | ||
exports.rings = [ | ||
'all', | ||
'adopt', | ||
'trial', | ||
'assess', | ||
'hold' | ||
]; | ||
var getItemPageNames = function (items) { return items.map(function (item) { return item.quadrant + "/" + item.name; }); }; | ||
exports.rings = ["all", "adopt", "trial", "assess", "hold"]; | ||
var getItemPageNames = function (items) { | ||
return items.map(function (item) { return item.quadrant + "/" + item.name; }); | ||
}; | ||
exports.getItemPageNames = getItemPageNames; | ||
exports.showEmptyRings = false; | ||
var messages = { | ||
'languages-and-frameworks': 'Languages & Frameworks', | ||
'methods-and-patterns': 'Methods & Patterns', | ||
'platforms-and-aoe-services': 'Platforms and Operations', | ||
'tools': 'Tools', | ||
"languages-and-frameworks": "Languages & Frameworks", | ||
"methods-and-patterns": "Methods & Patterns", | ||
"platforms-and-aoe-services": "Platforms and Operations", | ||
tools: "Tools", | ||
}; | ||
var translate = function (key) { return (messages[key] || '-'); }; | ||
var translate = function (key) { return messages[key] || "-"; }; | ||
exports.translate = translate; | ||
function isMobileViewport() { | ||
// return false for server side rendering | ||
if (typeof window == 'undefined') | ||
if (typeof window == "undefined") | ||
return false; | ||
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; | ||
var width = window.innerWidth || | ||
document.documentElement.clientWidth || | ||
document.body.clientWidth; | ||
return width < 1200; | ||
} | ||
exports.isMobileViewport = isMobileViewport; | ||
function assetUrl(file) { | ||
return process.env.PUBLIC_URL + '/' + file; | ||
// return `/techradar/assets/${file}` | ||
return process.env.PUBLIC_URL + "/" + file; | ||
} | ||
exports.assetUrl = assetUrl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,44 @@ | ||
import {Item} from './model'; | ||
import { Item } from "./model"; | ||
|
||
export const radarName = process.env.RADAR_NAME || 'AOE Technology Radar' | ||
export const radarName = process.env.RADAR_NAME || "AOE Technology Radar"; | ||
export const radarNameShort = radarName; | ||
|
||
export const quadrants = [ | ||
'languages-and-frameworks', | ||
'methods-and-patterns', | ||
'platforms-and-aoe-services', | ||
'tools', | ||
"languages-and-frameworks", | ||
"methods-and-patterns", | ||
"platforms-and-aoe-services", | ||
"tools", | ||
]; | ||
|
||
export const rings = [ | ||
'all', | ||
'adopt', | ||
'trial', | ||
'assess', | ||
'hold' | ||
] as const; | ||
export const rings = ["all", "adopt", "trial", "assess", "hold"] as const; | ||
|
||
export type Ring = typeof rings[number] | ||
export type Ring = typeof rings[number]; | ||
|
||
export const getItemPageNames = (items: Item[]) => items.map(item => `${item.quadrant}/${item.name}`); | ||
export const getItemPageNames = (items: Item[]) => | ||
items.map((item) => `${item.quadrant}/${item.name}`); | ||
|
||
export const showEmptyRings = false; | ||
|
||
const messages: { [k: string]: string } = { | ||
'languages-and-frameworks': 'Languages & Frameworks', | ||
'methods-and-patterns': 'Methods & Patterns', | ||
'platforms-and-aoe-services': 'Platforms and Operations', | ||
'tools': 'Tools', | ||
"languages-and-frameworks": "Languages & Frameworks", | ||
"methods-and-patterns": "Methods & Patterns", | ||
"platforms-and-aoe-services": "Platforms and Operations", | ||
tools: "Tools", | ||
}; | ||
|
||
export const translate = (key: string) => (messages[key] || '-'); | ||
export const translate = (key: string) => messages[key] || "-"; | ||
|
||
export function isMobileViewport() { | ||
// return false for server side rendering | ||
if (typeof window == 'undefined') return false; | ||
|
||
const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; | ||
return width < 1200; | ||
// return false for server side rendering | ||
if (typeof window == "undefined") return false; | ||
|
||
const width = | ||
window.innerWidth || | ||
document.documentElement.clientWidth || | ||
document.body.clientWidth; | ||
return width < 1200; | ||
} | ||
|
||
export function assetUrl(file: string) { | ||
return process.env.PUBLIC_URL + '/' + file; | ||
// return `/techradar/assets/${file}` | ||
return process.env.PUBLIC_URL + "/" + file; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
#!/usr/bin/env node | ||
|
||
import {createRadar} from "./radar"; | ||
import {save} from "./file"; | ||
import {copyFileSync, mkdir, mkdirSync} from "fs"; | ||
import {quadrants} from "../src/config"; | ||
|
||
import { createRadar } from "./radar"; | ||
import { copyFileSync, mkdirSync, existsSync } from "fs"; | ||
import { quadrants } from "../src/config"; | ||
|
||
(async () => { | ||
try { | ||
console.log('starting static') | ||
const radar = await createRadar(); | ||
try { | ||
console.log("starting static"); | ||
const radar = await createRadar(); | ||
|
||
copyFileSync('build/index.html', 'build/overview.html') | ||
copyFileSync('build/index.html', 'build/help-and-about-tech-radar.html') | ||
copyFileSync("build/index.html", "build/overview.html"); | ||
copyFileSync("build/index.html", "build/help-and-about-tech-radar.html"); | ||
|
||
quadrants.forEach(quadrant => { | ||
copyFileSync('build/index.html', 'build/' + quadrant + '.html') | ||
mkdirSync('build/' + quadrant) | ||
}) | ||
radar.items.forEach(item => { | ||
copyFileSync('build/index.html', 'build/' + item.quadrant + '/' + item.name + '.html') | ||
}) | ||
quadrants.forEach((quadrant) => { | ||
const destFolder = `build/${quadrant}`; | ||
copyFileSync("build/index.html", `${destFolder}.html`); | ||
if (!existsSync(destFolder)) { | ||
mkdirSync(destFolder); | ||
} | ||
}); | ||
radar.items.forEach((item) => { | ||
copyFileSync( | ||
"build/index.html", | ||
`build/${item.quadrant}/${item.name}.html` | ||
); | ||
}); | ||
|
||
console.log('created static'); | ||
} catch (e) { | ||
console.error('error:', e); | ||
} | ||
})() | ||
console.log("created static"); | ||
} catch (e) { | ||
console.error("error:", e); | ||
} | ||
})(); |