chore: Move to vite

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng
2024-06-11 16:29:20 -07:00
parent 2b212f38d0
commit 0d432daa75
7 changed files with 2364 additions and 5327 deletions

View File

@ -4,5 +4,5 @@ module.exports = {
},
extends: [
'@nextcloud',
]
],
}

View File

@ -1,3 +0,0 @@
const babelConfig = require('@nextcloud/babel-config')
module.exports = babelConfig

7644
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
"name": "guests",
"description": "Create guest users which can only see files shared with them",
"version": "3.2.0",
"type": "module",
"author": "Robin Appelman <robin@icewind.nl>",
"contributors": [
"Robin Appelman <robin@icewind.nl>",
@ -24,21 +25,22 @@
"license": "agpl",
"private": true,
"scripts": {
"build": "NODE_ENV=production webpack --progress --config webpack.js",
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
"build": "vite build --mode production",
"dev": "vite build --mode development",
"watch": "vite build --mode development --watch",
"lint": "eslint --ext .js,.vue src",
"lint:fix": "eslint --ext .js,.vue src --fix",
"stylelint": "stylelint css/*.css css/*.scss src/**/*.vue",
"stylelint:fix": "stylelint css/*.css css/*.scss src/**/*.vue --fix"
},
"devDependencies": {
"@nextcloud/babel-config": "^1.2.0",
"@nextcloud/browserslist-config": "^3.0.1",
"@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/eslint-plugin": "^2.2.1",
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.0.1",
"@nextcloud/vite-config": "^1.2.4",
"@vue/tsconfig": "^0.5.1",
"vite": "^5.2.13",
"vue-template-compiler": "^2.7.16"
},
"dependencies": {

11
tsconfig.json Normal file
View File

@ -0,0 +1,11 @@
{
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.vue"],
"compilerOptions": {
"noEmit": true,
"allowImportingTsExtensions": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "Bundler",
"strict": true,
},
}

12
vite.config.ts Normal file
View File

@ -0,0 +1,12 @@
import { createAppConfig } from '@nextcloud/vite-config'
export default createAppConfig({
main: 'src/main.js',
settings: 'src/settings.js',
talk: 'src/talk.js',
},
{
inlineCSS: {
relativeCSSInjection: true,
},
})

View File

@ -1,7 +0,0 @@
const path = require('path')
const webpackConfig = require('@nextcloud/webpack-vue-config')
webpackConfig.entry.settings = path.join(__dirname, 'src', 'settings.js')
webpackConfig.entry.talk = path.join(__dirname, 'src', 'talk.js')
module.exports = webpackConfig