mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
remove now unused old vue2 tooling
This commit is contained in:
@@ -245,7 +245,6 @@ STORAGES = {
|
|||||||
|
|
||||||
COMPRESS_PRECOMPILERS = (
|
COMPRESS_PRECOMPILERS = (
|
||||||
('text/x-scss', 'django_libsass.SassCompiler'),
|
('text/x-scss', 'django_libsass.SassCompiler'),
|
||||||
('text/vue', 'pretix.helpers.compressor.VueCompiler'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
COMPRESS_OFFLINE_CONTEXT = {
|
COMPRESS_OFFLINE_CONTEXT = {
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
#
|
|
||||||
# This file is part of pretix (Community Edition).
|
|
||||||
#
|
|
||||||
# Copyright (C) 2014-2020 Raphael Michel and contributors
|
|
||||||
# Copyright (C) 2020-today pretix GmbH and contributors
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
|
|
||||||
# Public License as published by the Free Software Foundation in version 3 of the License.
|
|
||||||
#
|
|
||||||
# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are
|
|
||||||
# applicable granting you additional permissions and placing additional restrictions on your usage of this software.
|
|
||||||
# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive
|
|
||||||
# this file, see <https://pretix.eu/about/en/license>.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
||||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
||||||
# details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
|
|
||||||
# <https://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import shlex
|
|
||||||
|
|
||||||
from compressor.exceptions import FilterError
|
|
||||||
from compressor.filters import CompilerFilter
|
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
|
|
||||||
class VueCompiler(CompilerFilter):
|
|
||||||
# Based on work (c) Laura Klünder in https://github.com/codingcatgirl/django-vue-rollup
|
|
||||||
# Released under Apache License 2.0
|
|
||||||
|
|
||||||
def __init__(self, content, attrs, **kwargs):
|
|
||||||
config_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'static', 'npm_dir')
|
|
||||||
node_path = os.path.join(settings.STATIC_ROOT, 'node_prefix', 'node_modules')
|
|
||||||
self.rollup_bin = os.path.join(node_path, 'rollup', 'dist', 'bin', 'rollup')
|
|
||||||
rollup_config = os.path.join(config_dir, 'rollup.config.js')
|
|
||||||
if not os.path.exists(self.rollup_bin) and not settings.DEBUG:
|
|
||||||
raise FilterError("Rollup not installed or pretix not built properly, please run 'make npminstall' in source root.")
|
|
||||||
command = (
|
|
||||||
' '.join((
|
|
||||||
'NODE_PATH=' + shlex.quote(node_path),
|
|
||||||
shlex.quote(self.rollup_bin),
|
|
||||||
'-c',
|
|
||||||
shlex.quote(rollup_config))
|
|
||||||
) +
|
|
||||||
' --input {infile} -n {export_name} --file {outfile}'
|
|
||||||
)
|
|
||||||
super().__init__(content, command=command, **kwargs)
|
|
||||||
|
|
||||||
def input(self, **kwargs):
|
|
||||||
if self.filename is None:
|
|
||||||
raise FilterError('VueCompiler can only compile files, not inline code.')
|
|
||||||
if not os.path.exists(self.rollup_bin):
|
|
||||||
raise FilterError("Rollup not installed, please run 'make npminstall' in source root.")
|
|
||||||
self.options += (('export_name', re.sub(
|
|
||||||
r'^([a-z])|[^a-z0-9A-Z]+([a-zA-Z0-9])?',
|
|
||||||
lambda s: s.group(0)[-1].upper(),
|
|
||||||
os.path.basename(self.filename).split('.')[0]
|
|
||||||
)),)
|
|
||||||
return super().input(**kwargs)
|
|
||||||
6405
src/pretix/static/npm_dir/package-lock.json
generated
6405
src/pretix/static/npm_dir/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "pretix",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {},
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/core": "^7.28.5",
|
|
||||||
"@babel/preset-env": "^7.29.0",
|
|
||||||
"@rollup/plugin-babel": "^6.1.0",
|
|
||||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
||||||
"vue": "^2.7.16",
|
|
||||||
"rollup": "^2.79.1",
|
|
||||||
"rollup-plugin-vue": "^5.0.1",
|
|
||||||
"vue-template-compiler": "^2.7.16"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import vue from 'rollup-plugin-vue'
|
|
||||||
import { getBabelOutputPlugin } from '@rollup/plugin-babel'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
output: {
|
|
||||||
format: 'iife',
|
|
||||||
exports: 'named',
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
getBabelOutputPlugin({
|
|
||||||
presets: ['@babel/preset-env'],
|
|
||||||
// Running babel on iife output is apparently discouraged since it can lead to global
|
|
||||||
// variable leaks. Since we didn't get it to work on inputs, let's take that risk.
|
|
||||||
// (In our tests, it did not leak anything.)
|
|
||||||
allowAllFormats: true
|
|
||||||
}),
|
|
||||||
vue({
|
|
||||||
css: true,
|
|
||||||
compileTemplate: true,
|
|
||||||
needMap: false,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user