Skip to content

Commit

Permalink
refactor: rename ManifestEntryContent to GeneratedManifest
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPotatoMan committed Apr 4, 2024
1 parent e111506 commit 4c4b7b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export interface ManifestEntry {
route: `/${string}.xml`
}

export interface ManifestEntryContent extends ManifestEntry {
/** Generated manifest */
export interface GeneratedManifest extends ManifestEntry {
content: string
}

Expand All @@ -21,5 +22,5 @@ export interface MSOfficeAddinConfig {

export interface OfficeAddinVirtualContext {
options: MSOfficeAddinConfig
manifests: ManifestEntryContent[]
manifests: GeneratedManifest[]
}
4 changes: 2 additions & 2 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'node:fs'
import { resolve } from 'node:path'
import { loadEnv, normalizePath } from 'vite'
import type { ManifestEntry, ManifestEntryContent } from './types'
import type { GeneratedManifest, ManifestEntry } from './types'

export const OFFICE_JS_URL = 'https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js'
export const OFFICE_JS_LOADER_SNIPPET = `<script src="${OFFICE_JS_URL}" async defer></script>`
Expand All @@ -15,7 +15,7 @@ export function transformManifests(params: {
mode: string
envDir: string
}) {
const entries = <ManifestEntryContent[]>[]
const entries = <GeneratedManifest[]>[]
const env = loadEnv(params.mode, params.envDir)

for (const { src, route } of params.inputs) {
Expand Down

0 comments on commit 4c4b7b9

Please sign in to comment.