Skip to content

Commit

Permalink
Merge branch 'FrankerFaceZ:master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ae9is authored Nov 5, 2023
2 parents 96be2df + d2e536a commit aed50ce
Show file tree
Hide file tree
Showing 70 changed files with 4,570 additions and 4,751 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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ dist/
.idea/

# Ignoring node modules
node_modules/
node_modules/

# Ignoring VS Code settings
.vscode/
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ other assets.
2. Copy the `src/example` directory, making a new directory within `src` with
the name of your add-on.
3. Edit your new `manifest.json` with details about your add-on.
3. Make sure you have node.js and pnpm set up and working.
4. Run `pnpm install` within the repository to install dependencies.
5. Run `pnpm start` to start the development server.
6. In the FrankerFaceZ Control Center, under Add-ons, make sure to enable the
4. Make sure you have node.js and pnpm set up and working.
5. Run `pnpm install` within the repository to install dependencies.
6. Run `pnpm start` to start the development server.
7. In the FrankerFaceZ Control Center, under Add-ons, make sure to enable the
setting `Use Local Development Server`.
7. Ensure that your browser will accept the self-signed certificate issued by
8. Ensure that your browser will accept the self-signed certificate issued by
the development server. You can visit https://localhost:8001/ with the
development server running to see if it works.
8. Develop your add-on.
9. Develop your add-on.
> **Note:** Changes made to your add-on's manifest will require that you
> restart the development server to take effect.
9. When you're ready, set `enabled` to `true` in your add-on's manifest, then
10. When you're ready, set `enabled` to `true` in your add-on's manifest, then
submit a pull request to bring your code into this repository's master branch.
10. Once your code is accepted, the new add-on will automatically be built,
11. Once your code is accepted, the new add-on will automatically be built,
uploaded, and made available for end-users.

## Documentation
Expand Down
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
2 changes: 1 addition & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"es6",
"es2017"
],
"target": "es2017",
"target": "esnext",
"module": "es6"
}
}
62 changes: 26 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,39 @@
"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 NODE_ENV=development webpack serve",
"start:prod": "cross-env NODE_ENV=production webpack serve",
"build": "cross-env NODE_ENV=production webpack build && node bin/addon_hash",
"build:dev": "cross-env NODE_ENV=development webpack 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",
"copy-webpack-plugin": "^11.0.0",
"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",
"esbuild-loader": "^4.0.2",
"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",
"minify-graphql-loader": "^1.0.2",
"rimraf": "^5.0.1",
"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",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-manifest-plugin": "^5.0.0"
},
"dependencies": {
"@wizulus/code": "^1.0.2",
Expand Down
Loading

0 comments on commit aed50ce

Please sign in to comment.