Permalink
Browse files

First move towards rewrite

  • Loading branch information...
1 parent ef7f5d7 commit 3600d7ac7ee8e20e598750f46f5bf932a2da1c8b @mattgodbolt committed Aug 19, 2016
Showing with 739 additions and 10,913 deletions.
  1. +1 −0 .bowerrc
  2. +2 −1 .gitignore
  3. +1 −1 .idea/jsLibraryMappings.xml
  4. +19 −5 Makefile
  5. +3 −3 app.js
  6. +26 −0 bower.json
  7. +2 −1 package.json
  8. 0 {static → static-old}/compiler.js
  9. 0 {static → static-old}/ext/clipboard.min.js
  10. 0 {static → static-old}/ext/clippy.svg
  11. 0 {static → static-old}/ext/jquery-ui-1.11.4/external/jquery/jquery.js
  12. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  13. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_20_666666_40x40.png
  14. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_flat_10_000000_40x100.png
  15. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_glass_100_f6f6f6_1x400.png
  16. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_glass_100_fdf5ce_1x400.png
  17. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_glass_65_ffffff_1x400.png
  18. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  19. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  20. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  21. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-icons_222222_256x240.png
  22. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-icons_228ef1_256x240.png
  23. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-icons_ef8c08_256x240.png
  24. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-icons_ffd27a_256x240.png
  25. BIN {static → static-old}/ext/jquery-ui-1.11.4/images/ui-icons_ffffff_256x240.png
  26. 0 {static → static-old}/ext/jquery-ui-1.11.4/index.html
  27. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.css
  28. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.js
  29. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.min.css
  30. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.min.js
  31. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.structure.css
  32. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.structure.min.css
  33. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.theme.css
  34. 0 {static → static-old}/ext/jquery-ui-1.11.4/jquery-ui.theme.min.css
  35. 0 {static → static-old}/ext/lz-string/lz-string-1.3.3-min.js
  36. 0 {static → static-old}/ext/rison.js
  37. 0 {static → static-old}/gcc.css
  38. 0 {static → static-old}/gcc.js
  39. +363 −0 static-old/index.html
  40. 0 {static → static-old}/urlshorten-gist.js
  41. 0 {static → static-old}/urlshorten-google.js
  42. 0 {static → static-old}/urlshorten-none.js
  43. +1 −0 static/.gitignore
  44. +38 −0 static/analytics.js
  45. +63 −59 static/asm-mode.js
  46. +57 −0 static/editor.js
  47. +3 −0 static/explorer.css
  48. +0 −587 static/ext/bootstrap/css/bootstrap-theme.css
  49. +0 −1 static/ext/bootstrap/css/bootstrap-theme.css.map
  50. +0 −6 static/ext/bootstrap/css/bootstrap-theme.min.css
  51. +0 −1 static/ext/bootstrap/css/bootstrap-theme.min.css.map
  52. +0 −6,760 static/ext/bootstrap/css/bootstrap.css
  53. +0 −1 static/ext/bootstrap/css/bootstrap.css.map
  54. +0 −6 static/ext/bootstrap/css/bootstrap.min.css
  55. +0 −1 static/ext/bootstrap/css/bootstrap.min.css.map
  56. +0 −2,363 static/ext/bootstrap/js/bootstrap.js
  57. +0 −7 static/ext/bootstrap/js/bootstrap.min.js
  58. +0 −13 static/ext/bootstrap/js/npm.js
  59. +0 −340 static/ext/codemirror/codemirror.css
  60. +0 −21 static/ext/codemirror/codemirror.js
  61. +0 −210 static/ext/golden-layout/goldenlayout-base.css
  62. +0 −162 static/ext/golden-layout/goldenlayout-light-theme.css
  63. +0 −2 static/ext/golden-layout/goldenlayout.min.js
  64. +0 −4 static/ext/jquery/jquery-2.2.2.min.js
  65. +0 −1 static/ext/jquery/jquery-2.2.2.min.map
  66. +0 −6 static/ext/underscore-min.js
  67. +0 −1 static/ext/underscore-min.map
  68. +83 −350 static/index.html
  69. +52 −0 static/main.js
  70. +6 −0 static/options.js
  71. +19 −0 static/sharing.js
