From d0a363234500b4a8ecfc3f8f63225d384fb029a0 Mon Sep 17 00:00:00 2001 From: Thog Date: Mon, 23 Mar 2020 16:55:46 +0100 Subject: [PATCH] Fix support for Edge (Use Babel) --- .github/workflows/deployment.yml | 8 +----- babel.config.json | 45 ++++++++++++++++++++++++++++++++ package.json | 25 ++++++++++++------ 3 files changed, 63 insertions(+), 15 deletions(-) create mode 100644 babel.config.json diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 8d7dc04..2c3b66b 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -20,14 +20,8 @@ jobs: - name: "Install NPM dependencies" run: npm install - - name: "Install CLI tools" - run: "npm install --global @gridsome/cli purgecss" - - name: "Build" - run: npm run build - - - name: "PurgeCSS pass" - run: purgecss --config purgecss.config.js --output dist/assets/css/ + run: npm run deploy - name: "Deploy" uses: peaceiris/actions-gh-pages@v3 diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000..6418b90 --- /dev/null +++ b/babel.config.json @@ -0,0 +1,45 @@ +{ + "comments": false, + "presets": [ + ["minify", { + "booleans": false, + "consecutiveAdds": false, + "deadcode": false, + "flipComparisons": false, + "guards": false, + "infinity": false, + "memberExpressions": false, + "mergeVars": false, + "numericLiterals": false, + "regexpConstructors": false, + "removeConsole": false, + "removeDebugger": false, + "removeUndefined": false, + "builtIns": false, + "evaluate": false, + "replace": false, + "simplify": false, + "simplifyComparisons": false, + "undefinedToVoid": false, + "typeConstructors": false, + "mangle": false, + "propertyLiterals": false + }], + [ + "@babel/env", + { + "targets": { + "edge": "17", + "firefox": "60", + "chrome": "67", + "safari": "11.1", + "ie": "11" + }, + "modules": false, + "useBuiltIns": "entry", + "corejs": "3", + "forceAllTransforms": true + } + ] + ] +} \ No newline at end of file diff --git a/package.json b/package.json index f43dcf2..42705a2 100644 --- a/package.json +++ b/package.json @@ -4,23 +4,32 @@ "description": "Ryujinx Website", "private": true, "scripts": { - "build": "gridsome build", - "develop": "gridsome develop", - "explore": "gridsome explore" + "build": "npx gridsome build", + "develop": "npx gridsome develop", + "explore": "npx gridsome explore", + "deploy": "npm run build && npx purgecss --config purgecss.config.js --output dist/assets/css/ && npx babel -d dist dist" }, "dependencies": { - "gridsome": "^0.7.0", - "vuetify": "^2.0.0" + "@babel/polyfill": "^7.8.7", + "core-js": "^3.6.4", + "gridsome": "^0.7.13", + "vuetify": "^2.2.18" }, "devDependencies": { + "@babel/cli": "^7.8.4", + "@babel/core": "^7.9.0", + "@babel/preset-env": "^7.9.0", + "@gridsome/cli": "^0.3.1", "@gridsome/plugin-sitemap": "^0.2.3", + "babel-preset-minify": "^0.5.1", "deepmerge": "^4.2.2", "eslint": "^6.8.0", - "eslint-plugin-vue": "^6.1.2", - "eslint-plugin-vuetify": "^1.0.0-beta.5", + "eslint-plugin-vue": "^6.2.2", + "eslint-plugin-vuetify": "^1.0.0-beta.6", "fibers": "^4.0.2", "gridsome-plugin-robots-txt": "^1.0.2", - "sass": "^1.25.0", + "purgecss": "^2.1.0", + "sass": "^1.26.3", "sass-loader": "7.3.1", "vuetify-loader": "^1.4.3", "webpack-node-externals": "^1.7.2"