From bf43063592e525687ef555b41943c761fd2b17f6 Mon Sep 17 00:00:00 2001 From: Norbert Csaba Herczeg Date: Mon, 6 Mar 2023 11:15:59 +0100 Subject: [PATCH] JNG-4576 better dependencies support (#19) * JNG-4576: initial commit * JNG-4576: update lock file * JNG-4576: improve dependency support --- .../src/main/resources/actor/inventory.json | 105 ++++++++++++++++ ...package.json.dev-dependencies.fragment.hbs | 1 + .../src/main/resources/actor/pnpm-lock.yaml | 14 +++ .../src/main/resources/actor/public/map.json | 32 ----- .../resources/actor/rollup.config.mjs.hbs | 111 +++++++---------- .../resources/actor/rollup/html-template.mjs | 67 ++++++++++ .../src/main/resources/actor/rollup/utils.js | 18 --- .../src/main/resources/actor/rollup/utils.mjs | 115 ++++++++++++++++++ .../src/main/resources/ui-react.yaml | 24 ++-- 9 files changed, 362 insertions(+), 125 deletions(-) create mode 100644 judo-ui-react/src/main/resources/actor/inventory.json delete mode 100644 judo-ui-react/src/main/resources/actor/public/map.json create mode 100644 judo-ui-react/src/main/resources/actor/rollup/html-template.mjs delete mode 100644 judo-ui-react/src/main/resources/actor/rollup/utils.js create mode 100644 judo-ui-react/src/main/resources/actor/rollup/utils.mjs diff --git a/judo-ui-react/src/main/resources/actor/inventory.json b/judo-ui-react/src/main/resources/actor/inventory.json new file mode 100644 index 00000000..6f500b1f --- /dev/null +++ b/judo-ui-react/src/main/resources/actor/inventory.json @@ -0,0 +1,105 @@ +{ + "@emotion/react": { + "dist/emotion-react.umd.min.js": {"tags": ["importMap", "npm"], "exports": "@emotion/react"} + }, + "@emotion/styled": { + "dist/emotion-styled.umd.min.js": {"tags": ["importMap", "npm"], "exports": "@emotion/styled"} + }, + "@fontsource/roboto": { + "300.css": {"tags": ["css", "npm"]}, + "400.css": {"tags": ["css", "npm"]}, + "500.css": {"tags": ["css", "npm"]}, + "700.css": {"tags": ["css", "npm"]}, + "files/roboto-all-300-normal.woff": {"tags": ["font", "npm"]}, + "files/roboto-all-400-normal.woff": {"tags": ["font", "npm"]}, + "files/roboto-all-500-normal.woff": {"tags": ["font", "npm"]}, + "files/roboto-all-700-normal.woff": {"tags": ["font", "npm"]}, + "files/roboto-latin-300-normal.woff2": {"tags": ["font", "npm"]}, + "files/roboto-latin-400-normal.woff2": {"tags": ["font", "npm"]}, + "files/roboto-latin-500-normal.woff2": {"tags": ["font", "npm"]}, + "files/roboto-latin-700-normal.woff2": {"tags": ["font", "npm"]} + }, + "@judo/data-api-common": { + "umd/judo-data-api-common.min.js": {"tags": ["importMap", "external"], "exports": "@judo/data-api-common"} + }, + "@mdi/font": { + "css/materialdesignicons.min.css": {"tags": ["css", "npm"]}, + "fonts/materialdesignicons-webfont.eot": {"tags": ["font", "npm"]}, + "fonts/materialdesignicons-webfont.ttf": {"tags": ["font", "npm"]}, + "fonts/materialdesignicons-webfont.woff": {"tags": ["font", "npm"]}, + "fonts/materialdesignicons-webfont.woff2": {"tags": ["font", "npm"]} + }, + "@mui/material": { + "umd/mui-material.min.js": {"tags": ["importMap", "external"], "exports": "@mui/material"} + }, + "@mui/material/locale": { + "umd/mui-material-locale.min.js": {"tags": ["importMap", "external"], "exports": "@mui/material/locale"} + }, + "@mui/system": { + "umd/mui-system.min.js": {"tags": ["importMap", "external"], "exports": "@mui/system"} + }, + "@mui/x-data-grid": { + "umd/mui-x-data-grid.min.js": {"tags": ["importMap", "external"], "exports": "@mui/x-data-grid"} + }, + "@mui/x-date-pickers": { + "umd/mui-x-date-pickers.min.js": {"tags": ["importMap", "external"], "exports": "@mui/x-date-pickers"}, + "umd/mui-x-date-pickers-adapter-day-js.min.js": {"tags": ["importMap", "external"], "exports": "@mui/x-date-pickers/AdapterDayjs"} + }, + "@pandino/loader-configuration-dom": { + "dist/system/loader-configuration-dom.min.js": {"tags": ["importMap", "npm"], "exports": "@pandino/loader-configuration-dom"} + }, + "@pandino/pandino": { + "dist/system/pandino.min.js": {"tags": ["importMap", "npm"], "exports": "@pandino/pandino"} + }, + "@pandino/pandino-api": { + "dist/system/pandino-api.min.js": {"tags": ["importMap", "npm"], "exports": "@pandino/pandino-api"} + }, + "@pandino/react-hooks": { + "dist/system/react-hooks.min.js": {"tags": ["importMap", "npm"], "exports": "@pandino/react-hooks"} + }, + "@remix-run/router": { + "dist/router.umd.min.js": {"tags": ["importMap", "npm"], "exports": "@remix-run/router"} + }, + "axios": { + "dist/axios.min.js": {"tags": ["importMap", "npm"], "exports": "axios"} + }, + "dayjs": { + "dayjs.min.js": {"tags": ["importMap", "npm"], "exports": "dayjs"}, + "locale/en.js": {"tags": ["importMap", "npm"], "exports": "dayjs/locale/en"}, + "locale/hu.js": {"tags": ["importMap", "npm"], "exports": "dayjs/locale/hu"} + }, + "i18next": { + "dist/umd/i18next.min.js": {"tags": ["importMap", "npm"], "exports": "i18next"} + }, + "oidc-client-ts": { + "umd/oidc-client-ts.min.js": {"tags": ["importMap", "external"], "exports": "oidc-client-ts"} + }, + "react": { + "umd/react.production.min.js": {"tags": ["importMap", "npm"], "exports": "react"} + }, + "react-dom": { + "umd/react-dom.production.min.js": {"tags": ["importMap", "npm"], "exports": "react-dom"} + }, + "react-dom/client": { + "umd/react-dom-client.min.js": {"tags": ["importMap", "external"], "exports": "react-dom/client"} + }, + "react-i18next": { + "dist/umd/react-i18next.min.js": {"tags": ["importMap", "npm"], "exports": "react-i18next"} + }, + "react-is": { + "umd/react-is.min.js": {"tags": ["importMap", "external"], "exports": "react-is"} + }, + "react-router": { + "dist/umd/react-router.production.min.js": {"tags": ["importMap", "npm"], "exports": "react-router"} + }, + "react-router-dom": { + "dist/umd/react-router-dom.production.min.js": {"tags": ["importMap", "npm"], "exports": "react-router-dom"} + }, + "react/jsx-runtime": { + "umd/react-jsx-runtime.min.js": {"tags": ["importMap", "external"], "exports": "react/jsx-runtime"} + }, + "systemjs": { + "dist/system.min.js": {"tags": ["script", "npm"]}, + "dist/extras/amd.min.js": {"tags": ["script", "npm"]} + } +} diff --git a/judo-ui-react/src/main/resources/actor/package.json.dev-dependencies.fragment.hbs b/judo-ui-react/src/main/resources/actor/package.json.dev-dependencies.fragment.hbs index 0cdbdb77..8fb73b83 100644 --- a/judo-ui-react/src/main/resources/actor/package.json.dev-dependencies.fragment.hbs +++ b/judo-ui-react/src/main/resources/actor/package.json.dev-dependencies.fragment.hbs @@ -1,6 +1,7 @@ "@judo/data-api-common": "0.4.2", "@pandino/pandino-api": "0.8.26", "@rollup/plugin-commonjs": "24.0.0", +"@rollup/plugin-html": "1.0.2", "@rollup/plugin-node-resolve": "15.0.1", "@rollup/plugin-replace": "5.0.2", "@types/node": "16.18.4", diff --git a/judo-ui-react/src/main/resources/actor/pnpm-lock.yaml b/judo-ui-react/src/main/resources/actor/pnpm-lock.yaml index 27d57472..c766a983 100644 --- a/judo-ui-react/src/main/resources/actor/pnpm-lock.yaml +++ b/judo-ui-react/src/main/resources/actor/pnpm-lock.yaml @@ -15,6 +15,7 @@ specifiers: '@pandino/react-hooks': 0.8.26 '@remix-run/router': 1.1.0 '@rollup/plugin-commonjs': 24.0.0 + '@rollup/plugin-html': 1.0.2 '@rollup/plugin-node-resolve': 15.0.1 '@rollup/plugin-replace': 5.0.2 '@types/node': 16.18.4 @@ -70,6 +71,7 @@ devDependencies: '@judo/data-api-common': 0.4.2 '@pandino/pandino-api': 0.8.26 '@rollup/plugin-commonjs': 24.0.0_rollup@3.7.5 + '@rollup/plugin-html': 1.0.2_rollup@3.7.5 '@rollup/plugin-node-resolve': 15.0.1_rollup@3.7.5 '@rollup/plugin-replace': 5.0.2_rollup@3.7.5 '@types/node': 16.18.4 @@ -1031,6 +1033,18 @@ packages: rollup: 3.7.5 dev: true + /@rollup/plugin-html/1.0.2_rollup@3.7.5: + resolution: {integrity: sha512-jGqb45BPj5kwvb/bq1jIzUDLebsm1xmfnY1rwgTIZyjpsMyMKLuQO27n4z5qv6kZmxqxh+CBRD7d1rjAu85Uzg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 3.7.5 + dev: true + /@rollup/plugin-node-resolve/15.0.1_rollup@3.7.5: resolution: {integrity: sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg==} engines: {node: '>=14.0.0'} diff --git a/judo-ui-react/src/main/resources/actor/public/map.json b/judo-ui-react/src/main/resources/actor/public/map.json deleted file mode 100644 index a08a55ff..00000000 --- a/judo-ui-react/src/main/resources/actor/public/map.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "imports": { - "@pandino/loader-configuration-dom": "./externals/@pandino/loader-configuration-dom@0.8.26/dist/system/loader-configuration-dom.min.js", - "@pandino/pandino": "./externals/@pandino/pandino@0.8.26/dist/system/pandino.min.js", - "@pandino/pandino-api": "./externals/@pandino/pandino-api@0.8.26/dist/system/pandino-api.min.js", - "@pandino/react-hooks": "./externals/@pandino/react-hooks@0.8.26/dist/system/react-hooks.min.js", - "dayjs": "./externals/dayjs@1.11.7/dayjs.min.js", - "dayjs/locale/hu": "./externals/dayjs@1.11.7/locale/hu.js", - "react/jsx-runtime": "./externals/react/jsx-runtime@18.2.0/umd/react-jsx-runtime.min.js", - "react-dom/client": "./externals/react-dom/client@18.2.0/umd/react-dom-client.min.js", - "@mui/system": "./externals/@mui/system@5.11.4/umd/mui-system.min.js", - "@mui/material/locale": "./externals/@mui/material/locale@5.11.4/umd/mui-material-locale.min.js", - "@mui/material": "./externals/@mui/material@5.11.4/umd/mui-material.min.js", - "@mui/x-data-grid": "./externals/@mui/x-data-grid@5.17.18/umd/mui-x-data-grid.min.js", - "@mui/x-date-pickers": "./externals/@mui/x-date-pickers@5.0.13/umd/mui-x-date-pickers.min.js", - "@mui/x-date-pickers/AdapterDayjs": "./externals/@mui/x-date-pickers@5.0.13/umd/mui-x-date-pickers-adapter-day-js.min.js", - "@judo/data-api-common": "./externals/@judo/data-api-common@0.4.2/umd/judo-data-api-common.min.js", - "axios": "./externals/axios@1.2.1/dist/axios.min.js", - "react": "./externals/react@18.2.0/umd/react.production.min.js", - "react-dom": "./externals/react-dom@18.2.0/umd/react-dom.production.min.js", - "oidc-client-ts": "./externals/oidc-client-ts@2.2.1/umd/oidc-client-ts.min.js", - "i18next": "./externals/i18next@22.4.6/dist/umd/i18next.min.js", - "react-oidc-context": "./externals/react-oidc-context@2.2.1/umd/react-oidc-context.min.js", - "react-is": "./externals/react-is@18.2.0/umd/react-is.min.js", - "react-i18next": "./externals/react-i18next@12.1.1/dist/umd/react-i18next.min.js", - "@remix-run/router": "./externals/@remix-run/router@1.1.0/dist/router.umd.min.js", - "react-router": "./externals/react-router@6.5.0/dist/umd/react-router.production.min.js", - "react-router-dom": "./externals/react-router-dom@6.5.0/dist/umd/react-router-dom.production.min.js", - "@emotion/react": "./externals/@emotion/react@11.10.5/dist/emotion-react.umd.min.js", - "@emotion/styled": "./externals/@emotion/styled@11.10.5/dist/emotion-styled.umd.min.js" - } -} diff --git a/judo-ui-react/src/main/resources/actor/rollup.config.mjs.hbs b/judo-ui-react/src/main/resources/actor/rollup.config.mjs.hbs index 22a8c962..541c4dd7 100644 --- a/judo-ui-react/src/main/resources/actor/rollup.config.mjs.hbs +++ b/judo-ui-react/src/main/resources/actor/rollup.config.mjs.hbs @@ -1,9 +1,11 @@ import * as dotenv from 'dotenv'; import replace from '@rollup/plugin-replace'; +import html from '@rollup/plugin-html'; import clear from 'rollup-plugin-clear'; import copy from 'rollup-plugin-copy'; import esbuild from 'rollup-plugin-esbuild'; -import { npmExternalsToCopy } from './rollup/utils.js'; +import { copyTasks, loadInventory } from './rollup/utils.mjs'; +import { template } from './rollup/html-template.mjs'; dotenv.config(); @@ -12,71 +14,48 @@ const API_DEFAULT_BASE_URL = process.env.API_DEFAULT_BASE_URL; const FILE_DEFAULT_BASE_URL = process.env.FILE_DEFAULT_BASE_URL; const API_RELATIVE_PATH = process.env.API_RELATIVE_PATH; -export default [ - { - input: 'src/main.tsx', - output: { - dir: 'dist', - format: 'system', - sourcemap: ENV === 'production', - }, - plugins: [ - clear({ - targets: ['dist'], - }), - replace({ +const isProduction = ENV === 'production'; + +const inventory = loadInventory(); + +export default { + input: 'src/main.tsx', + output: { + dir: 'dist', + entryFileNames: `[name]-[hash]${isProduction ? '.min' : ''}.js`, + chunkFileNames: `[name]-[hash]${isProduction ? '.min' : ''}.js`, + format: 'system', + sourcemap: isProduction, + }, + plugins: [ + clear({ + targets: ['dist'], + }), + replace({ + preventAssignment: false, + values: { 'process.env.API_DEFAULT_BASE_URL': JSON.stringify(API_DEFAULT_BASE_URL || '{{ emptyStringFallback apiDefaultBaseURL }}'), 'process.env.FILE_DEFAULT_BASE_URL': JSON.stringify(FILE_DEFAULT_BASE_URL || '{{ emptyStringFallback fileDefaultBaseURL }}'), 'process.env.API_RELATIVE_PATH': JSON.stringify(API_RELATIVE_PATH || '{{ emptyStringFallback apiRelativePath }}'), - }), - esbuild({ - minify: ENV === 'production', - }), - copy({ - targets: [ - { src: 'public/*', dest: 'dist' }, - { src: 'externals', dest: 'dist' }, - ...npmExternalsToCopy([ - ['systemjs', '/dist'], - ['axios', '/dist'], - ['@mdi/font', '/fonts'], - ['@mdi/font', '/css'], - ['@fontsource/roboto', ''], - ['dayjs', '/dayjs.min.js', true], - ['dayjs', '/locale'], - ['react', '/umd'], - ['react-dom', '/umd'], - ['i18next', '/dist/umd'], - ['@pandino/loader-configuration-dom', '/dist/system'], - ['@pandino/pandino', '/dist/system'], - ['@pandino/pandino-api', '/dist/system'], - ['@pandino/react-hooks', '/dist/system'], - ['react-i18next', '/dist/umd'], - ['@remix-run/router', '/dist'], - ['react-router', '/dist/umd'], - ['react-router-dom', '/dist/umd'], - ['@emotion/react', '/dist'], - ['@emotion/styled', '/dist'], - ]), - ], - }), - ], - external: [ - 'react/jsx-runtime', - 'react-dom/client', - 'react-router-dom', - 'react', - 'axios', - 'dayjs', - '@mui/material', - '@mui/x-date-pickers', - '@mui/x-date-pickers/AdapterDayjs', - '@mui/x-data-grid', - 'oidc-client-ts', - 'react-oidc-context', - 'react-i18next', - 'i18next', - '@judo/data-api-common', - ], - }, -]; + }, + }), + esbuild({ + minify: isProduction, + }), + html({ + template: (props) => template({ ...props, inventory }), + title: 'Application', + meta: [ + { 'charset': 'utf-8' }, + { 'http-equiv': 'X-UA-Compatible', 'content': 'IE=edge' }, + { 'name': 'viewport', 'content': 'width=device-width, initial-scale=1' }, + ] + }), + copy({ + targets: [ + { src: 'public/*', dest: 'dist' }, + ...copyTasks(inventory), + ], + }), + ], +}; diff --git a/judo-ui-react/src/main/resources/actor/rollup/html-template.mjs b/judo-ui-react/src/main/resources/actor/rollup/html-template.mjs new file mode 100644 index 00000000..14d71014 --- /dev/null +++ b/judo-ui-react/src/main/resources/actor/rollup/html-template.mjs @@ -0,0 +1,67 @@ +import { EOL } from 'node:os'; +import { createImportMap, getCSSLinks, getScriptLinks } from './utils.mjs'; + +export const makeHtmlAttributes = (attributes) => { + if (!attributes) { + return ''; + } + + const keys = Object.keys(attributes); + return keys.reduce((result, key) => (result += ` ${key}="${attributes[key]}"`), ''); +}; + +export const template = async ({ attributes, files, meta, publicPath, title, inventory }) => { + const generateCssLink = (fileName) => { + const attrs = makeHtmlAttributes(attributes.link); + return ``; + }; + + const generateJSScript = (fileName) => { + const attrs = makeHtmlAttributes(attributes.script); + return ``; + }; + + const mainScript = files.js.find(f => f.name === 'main' && f.type === 'chunk'); + const scripts = [mainScript] + .map(({fileName}) => { + const attrs = makeHtmlAttributes(attributes.script); + return ``; + }) + .join(EOL); + + const cssFiles = getCSSLinks(inventory) + .map(generateCssLink) + .join(EOL); + + const headScripts = getScriptLinks(inventory) + .map(generateJSScript) + .join(EOL); + + const metas = meta + .map((input) => { + const attrs = makeHtmlAttributes(input); + return ``; + }) + .join(EOL); + + return ` + + + + ${metas} + + + ${title} + ${cssFiles} + ${headScripts} + + + + +
+ ${scripts} + +`; +}; diff --git a/judo-ui-react/src/main/resources/actor/rollup/utils.js b/judo-ui-react/src/main/resources/actor/rollup/utils.js deleted file mode 100644 index c0f7b63f..00000000 --- a/judo-ui-react/src/main/resources/actor/rollup/utils.js +++ /dev/null @@ -1,18 +0,0 @@ -import { readFileSync } from 'node:fs'; -import { normalize } from 'node:path'; - -function parseDependencyJSON(depName) { - const from = normalize(`./node_modules/${depName}/package.json`); - return JSON.parse(readFileSync(from, { encoding:'utf8', flag:'r' }).toString()); -} - -export function npmExternalToCopy(depName, suffix, skipFolder = false) { - return { - src: `node_modules/${depName}` + (suffix || '') + (!skipFolder ? '/*' : ''), - dest: `dist/externals/${depName}@${parseDependencyJSON(depName).version}` + (!skipFolder ? (suffix || '') : ''), - }; -} - -export function npmExternalsToCopy(externals) { - return externals.map(([depName, suffix, skipFolder]) => npmExternalToCopy(depName, suffix, skipFolder || false)); -} \ No newline at end of file diff --git a/judo-ui-react/src/main/resources/actor/rollup/utils.mjs b/judo-ui-react/src/main/resources/actor/rollup/utils.mjs new file mode 100644 index 00000000..da7a92ef --- /dev/null +++ b/judo-ui-react/src/main/resources/actor/rollup/utils.mjs @@ -0,0 +1,115 @@ +import {readFileSync, readdirSync} from 'node:fs'; +import {normalize, join} from 'node:path'; + +const dependencyCache = {}; + +function parseDependencyJSON(depName) { + if (Object.keys(dependencyCache).includes(depName)) { + return dependencyCache[depName]; + } + const from = normalize(`./node_modules/${depName}/package.json`); + const newDep = JSON.parse(readFileSync(from, {encoding: 'utf8', flag: 'r'}).toString()); + + dependencyCache[depName] = newDep; + + return newDep; +} + +export function loadInventory() { + const inventory = JSON.parse(readFileSync('inventory.json', {encoding: 'utf8', flag: 'r'}).toString()); + const externals = readdirSync(normalize('externals')); + + for (const packageName in inventory) { + for (const fileName in inventory[packageName]) { + const f = inventory[packageName][fileName]; + if (f.tags.includes('npm')) { + f.version = parseDependencyJSON(packageName).version; + } else if (f.tags.includes('external')) { + let folder; + if (!packageName.includes('/')) { + folder = externals.find(e => e.startsWith(packageName + '@')); + } else { + const lead = packageName.substring(0, packageName.lastIndexOf('/')); + const trail = packageName.split('/').pop(); + const leadPackages = readdirSync(normalize(join('externals', ...lead.split('/')))); + folder = leadPackages.find(e => e.startsWith(trail + '@')); + } + if (folder) { + f.version = folder.split('@').pop(); + } + } + } + } + + return inventory; +} + +export function createImportMap(inventory) { + const importMap = {}; + + for (const packageName in inventory) { + for (const fileName in inventory[packageName]) { + const f = inventory[packageName][fileName]; + if (f.tags.includes('importMap')) { + importMap[f.exports] = `./externals/` + packageName + '@' + f.version + '/' + fileName; + } + } + } + + return importMap; +} + +export function copyTasks(inventory, prefix = 'dist/externals/') { + const tasks = []; + + for (const packageName in inventory) { + for (const fileName in inventory[packageName]) { + const f = inventory[packageName][fileName]; + const targetSuffix = fileName.includes('/') ? '/' + fileName.substring(0, fileName.lastIndexOf('/')) : ''; + if (f.tags.includes('npm')) { + tasks.push({ + src: `node_modules/${packageName}/${fileName}`, + dest: `${prefix}${packageName}@${f.version}${targetSuffix}`, + }); + } + if (f.tags.includes('external')) { + tasks.push({ + src: `externals/` + packageName + '@' + f.version + '/' + fileName, + dest: `${prefix}${packageName}@${f.version}${targetSuffix}`, + }); + } + } + } + + return tasks; +} + +export function getCSSLinks(inventory, prefix = 'dist/externals/') { + const files = []; + + for (const packageName in inventory) { + for (const fileName in inventory[packageName]) { + const f = inventory[packageName][fileName]; + if (f.tags.includes('css')) { + files.push(`./externals/` + packageName + '@' + f.version + '/' + fileName); + } + } + } + + return files; +} + +export function getScriptLinks(inventory, prefix = 'dist/externals/') { + const files = []; + + for (const packageName in inventory) { + for (const fileName in inventory[packageName]) { + const f = inventory[packageName][fileName]; + if (f.tags.includes('script')) { + files.push(`./externals/` + packageName + '@' + f.version + '/' + fileName); + } + } + } + + return files; +} diff --git a/judo-ui-react/src/main/resources/ui-react.yaml b/judo-ui-react/src/main/resources/ui-react.yaml index cf07034e..e4a89e38 100644 --- a/judo-ui-react/src/main/resources/ui-react.yaml +++ b/judo-ui-react/src/main/resources/ui-react.yaml @@ -56,11 +56,23 @@ templates: applicationBased: true copy: true + - name: actor/inventory.json + pathExpression: "'inventory.json'" + templateName: actor/inventory.json + applicationBased: true + copy: true + # Actor - rollup - - name: actor/rollup/utils.js - pathExpression: "'rollup/utils.js'" - templateName: actor/rollup/utils.js + - name: actor/rollup/utils.mjs + pathExpression: "'rollup/utils.mjs'" + templateName: actor/rollup/utils.mjs + applicationBased: true + copy: true + + - name: actor/rollup/html-template.mjs + pathExpression: "'rollup/html-template.mjs'" + templateName: actor/rollup/html-template.mjs applicationBased: true copy: true @@ -71,12 +83,6 @@ templates: templateName: actor/public/index.html.hbs applicationBased: true - - name: actor/public/map.json - pathExpression: "'public/map.json'" - templateName: actor/public/map.json - applicationBased: true - copy: true - - name: actor/public/favicon.ico pathExpression: "'public/favicon.ico'" templateName: actor/public/favicon.ico