File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8484
8585<!-- insert google-analytics.txt contents here -->
8686
87- </ script >
88-
8987</ head >
9088
9189< body >
Original file line number Diff line number Diff line change 1+ ---
2+ Online Python Tutor v5 "unity" -- the goal for this version is to
3+ significantly clean up, modernize, and modularize the OPT codebase to
4+ ease future development.
5+
6+ I started porting v3/ over to v5-unity/ on 2016-06-12 since the headache
7+ of manually maintaining so many JS/CSS files and intricate dependencies
8+ was starting to get out of hand ... i've waited for years to port to a
9+ more sustainable and modern development setup ...
10+
11+
12+ Requires these global installations:
13+ - Node.js / npm
14+ - webpack: http://webpack.github.io/ and webpack-dev-server
15+ npm install webpack -g
16+ npm install webpack-dev-server -g
17+
18+ If you run:
19+ webpack-dev-server --progress --colors
20+
21+ then your code will automatically recompile and be refreshed here:
22+ http://localhost:8080/webpack-dev-server/
23+
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " v5-unity" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " OPT v5" ,
5+ "main" : " bundle.js" ,
6+ "repository" : " https://github.com/pgbovine/OnlinePythonTutor" ,
7+ "license" : " BSD-3-Clause" ,
8+
9+ "scripts" : {
10+ "start" : " webpack-dev-server --hot --inline" ,
11+ "webpack" : " webpack --progress --colors --watch"
12+ },
13+
14+ "dependencies" : {
15+ "css-loader" : " " ,
16+ "style-loader" : " " ,
17+ "file-loader" : " "
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ entry : "./js/opt-frontend.js" ,
3+
4+ // some included libraries reference 'jquery', so point to it:
5+ resolve : {
6+ alias : {
7+ "jquery" : __dirname + "/js/jquery-1.8.2.min.js" ,
8+ "$" : __dirname + "/js/jquery-1.8.2.min.js" ,
9+ "$.bbq" : __dirname + "/js/jquery.ba-bbq.min.js" ,
10+ }
11+ } ,
12+
13+ output : {
14+ path : __dirname + "/webpack-output/" ,
15+ // TODO: use 'bundle.[hash].js' for fingerprint hashing
16+ // to create unique filenames for releases:
17+ // https://webpack.github.io/docs/long-term-caching.html
18+ filename : "bundle.js" ,
19+ sourceMapFilename : "[file].map" ,
20+ } ,
21+
22+ module : {
23+ loaders : [
24+ { test : / \. c s s $ / , loader : "style!css" } ,
25+ { test : / \. ( p n g | j p g ) $ / , loader : 'file-loader' }
26+ ]
27+ } ,
28+
29+ devtool : 'source-map' , // VERY important to have source maps for debugging
30+ } ;
You can’t perform that action at this time.
0 commit comments