Skip to content

Commit

Permalink
chore: Move to ESM package
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jan 9, 2024
1 parent 7e3c5c7 commit 572a73d
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 44 deletions.
24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"globals": {
"EMOJIS": true,
"PRODUCTION": true,
"SCOPE_VERSION": true,
"TRANSLATIONS": true,
"oc_userconfig": true,
"appName": true,
"appVersion": true
},
"extends": [
"@nextcloud"
],
"plugins": [
"cypress"
],
"parserOptions": {
"babelOptions": {
"plugins": [
"@babel/plugin-syntax-import-assertions"
]
}
}
}
File renamed without changes.
7 changes: 0 additions & 7 deletions build/usernameToColor-export.js

This file was deleted.

2 changes: 1 addition & 1 deletion package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"bugs": "https://github.com/nextcloud-libraries/nextcloud-vue/issues",
"author": "John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>",
"license": "AGPL-3.0",
"type": "module",
"scripts": {
"build": "vite build --mode production ",
"dev": "vite build --mode development",
Expand All @@ -24,8 +25,8 @@
"test:coverage": "TZ=UTC vitest run --coverage",
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css",
"stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css --fix",
"styleguide": "vue-styleguidist server",
"styleguide:build": "vue-styleguidist build",
"styleguide": "vue-styleguidist --config styleguide.config.cjs server",
"styleguide:build": "vue-styleguidist --config styleguide.config.cjs build",
"cypress": "TZ=UTC cypress run --component",
"cypress:gui": "TZ=UTC cypress open --component",
"cypress:update-snapshots": "TZ=UTC cypress run --component --spec \"cypress/visual/**/*.cy.{t,j}s\" --env type=base --config screenshotsFolder=cypress/snapshots/base"
Expand Down Expand Up @@ -137,7 +138,7 @@
"jsdom": "^22.1.0",
"resolve-url-loader": "^5.0.0",
"sanitize-filename": "^1.6.3",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"typescript": "^5.0.4",
"url-loader": "^4.1.1",
"vite": "^5.0.10",
Expand Down
2 changes: 1 addition & 1 deletion styleguide.config.js → styleguide.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path')
const { merge } = require('webpack-merge')
const webpackConfig = require('./webpack.config.js')
const webpackConfig = require('./webpack.config.cjs')

module.exports = async () => {
const base = await webpackConfig()
Expand Down
5 changes: 2 additions & 3 deletions styleguide/global.requires.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'core-js/stable/index.js'
/* eslint-disable-next-line */
import 'core-js/stable'
/* eslint-disable-next-line */
import 'regenerator-runtime/runtime'
import 'regenerator-runtime/runtime.js'

import axios from '@nextcloud/axios'

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@vue/tsconfig",
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["./src/**/*.ts"],
"exclude": ["./src/**/*.cy.ts"],
"compilerOptions": {
Expand Down
4 changes: 0 additions & 4 deletions vite.config.mts → vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ import { join, resolve } from 'node:path'
import { defineConfig } from 'vite'

import md5 from 'md5'
import * as url from 'url'

import l10nPlugin from './build/l10n-plugin.mts'

// `__dirname` not available on ES modules by default
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))

const appVersion = JSON.stringify(process.env.npm_package_version || 'nextcloud-vue')
const SCOPE_VERSION = md5(appVersion).slice(0, 7) as string

Expand Down
File renamed without changes.

0 comments on commit 572a73d

Please sign in to comment.