Skip to content

Commit

Permalink
refactor: playground structure
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPotatoMan committed Apr 3, 2024
1 parent 7c8fcd6 commit 1a49a08
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 9 deletions.
1 change: 0 additions & 1 deletion playground/.env.local

This file was deleted.

5 changes: 5 additions & 0 deletions playground/nuxt/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VITE_OFFICE_ID=c6890c26-5bbb-40ed-a321-37f07909a2f0
VITE_OFFICE_DOMAIN=https://www.contoso.com
VITE_OFFICE_PROVIDER_NAME=Contoso, Ltd
VITE_OFFICE_DISPLAY_NAME=Contoso App
VITE_OFFICE_DESCRIPTION=Office add-in for Contoso App
File renamed without changes.
10 changes: 7 additions & 3 deletions playground/nuxt.config.ts → playground/nuxt/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import { resolve } from 'node:path'

const root = resolve(__dirname, '../..')

export default defineNuxtConfig({
modules: ['../src/module'],
devtools: { enabled: true },
modules: [
resolve(root, 'src/module'),
],

msOfficeAddin: {
manifests: [
{
src: resolve(__dirname, '../manifest.xml'),
src: resolve(root, 'manifest.xml'),
route: '/office-app/manifest.xml',
},
{
src: resolve(__dirname, '../manifest.xml'),
src: resolve(root, 'manifest.xml'),
route: '/office-app-alt/manifest.xml',
},
],
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json → playground/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "msoffice-addin-playground",
"name": "playground-nuxt",
"type": "module",
"private": true,
"scripts": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import MSOfficeAddin from '../src/vite'
import MSOfficeAddin from '../../src/vite'

export default defineConfig({
envDir: resolve(__dirname, '..'),
Expand Down
11 changes: 10 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
packages:
- playground
- playground/*
2 changes: 1 addition & 1 deletion test/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { $fetch, setup } from '@nuxt/test-utils/e2e'

describe('ssr', async () => {
await setup({
rootDir: fileURLToPath(new URL('../playground', import.meta.url)),
rootDir: fileURLToPath(new URL('../playground/nuxt', import.meta.url)),
})

it('renders office manifest', () => {
Expand Down

0 comments on commit 1a49a08

Please sign in to comment.