From 3a74156c95b4327f0dbbd72e02ee076fe980fde1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pysiak?= Date: Mon, 23 Sep 2024 07:53:28 +0200 Subject: [PATCH] Fix and cleanup js --- .eslintrc.js | 20 --------------- gulpfile.babel.js | 63 ----------------------------------------------- package.json | 32 +++++++++++------------- 3 files changed, 15 insertions(+), 100 deletions(-) delete mode 100644 .eslintrc.js delete mode 100644 gulpfile.babel.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index dfddb2546b..0000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - extends: 'airbnb-base', - env: { - node: true, - }, - rules: { - 'object-shorthand': ['error', 'always', { - avoidQuotes: true, - avoidExplicitReturnArrows: true, - }], - 'function-paren-newline': ['error', 'consistent'], - 'max-len': ['warn', 120, 2, { - ignoreUrls: true, - ignoreComments: false, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - }], - }, -}; diff --git a/gulpfile.babel.js b/gulpfile.babel.js deleted file mode 100644 index 6a3c4e4d3d..0000000000 --- a/gulpfile.babel.js +++ /dev/null @@ -1,63 +0,0 @@ -import chug from 'gulp-chug'; -import gulp from 'gulp'; -import yargs from 'yargs'; - -const { argv } = yargs - .options({ - rootPath: { - description: ' path to web assets directory', - type: 'string', - requiresArg: true, - required: false, - }, - nodeModulesPath: { - description: ' path to node_modules directory', - type: 'string', - requiresArg: true, - required: false, - }, - }); - -const config = [ - '--rootPath', - argv.rootPath || '../../../../../../../public/assets', - '--nodeModulesPath', - argv.nodeModulesPath || '../../../../../../../node_modules', -]; - -export const buildAdmin = function buildAdmin() { - return gulp.src('vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false }) - .pipe(chug({ args: config, tasks: 'build' })); -}; -buildAdmin.description = 'Build admin assets.'; - -export const watchAdmin = function watchAdmin() { - return gulp.src('vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false }) - .pipe(chug({ args: config, tasks: 'watch' })); -}; -watchAdmin.description = 'Watch admin asset sources and rebuild on changes.'; - -export const buildShop = function buildShop() { - return gulp.src('vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false }) - .pipe(chug({ args: config, tasks: 'build' })); -}; -buildShop.description = 'Build shop assets.'; - -export const watchShop = function watchShop() { - return gulp.src('vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false }) - .pipe(chug({ args: config, tasks: 'watch' })); -}; -watchShop.description = 'Watch shop asset sources and rebuild on changes.'; - -export const build = gulp.parallel(buildAdmin, buildShop); -build.description = 'Build assets.'; - -export const watch = gulp.series(watchAdmin, watchShop); -watch.description = 'Watch asset sources and rebuild on changes.'; - -gulp.task('admin', buildAdmin); -gulp.task('admin-watch', watchAdmin); -gulp.task('shop', buildShop); -gulp.task('shop-watch', watchShop); - -export default build; diff --git a/package.json b/package.json index f4482bd3df..5a7fae65ee 100644 --- a/package.json +++ b/package.json @@ -7,26 +7,24 @@ "watch": "encore dev --watch" }, "dependencies": { - "@hotwired/stimulus": "^3.0.0", - "@popperjs/core": "^2.11.8", - "@symfony/stimulus-bridge": "^3.2.0", - "@symfony/webpack-encore": "^3.1.0", - "@tabler/core": "^1.0.0-beta20", - "apexcharts": "^3.41.0", - "bootstrap": "^5.3.0", - "choices.js": "^10.2.0", - "infinite-tree": "^1.17.1", - "flag-icons": "^7.2.3", - "slugify": "^1.6", - "stimulus-use": "^0.52", - "@sylius-ui/frontend": "^1.0", - "@symfony/ux-autocomplete": "file:vendor/symfony/ux-autocomplete/assets", - "@symfony/ux-live-component": "file:vendor/symfony/ux-live-component/assets", "@sylius-ui/admin": "file:vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle", "@sylius-ui/shop": "file:vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle", - "tom-select": "^2.2.2" + "@symfony/ux-autocomplete": "file:vendor/symfony/ux-autocomplete/assets", + "@symfony/ux-live-component": "file:vendor/symfony/ux-live-component/assets", + "chart.js": "^3.7.1", + "flag-icons": "^7.2.3" }, "devDependencies": { - "@symfony/stimulus-bundle": "file:vendor/symfony/stimulus-bundle/assets" + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/polyfill": "^7.0.0", + "@babel/preset-env": "^7.18.10", + "@babel/register": "^7.0.0", + "@hotwired/stimulus": "^3.0.0", + "@symfony/stimulus-bridge": "^3.2.2", + "@symfony/webpack-encore": "^3.1.0", + "sass": "^1.54.8", + "sass-loader": "^13.0.0", + "tom-select": "^2.2.2" } }