Skip to content

Commit

Permalink
Maintenance: Update the tooling for the add-ons repository to use rsp…
Browse files Browse the repository at this point in the history
…ack.
  • Loading branch information
SirStendec authored Aug 27, 2023
2 parents d5b132f + ddb0f5b commit be4e5ab
Show file tree
Hide file tree
Showing 10 changed files with 2,944 additions and 3,996 deletions.
6 changes: 6 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Browsers that we support

last 5 Chrome versions
last 5 Firefox versions
last 2 Safari versions
last 5 Edge versions
7 changes: 3 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* globals module */
module.exports = {
'env': {
'browser': true,
'es6': true
'browser': true
},
'extends': [
'eslint:recommended',
Expand All @@ -13,8 +12,8 @@ module.exports = {
'react'
],
'parserOptions': {
'parser': 'babel-eslint',
'ecmaVersion': 8,
//'parser': 'babel-eslint',
'ecmaVersion': 'latest',
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ jobs:

- name: Build
run: pnpm build

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist
11 changes: 9 additions & 2 deletions bin/update_times.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
'use strict';

const fs = require('fs');
const jsonfile = require('jsonfile');
//const jsonfile = require('jsonfile');
const sgf = require('staged-git-files');
const child = require('child_process');


function readJSON(file) {
try {
return JSON.parse(fs.readFileSync(file));
} catch(err) { /* no-op */ }
}


async function main() {
const staged = await sgf(),
modified = new Set;
Expand All @@ -27,7 +34,7 @@ async function main() {

for(const addon of modified) {
const manifest = `src/${addon}/manifest.json`,
json = jsonfile.readFileSync(manifest, {throws: false});
json = readJSON(manifest);

if ( ! json || ! json.enabled ) {
console.debug('Skipping add-on:', addon);
Expand Down
58 changes: 22 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,35 @@
"description": "Addons for FrankerFaceZ",
"private": true,
"scripts": {
"start": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --config webpack.web.dev.js",
"start:prod": "webpack-dev-server --config webpack.web.dev.prod.js",
"build": "webpack && node bin/addon_hash",
"build:legacy": "cross-env NODE_OPTIONS=--openssl-legacy-provider pnpm build",
"start": "cross-env SERVING=true rspack serve",
"start:prod": "cross-env SERVING=true NODE_ENV=production rspack serve",
"build": "rspack build && node bin/addon_hash",
"clean": "rimraf dist",
"eslint": "eslint \"src/**/*.{js,jsx,vue}\"",
"update-times": "node bin/update_times",
"prepare": "husky install"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.0",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-react-jsx": "^7.16.0",
"babel-loader": "^8.2.3",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.1.2",
"@rspack/cli": "^0.3.0",
"@rspack/plugin-minify": "^0.3.0",
"browserslist": "^4.21.10",
"cross-env": "^7.0.3",
"css-loader": "^2.1.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-react": "^7.25.1",
"eslint-plugin-vue": "^6.2.2",
"extract-loader": "^3.2.0",
"file-loader": "^3.0.1",
"husky": "^5.2.0",
"jsonfile": "^6.1.0",
"rimraf": "^3.0.2",
"sass": "^1.43.4",
"sass-loader": "^7.3.1",
"staged-git-files": "^1.2.0",
"string-replace-webpack-plugin": "^0.1.3",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46.0",
"webpack-cli": "4",
"webpack-dev-server": "4",
"webpack-manifest-plugin": "4",
"webpack-merge": "^4.2.2"
"css-loader": "^6.8.1",
"eslint": "^8.48.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-vue": "^9.17.0",
"extract-loader": "^5.1.0",
"file-loader": "^6.2.0",
"husky": "^8.0.3",
"rimraf": "^5.0.1",
"rspack-manifest-plugin": "5.0.0-alpha0",
"sass": "^1.66.1",
"sass-loader": "^13.3.2",
"staged-git-files": "^1.3.0",
"string-replace-loader": "^3.1.0",
"vue-loader": "^15.10.2",
"vue-template-compiler": "^2.7.14"
},
"dependencies": {
"@wizulus/code": "^1.0.2",
Expand Down
Loading

0 comments on commit be4e5ab

Please sign in to comment.