This file contains hidden or 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
### STAGE 1: Build ### | |
FROM node:14.19.3 AS build | |
# Create app directory | |
WORKDIR /usr/src/app | |
# A wildcard is used to ensure both package.json AND package-lock.json are copied | |
COPY package*.json ./ | |
# Install app dependencies |
This file contains hidden or 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
function detectOs() { | |
let userAgt = navigator.userAgent; | |
let os = ''; | |
let version = ''; | |
let regOsVersion = ''; | |
let osMap = [ | |
{ s : 'Windows', r:/(Windows 10.0|Windows NT 10.0|Windows 8.1|Windows NT 6.3|Windows 8|Windows NT 6.2|Windows 7|Windows NT 6.1)/}, | |
{ s : 'Linux', r:/(Linux|X11(?!.*CrOS))/}, | |
{ s : 'Mac OS X', r:/Mac OS X/}, | |
{ s : 'Mac OS', r:/(Mac OS|MacPPC|MacIntel|Mac_PowerPC|Macintosh)/} |
This file contains hidden or 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
function detectBrowser() { | |
let ua = window.navigator.userAgent; | |
if (ua.indexOf('Edg') > -1) { | |
let M = ua.match(/(Edg)\/?\s*(\.?\d+(\.\d+)*)/i); | |
return 'Edge '+ M[2]; | |
} else if (ua.indexOf('OPR') > -1) { | |
let M = ua.match(/(OPR)\/?\s*(\.?\d+(\.\d+)*)/i); | |
return 'Opera '+ M[2]; | |
} else { | |
let tem; |
This file contains hidden or 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
const fs = require('fs'); | |
const { join } = require('path'); | |
const dir = './src/app'; | |
const excludeExtns = [ | |
'.html', | |
'.scss', | |
'.css', | |
'.sass', | |
'.spec.ts', |