Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
env:
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_DOWNLOAD: true
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
npm ci
npm run build --if-present
Expand Down
181 changes: 159 additions & 22 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
},
"homepage": "https://github.com/skjnldsv/nextcloud-upload",
"devDependencies": {
"@codecov/vite-plugin": "^0.0.1-beta.10",
"@cypress/vue2": "^2.1.1",
"@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/vite-config": "^1.3.0",
Expand Down
18 changes: 16 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { createLibConfig } from '@nextcloud/vite-config'
import { codecovVitePlugin } from '@codecov/vite-plugin'

import { readdirSync, readFileSync } from 'fs'
import { po as poParser } from 'gettext-parser'
// eslint-disable-next-line n/no-extraneous-import
Expand All @@ -26,19 +28,31 @@ export default defineConfig((env) => {
return createLibConfig({
index: 'lib/index.ts',
}, {
inlineCSS: true,
libraryFormats: ['es', 'cjs'],
nodeExternalsOptions: {
// for subpath imports like '@nextcloud/l10n/gettext'
include: [/^@nextcloud\//],
// we should externalize vue SFC dependencies
exclude: [/^vue-material-design-icons\//],
},
libraryFormats: ['es', 'cjs'],
inlineCSS: true,

replace: {
__TRANSLATIONS__: JSON.stringify(translations),
},
DTSPluginOptions: {
rollupTypes: env.mode === 'production',
},

config: {
plugins: [
// Put the Codecov vite plugin after all other plugins
codecovVitePlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: '@nextcloud/upload',
uploadToken: process.env.CODECOV_TOKEN,
}),
],
},
})(env)
}) as UserConfigFn