mirror of
https://github.com/Xevion/schedule-extract.git
synced 2025-12-06 01:16:15 -06:00
Webpack, manifest, build progress
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
.log*
|
.log*
|
||||||
*.log
|
*.log
|
||||||
|
dist
|
||||||
@@ -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.
|
||||||
|
|||||||
15
package.json
15
package.json
@@ -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
src/index.ts
Normal file
1
src/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
console.log("Hello world!")
|
||||||
27
src/manifestFirefox.json
Normal file
27
src/manifestFirefox.json
Normal 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": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
6
webpack.chrome.mjs
Normal file
6
webpack.chrome.mjs
Normal 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
webpack.common.mjs
Normal file
35
webpack.common.mjs
Normal 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
webpack.firefox.mjs
Normal file
6
webpack.firefox.mjs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import {merge} from "webpack-merge";
|
||||||
|
import common from "./webpack.common.mjs";
|
||||||
|
|
||||||
|
export default merge(common, {
|
||||||
|
devtool: "inline-source-map",
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user