Webpack, manifest, build progress

This commit is contained in:
2023-08-13 20:26:56 -05:00
parent 9ccc42c2cf
commit f88930c310
11 changed files with 3839 additions and 11 deletions
+1
View File
@@ -0,0 +1 @@
FIREFOX=firefoxdeveloperedition
Vendored
+1
View File
@@ -2,3 +2,4 @@
node_modules node_modules
.log* .log*
*.log *.log
dist
+2
View File
@@ -22,6 +22,8 @@ A WebExtension for extracting class schedule data into ICS files.
## Support ## Support
https://ssbprod.utsa.edu/StudentRegistrationSsb/ssb/searchResults/searchResults?txt_term=202410&startDatepicker=&endDatepicker=&uniqueSessionId=l5fyg1691785942875&pageOffset=0&pageMaxSize=20520395&sortColumn=subjectDescription&sortDirection=asc
This application targets UTSA's 'Banner Student Registration Self Service', v9.26.1. This application targets UTSA's 'Banner Student Registration Self Service', v9.26.1.
Until other class schedule systems are identified, this will be the only supported system & version. Until other class schedule systems are identified, this will be the only supported system & version.
+12 -3
View File
@@ -1,13 +1,14 @@
{ {
"name": "schedule-extract", "name": "schedule-extract",
"version": "0.0.2", "version": "0.0.2",
"main": "index.ts",
"license": "MIT", "license": "MIT",
"description": "Extract schedule information into ICS files from Student Registration system", "description": "Extract schedule information into ICS files from Student Registration system",
"author": "Xevion", "author": "ryan@walters.to",
"private": true, "private": true,
"scripts": { "scripts": {
"test": "ts-node-esm ./index.ts" "build": "webpack",
"firefox": "webpack --watch --config ./webpack.firefox.mjs --node-env=DEVELOPMENT && web-ext run -s ./dist/ --firefox-profile=web-ext-profile",
"test": "ts-node-esm src/old.ts"
}, },
"type": "module", "type": "module",
"compilerOptions": { "compilerOptions": {
@@ -22,6 +23,7 @@
"node-fetch": "^3.3.2", "node-fetch": "^3.3.2",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.88.2",
"zod": "^3.21.4" "zod": "^3.21.4"
}, },
"keywords": [ "keywords": [
@@ -45,5 +47,12 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/Xevion/schedule-extract.git" "url": "git+https://github.com/Xevion/schedule-extract.git"
},
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",
"ts-loader": "^9.4.4",
"web-ext-plugin": "^2.8.1",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
} }
} }
+1
View File
@@ -0,0 +1 @@
console.log("Hello world!")
+27
View File
@@ -0,0 +1,27 @@
{
"manifest_version": 2,
"name": "Class Schedule ICS",
"version": "X.Y.Z",
"description": "Adds a button to the UTSA class schedule to download an ICS file for the selected classes.",
"icons": {
"32": "svg/icon.svg",
"48": "svg/icon.svg",
"64": "svg/icon.svg",
"96": "svg/icon.svg"
},
"permissions": [
"https://ssbprod.utsa.edu/StudentRegistrationSsb/ssb/*"
],
"content_scripts": [
{
"matches": [
"https://ssbprod.utsa.edu/StudentRegistrationSsb/ssb/*"
],
"js": [
"main.js"
],
"css": [
]
}
]
}
View File
+6
View File
@@ -0,0 +1,6 @@
import {merge} from "webpack-merge";
import common from "./webpack.common.mjs";
export default merge(common, {
devtool: "inline-source-map",
});
+35
View File
@@ -0,0 +1,35 @@
import WebExtPlugin from 'web-ext-plugin';
import path from 'path';
import {fileURLToPath} from 'url';
import CopyPlugin from "copy-webpack-plugin";
import webpack from "webpack";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default {
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new CopyPlugin({
patterns: [
{from: "src/manifestFirefox.json", to: "manifest.json"},
],
}),
new WebExtPlugin({})],
module: {
rules: [
{
exclude: /node_modules/,
test: /\.tsx?$/,
use: "ts-loader",
},
],
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
// Add `@/...` as a valid path to import from
alias: {
"@/": path.resolve(__dirname, "src/"),
},
}
};
+6
View File
@@ -0,0 +1,6 @@
import {merge} from "webpack-merge";
import common from "./webpack.common.mjs";
export default merge(common, {
devtool: "inline-source-map",
});
+3747 -7
View File
File diff suppressed because it is too large Load Diff