This repository was archived by the owner on Jun 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 "license" : " ISC" ,
2020 "devDependencies" : {
2121 "copy-webpack-plugin" : " ^8.0.0" ,
22+ "compression-webpack-plugin" : " ^6.0.0" ,
2223 "css-loader" : " ^5.0.0" ,
2324 "css-minimizer-webpack-plugin" : " ^3.0.0" ,
2425 "eslint" : " ^7.0.0" ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export default class LiveCode extends ActiveCode {
2929 }
3030 this . createErrorOutput ( ) ;
3131 }
32- outputfun ( a ) { }
32+ outputfun ( a ) { }
3333 createInputElement ( ) {
3434 var label = document . createElement ( "label" ) ;
3535 label . for = this . divid + "_stdin" ;
@@ -43,12 +43,20 @@ export default class LiveCode extends ActiveCode {
4343 this . outerDiv . appendChild ( input ) ;
4444 this . stdin_el = input ;
4545 }
46- createErrorOutput ( ) { }
46+ createErrorOutput ( ) { }
4747
4848 /* Main runProg method for livecode
4949 *
5050 */
51- async runProg ( ) {
51+ async runProg ( noUI , logResults ) {
52+ if ( typeof logResults === "undefined" ) {
53+ this . logResults = true ;
54+ } else {
55+ this . logResults = logResults ;
56+ }
57+ if ( typeof noUI !== "boolean" ) {
58+ noUI = false ;
59+ }
5260 await this . runSetup ( ) ;
5361 try {
5462 let res = await this . submitToJobe ( ) ;
@@ -197,9 +205,9 @@ export default class LiveCode extends ActiveCode {
197205 public static void main(String[] args) {
198206 CodeTestHelper.resetFinalResults();
199207 Result result = JUnitCore.runClasses(${ testdrivername . replace (
200- ".java" ,
201- ".class"
202- ) } );
208+ ".java" ,
209+ ".class"
210+ ) } );
203211 System.out.println(CodeTestHelper.getFinalResults());
204212
205213 int total = result.getRunCount();
Original file line number Diff line number Diff line change @@ -193,7 +193,10 @@ async function handlePageSetup() {
193193 }
194194 $ ( document ) . trigger ( "runestone:login" ) ;
195195 addReadingList ( ) ;
196- timedRefresh ( ) ;
196+ // Avoid the timedRefresh on the grading page.
197+ if ( window . location . pathname . indexOf ( "/admin/grading" ) == - 1 ) {
198+ timedRefresh ( ) ;
199+ }
197200 } else {
198201 mess = "Not logged in" ;
199202 $ ( document ) . trigger ( "runestone:logout" ) ;
Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ export default class RunestoneBase {
140140 }
141141 return post_return ;
142142 }
143-
144143 // .. _logRunEvent:
145144 //
146145 // logRunEvent
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const path = require("path");
1010
1111const CssMinimizerPlugin = require ( 'css-minimizer-webpack-plugin' ) ;
1212const CopyPlugin = require ( 'copy-webpack-plugin' ) ;
13+ const CompressionPlugin = require ( "compression-webpack-plugin" ) ;
1314const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
1415const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
1516
@@ -90,6 +91,8 @@ module.exports = (env, argv) => {
9091 filename : '[name].css?v=[contenthash]' ,
9192 chunkFilename : '[id].css' ,
9293 } ) ,
94+ // Copied from the `webpack docs <https://webpack.js.org/plugins/compression-webpack-plugin>`_. This creates ``.gz`` versions of all files. The webserver in use needs to be configured to send this instead of the uncompressed versions.
95+ new CompressionPlugin ( ) ,
9396 ] ,
9497 } ;
9598} ;
You can’t perform that action at this time.
0 commit comments