mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 23:24:46 +02:00
chore: purge old configs
This commit is contained in:
parent
66ec86694f
commit
20ce0ca8e6
@ -1,6 +0,0 @@
|
||||
public
|
||||
node_modules
|
||||
resources/views
|
||||
babel.config.js
|
||||
tailwind.config.js
|
||||
webpack.config.js
|
52
.eslintrc.js
52
.eslintrc.js
@ -1,52 +0,0 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 6,
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
project: './tsconfig.json',
|
||||
tsconfigRootDir: './',
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
pragma: 'React',
|
||||
version: 'detect',
|
||||
},
|
||||
linkComponents: [
|
||||
{ name: 'Link', linkAttribute: 'to' },
|
||||
{ name: 'NavLink', linkAttribute: 'to' },
|
||||
],
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
},
|
||||
plugins: ['react', 'react-hooks', 'prettier', '@typescript-eslint'],
|
||||
extends: [
|
||||
// 'standard',
|
||||
'eslint:recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:jest-dom/recommended',
|
||||
],
|
||||
rules: {
|
||||
eqeqeq: 'error',
|
||||
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
|
||||
// TypeScript can infer this significantly better than eslint ever can.
|
||||
'react/prop-types': 0,
|
||||
'react/display-name': 0,
|
||||
'@typescript-eslint/no-explicit-any': 0,
|
||||
'@typescript-eslint/no-non-null-assertion': 0,
|
||||
// 'react/no-unknown-property': ['error', { ignore: ['css'] }],
|
||||
// This setup is required to avoid a spam of errors when running eslint about React being
|
||||
// used before it is defined.
|
||||
//
|
||||
// @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
|
||||
'no-use-before-define': 0,
|
||||
'@typescript-eslint/no-use-before-define': 'warn',
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
||||
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }],
|
||||
},
|
||||
};
|
@ -1,34 +0,0 @@
|
||||
module.exports = function (api) {
|
||||
let targets = {};
|
||||
const plugins = [
|
||||
'babel-plugin-macros',
|
||||
'styled-components',
|
||||
'react-hot-loader/babel',
|
||||
'@babel/transform-runtime',
|
||||
'@babel/transform-react-jsx',
|
||||
'@babel/proposal-class-properties',
|
||||
'@babel/proposal-object-rest-spread',
|
||||
'@babel/proposal-optional-chaining',
|
||||
'@babel/proposal-nullish-coalescing-operator',
|
||||
'@babel/syntax-dynamic-import',
|
||||
];
|
||||
|
||||
if (api.env('test')) {
|
||||
targets = { node: 'current' };
|
||||
plugins.push('@babel/transform-modules-commonjs');
|
||||
}
|
||||
|
||||
return {
|
||||
plugins,
|
||||
presets: [
|
||||
'@babel/typescript',
|
||||
['@babel/env', {
|
||||
modules: false,
|
||||
useBuiltIns: 'entry',
|
||||
corejs: 3,
|
||||
targets,
|
||||
}],
|
||||
'@babel/react',
|
||||
]
|
||||
};
|
||||
};
|
@ -1,28 +0,0 @@
|
||||
const { pathsToModuleNameMapper } = require('ts-jest');
|
||||
const { compilerOptions } = require('./tsconfig');
|
||||
|
||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
isolatedModules: true,
|
||||
},
|
||||
},
|
||||
moduleFileExtensions: ['js', 'ts', 'tsx', 'd.ts', 'json', 'node'],
|
||||
moduleNameMapper: {
|
||||
'\\.(jpe?g|png|gif|svg)$': '<rootDir>/resources/scripts/__mocks__/file.ts',
|
||||
'\\.(s?css|less)$': 'identity-obj-proxy',
|
||||
...pathsToModuleNameMapper(compilerOptions.paths, {
|
||||
prefix: '<rootDir>/',
|
||||
}),
|
||||
},
|
||||
setupFilesAfterEnv: [
|
||||
'<rootDir>/resources/scripts/setup-tests.ts',
|
||||
],
|
||||
transform: {
|
||||
'.*\\.[t|j]sx$': 'babel-jest',
|
||||
'.*\\.ts$': 'ts-jest',
|
||||
},
|
||||
testPathIgnorePatterns: ['/node_modules/'],
|
||||
};
|
158
package.json
158
package.json
@ -1,158 +0,0 @@
|
||||
{
|
||||
"name": "panel",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@floating-ui/react-dom-interactions": "^0.6.6",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
||||
"@fortawesome/react-fontawesome": "^0.1.11",
|
||||
"@headlessui/react": "^1.6.4",
|
||||
"@heroicons/react": "^1.0.6",
|
||||
"@hot-loader/react-dom": "^16.14.0",
|
||||
"@preact/signals-react": "^1.2.1",
|
||||
"@tailwindcss/forms": "^0.5.2",
|
||||
"@tailwindcss/line-clamp": "^0.4.0",
|
||||
"axios": "^1.6.7",
|
||||
"boring-avatars": "^1.7.0",
|
||||
"chart.js": "^3.8.0",
|
||||
"classnames": "^2.3.1",
|
||||
"codemirror": "^5.58.2",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"date-fns": "^2.28.0",
|
||||
"debounce": "^1.2.0",
|
||||
"deepmerge-ts": "^4.2.1",
|
||||
"easy-peasy": "^4.0.1",
|
||||
"events": "^3.0.0",
|
||||
"formik": "^2.2.6",
|
||||
"framer-motion": "^6.3.10",
|
||||
"i18next": "^21.8.9",
|
||||
"i18next-http-backend": "^1.4.1",
|
||||
"i18next-multiload-backend-adapter": "^1.0.0",
|
||||
"qrcode.react": "^1.0.1",
|
||||
"react": "^16.14.0",
|
||||
"react-chartjs-2": "^4.2.0",
|
||||
"react-dom": "npm:@hot-loader/react-dom",
|
||||
"react-fast-compare": "^3.2.0",
|
||||
"react-hot-loader": "^4.12.21",
|
||||
"react-i18next": "^11.2.1",
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-transition-group": "^4.4.1",
|
||||
"react-turnstile": "^1.1.4",
|
||||
"rimraf": "^4",
|
||||
"sockette": "^2.0.6",
|
||||
"styled-components": "^5.2.1",
|
||||
"styled-components-breakpoint": "^3.0.0-preview.20",
|
||||
"swr": "^0.2.3",
|
||||
"tailwindcss": "^3.0.24",
|
||||
"use-fit-text": "^2.4.0",
|
||||
"uuid": "^8.3.2",
|
||||
"xterm": "^4.19.0",
|
||||
"xterm-addon-fit": "^0.5.0",
|
||||
"xterm-addon-search": "^0.9.0",
|
||||
"xterm-addon-search-bar": "^0.2.0",
|
||||
"xterm-addon-web-links": "^0.6.0",
|
||||
"yup": "^0.29.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.1",
|
||||
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.18.2",
|
||||
"@babel/plugin-transform-react-jsx": "^7.12.1",
|
||||
"@babel/plugin-transform-runtime": "^7.12.1",
|
||||
"@babel/preset-env": "^7.12.1",
|
||||
"@babel/preset-react": "^7.12.1",
|
||||
"@babel/preset-typescript": "^7.12.1",
|
||||
"@babel/runtime": "^7.12.1",
|
||||
"@testing-library/dom": "^8.14.0",
|
||||
"@testing-library/jest-dom": "^5.16.4",
|
||||
"@testing-library/react": "12.1.5",
|
||||
"@testing-library/user-event": "^14.2.1",
|
||||
"@types/codemirror": "^0.0.98",
|
||||
"@types/debounce": "^1.2.0",
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/jest": "^28.1.3",
|
||||
"@types/node": "^14.11.10",
|
||||
"@types/qrcode.react": "^1.0.1",
|
||||
"@types/react": "^16.14.0",
|
||||
"@types/react-copy-to-clipboard": "^4.3.0",
|
||||
"@types/react-dom": "^16.9.16",
|
||||
"@types/react-redux": "^7.1.1",
|
||||
"@types/react-router": "^5.1.3",
|
||||
"@types/react-router-dom": "^5.1.3",
|
||||
"@types/react-transition-group": "^4.4.0",
|
||||
"@types/styled-components": "^5.1.7",
|
||||
"@types/uuid": "^3.4.5",
|
||||
"@types/webpack-env": "^1.15.2",
|
||||
"@types/yup": "^0.29.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"babel-jest": "^28.1.1",
|
||||
"babel-loader": "^8.2.5",
|
||||
"babel-plugin-styled-components": "^2.0.7",
|
||||
"cross-env": "^7.0.2",
|
||||
"css-loader": "^5.2.7",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-jest-dom": "^4.0.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.2.10",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^28.1.1",
|
||||
"postcss": "^8.4.35",
|
||||
"postcss-import": "^14.1.0",
|
||||
"postcss-loader": "^4.0.0",
|
||||
"postcss-nesting": "^10.1.8",
|
||||
"postcss-preset-env": "^7.7.1",
|
||||
"prettier": "^2.7.1",
|
||||
"redux-devtools-extension": "^2.13.8",
|
||||
"source-map-loader": "^1.1.3",
|
||||
"style-loader": "^2.0.0",
|
||||
"svg-url-loader": "^7.1.1",
|
||||
"terser-webpack-plugin": "^4.2.3",
|
||||
"ts-essentials": "^9.1.2",
|
||||
"ts-jest": "^28.0.5",
|
||||
"twin.macro": "^2.8.2",
|
||||
"typescript": "^4.7.3",
|
||||
"webpack": "^4.47.0",
|
||||
"webpack-assets-manifest": "^3.1.1",
|
||||
"webpack-bundle-analyzer": "^3.8.0",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-dev-server": "^3.11.0",
|
||||
"yarn-deduplicate": "^1.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "cd public/assets && rimraf -g *.js *.map",
|
||||
"test": "jest",
|
||||
"lint": "eslint ./resources/scripts/**/*.{ts,tsx} --ext .ts,.tsx",
|
||||
"watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
|
||||
"build": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --progress",
|
||||
"build:production": "yarn run clean && cross-env NODE_ENV=production ./node_modules/.bin/webpack --mode production",
|
||||
"serve": "yarn run clean && cross-env WEBPACK_PUBLIC_PATH=/webpack@hmr/ NODE_ENV=development webpack-dev-server --host 0.0.0.0 --port 8080 --public https://panel.test --hot"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 0.5%",
|
||||
"last 2 versions",
|
||||
"firefox esr",
|
||||
"not dead"
|
||||
],
|
||||
"babelMacros": {
|
||||
"twin": {
|
||||
"preset": "styled-components"
|
||||
},
|
||||
"styledComponents": {
|
||||
"pure": true,
|
||||
"displayName": true,
|
||||
"fileName": true
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('postcss-import'),
|
||||
// We want to make use of nesting following the CSS Nesting spec, and not the
|
||||
// SASS style nesting.
|
||||
//
|
||||
// @see https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting
|
||||
require('tailwindcss/nesting')(require('postcss-nesting')),
|
||||
require('tailwindcss'),
|
||||
require('autoprefixer'),
|
||||
require('postcss-preset-env')({
|
||||
features: {
|
||||
'nesting-rules': false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
@ -1,51 +0,0 @@
|
||||
const colors = require('tailwindcss/colors');
|
||||
|
||||
const gray = {
|
||||
50: 'hsl(216, 33%, 97%)',
|
||||
100: 'hsl(214, 15%, 91%)',
|
||||
200: 'hsl(210, 16%, 82%)',
|
||||
300: 'hsl(211, 13%, 65%)',
|
||||
400: 'hsl(211, 10%, 53%)',
|
||||
500: 'hsl(211, 12%, 43%)',
|
||||
600: 'hsl(209, 14%, 37%)',
|
||||
700: 'hsl(209, 18%, 30%)',
|
||||
800: 'hsl(209, 20%, 25%)',
|
||||
900: 'hsl(210, 24%, 16%)',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
content: [
|
||||
'./resources/scripts/**/*.{js,ts,tsx}',
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
header: ['"IBM Plex Sans"', '"Roboto"', 'system-ui', 'sans-serif'],
|
||||
},
|
||||
colors: {
|
||||
black: '#131a20',
|
||||
// "primary" and "neutral" are deprecated, prefer the use of "blue" and "gray"
|
||||
// in new code.
|
||||
primary: colors.blue,
|
||||
gray: gray,
|
||||
neutral: gray,
|
||||
cyan: colors.cyan,
|
||||
},
|
||||
fontSize: {
|
||||
'2xs': '0.625rem',
|
||||
},
|
||||
transitionDuration: {
|
||||
250: '250ms',
|
||||
},
|
||||
borderColor: theme => ({
|
||||
default: theme('colors.neutral.400', 'currentColor'),
|
||||
}),
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/line-clamp'),
|
||||
require('@tailwindcss/forms')({
|
||||
strategy: 'class',
|
||||
}),
|
||||
]
|
||||
};
|
@ -1,47 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2015",
|
||||
"module": "es2020",
|
||||
"jsx": "react",
|
||||
"moduleResolution": "node",
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
],
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"sourceMap": true,
|
||||
"noImplicitReturns": true,
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"baseUrl": ".",
|
||||
"importsNotUsedAsValues": "preserve",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./resources/scripts/*"
|
||||
],
|
||||
"@definitions/*": [
|
||||
"./resources/scripts/api/definitions/*"
|
||||
],
|
||||
"@feature/*": [
|
||||
"./resources/scripts/components/server/features/*"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "typescript-plugin-tw-template"
|
||||
}
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"./resources/scripts/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"/node_modules/"
|
||||
]
|
||||
}
|
@ -1,156 +0,0 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const AssetsManifestPlugin = require('webpack-assets-manifest');
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
module.exports = {
|
||||
cache: true,
|
||||
target: 'web',
|
||||
mode: process.env.NODE_ENV,
|
||||
devtool: isProduction ? false : (process.env.DEVTOOL || 'eval-source-map'),
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
entry: ['react-hot-loader/patch', './resources/scripts/index.tsx'],
|
||||
output: {
|
||||
path: path.join(__dirname, '/public/assets'),
|
||||
filename: isProduction ? 'bundle.[chunkhash:8].js' : 'bundle.[hash:8].js',
|
||||
chunkFilename: isProduction ? '[name].[chunkhash:8].js' : '[name].[hash:8].js',
|
||||
publicPath: (process.env.WEBPACK_PUBLIC_PATH || '/assets/'),
|
||||
crossOriginLoading: 'anonymous',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
exclude: /node_modules|\.spec\.tsx?$/,
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
{
|
||||
test: /\.mjs$/,
|
||||
include: /node_modules/,
|
||||
type: 'javascript/auto',
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
{ loader: 'style-loader' },
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: {
|
||||
auto: true,
|
||||
localIdentName: isProduction ? '[name]_[hash:base64:8]' : '[path][name]__[local]',
|
||||
localIdentContext: path.join(__dirname, 'resources/scripts/components'),
|
||||
},
|
||||
sourceMap: !isProduction,
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: { sourceMap: !isProduction },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(png|jp(e?)g|gif)$/,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: 'images/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
loader: 'svg-url-loader',
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
enforce: 'pre',
|
||||
loader: 'source-map-loader',
|
||||
}
|
||||
],
|
||||
},
|
||||
stats: {
|
||||
// Ignore warnings emitted by "source-map-loader" when trying to parse source maps from
|
||||
// JS plugins we use, namely brace editor.
|
||||
warningsFilter: [/Failed to parse source map/],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js', '.json'],
|
||||
alias: {
|
||||
'@': path.join(__dirname, '/resources/scripts'),
|
||||
'@definitions': path.join(__dirname, '/resources/scripts/api/definitions'),
|
||||
'@feature': path.join(__dirname, '/resources/scripts/components/server/features'),
|
||||
},
|
||||
symlinks: false,
|
||||
},
|
||||
externals: {
|
||||
// Mark moment as an external to exclude it from the Chart.js build since we don't need to use
|
||||
// it for anything.
|
||||
moment: 'moment',
|
||||
},
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development',
|
||||
DEBUG: process.env.NODE_ENV !== 'production',
|
||||
WEBPACK_BUILD_HASH: Date.now().toString(16),
|
||||
}),
|
||||
new AssetsManifestPlugin({ writeToDisk: true, publicPath: true, integrity: true, integrityHashes: ['sha384'] }),
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
typescript: {
|
||||
mode: 'write-references',
|
||||
diagnosticOptions: {
|
||||
semantic: true,
|
||||
syntactic: true,
|
||||
},
|
||||
},
|
||||
eslint: isProduction ? undefined : {
|
||||
files: `${path.join(__dirname, '/resources/scripts')}/**/*.{ts,tsx}`,
|
||||
}
|
||||
}),
|
||||
process.env.ANALYZE_BUNDLE ? new BundleAnalyzerPlugin({
|
||||
analyzerHost: '0.0.0.0',
|
||||
analyzerPort: 8081,
|
||||
}) : null
|
||||
].filter(p => p),
|
||||
optimization: {
|
||||
usedExports: true,
|
||||
sideEffects: false,
|
||||
runtimeChunk: false,
|
||||
removeEmptyChunks: true,
|
||||
minimize: isProduction,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
cache: isProduction,
|
||||
parallel: true,
|
||||
extractComments: false,
|
||||
terserOptions: {
|
||||
mangle: true,
|
||||
output: {
|
||||
comments: false,
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
watchOptions: {
|
||||
poll: 1000,
|
||||
ignored: /node_modules/,
|
||||
},
|
||||
devServer: {
|
||||
compress: true,
|
||||
contentBase: path.join(__dirname, '/public'),
|
||||
publicPath: process.env.WEBPACK_PUBLIC_PATH || '/assets/',
|
||||
allowedHosts: [
|
||||
'.panel.test',
|
||||
],
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
},
|
||||
},
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user