View
@@ -0,0 +1 @@
+{ "directory": "static/ext" }
View
@@ -1,4 +1,5 @@
*.swp
/node_modules
-.npm-updated
+/.npm-updated
+/.bower-updated
*.heapsnapshot
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
- <file url="file://$PROJECT_DIR$" libraries="{gcc-explorer/node_modules}" />
+ <includedPredefinedLibrary name="Node.js Core" />
</component>
</project>
View
@@ -1,16 +1,23 @@
+ifneq "" "$(NODE_DIR)"
+NPM:=$(NODE_DIR)/bin/npm
+NODE:=$(NODE_DIR)/bin/npm
+default: run
+else
ifeq "" "$(shell which npm)"
default:
@echo "Please install node.js"
@echo "Visit http://nodejs.org/ for more details"
@echo "On Ubuntu/Debian try: sudo apt-get install nodejs npm"
exit 1
else
+NPM:= $(shell which npm)
NODE:= $(shell which node || which nodejs)
default: run
endif
+endif
-.PHONY: clean run test run-amazon c-preload optional-d-support prereqs
-prereqs: optional-d-support node_modules c-preload
+.PHONY: clean run test run-amazon c-preload optional-d-support prereqs node_modules bower_modules
+prereqs: optional-d-support node_modules c-preload bower_modules
ifeq "" "$(shell which gdc)"
optional-d-support:
@@ -22,25 +29,32 @@ endif
NODE_MODULES=.npm-updated
$(NODE_MODULES): package.json
- npm install
+ $(NPM) install
+ @touch $@
+
+BOWER_MODULES=.bower-updated
+$(BOWER_MODULES): bower.json $(NODE_MODULES)
+ $(NODE) ./node_modules/bower/bin/bower install
@touch $@
LANG:=C++
node_modules: $(NODE_MODULES)
+bower_modules: $(BOWER_MODULES)
test:
(cd test; $(NODE) test.js)
$(MAKE) -C c-preload test
@echo Tests pass
clean:
- rm -rf node_modules .npm-updated
+ rm -rf bower_modules node_modules .npm-updated .bower-updated
$(MAKE) -C d clean
$(MAKE) -C c-preload clean
-run: node_modules optional-d-support c-preload
+run: prereqs
$(NODE) ./node_modules/.bin/supervisor -e 'js|node|properties' --exec $(NODE) -- ./app.js --language $(LANG)
c-preload:
$(MAKE) -C c-preload
+
View
@@ -147,9 +147,9 @@ function clientOptionsHandler(compilers, fileSources) {
supportsBinary: !!compilerProps("supportsBinary"),
sources: sources
};
- var text = "var OPTIONS = " + JSON.stringify(options) + ";";
+ var text = JSON.stringify(options);
return function getClientOptions(req, res) {
- res.set('Content-Type', 'application/javascript');
+ res.set('Content-Type', 'application/json');
res.set('Cache-Control', 'public, max-age=' + staticMaxAgeMs);
res.end(text);
};
@@ -421,7 +421,7 @@ findCompilers().then(function (compilers) {
.use(sStatic('static', {maxAge: staticMaxAgeMs}))
.use(bodyParser.json())
.use(restreamer())
- .get('/client-options.js', clientOptionsHandler(compilers, fileSources))
+ .get('/client-options.json', clientOptionsHandler(compilers, fileSources))
.use('/source', getSource)
.use('/api', apiHandler(compilers))
.use('/g', shortUrlHandler)
View
@@ -0,0 +1,26 @@
+{
+ "name": "gcc-explorer",
+ "description": "Interactively investigate compiler output",
+ "main": "./app.js",
+ "authors": [
+ "Matt Godbolt"
+ ],
+ "license": "BSD-2-Clause",
+ "homepage": "https://github.com/mattgodbolt/gcc-explorer",
+ "private": true,
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "codemirror": "CodeMirror#^5.17.0",
+ "requirejs": "^2.2.0",
+ "underscore": "^1.8.3",
+ "golden-layout": "^1.5.1",
+ "jquery": "^3.1.0",
+ "bootstrap": "^3.3.7"
+ }
+}
View
@@ -31,7 +31,8 @@
"temp": "0.8.x"
},
"devDependencies": {
- "supervisor": "0.3.1"
+ "supervisor": "0.3.1",
+ "bower": "*"
},
"scripts": {
"test": "make test"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit 3600d7a

Please sign in to comment.