Browse Source

Revert "Go back to using the bower package (thanks @michal-golfi)"

This reverts commit 4078fadc35.
dev/git-series/gccdum
Matt Godbolt 6 years ago
parent
commit
df111e25f4
  1. 3
      Makefile
  2. 3
      bower.json
  3. 1
      package.json
  4. 21
      static/main.js

3
Makefile

@ -49,6 +49,9 @@ $(BOWER_MODULES): bower.json $(NODE_MODULES)
if ! test -f "${BOWER_MODULES}"; then rm -rf static/ext; fi
$(NODE) ./node_modules/bower/bin/bower install
@touch $@
# Workaround for lack of versioned monaco-editor in bower
rm -rf static/ext/monaco-editor
cp -r node_modules/monaco-editor static/ext/
lint: $(NODE_MODULES)
$(NODE) ./node_modules/.bin/jshint app.js $(shell find lib static -name '*.js' -not -path 'static/ext/*' -not -path static/analytics.js)

3
bower.json

@ -27,7 +27,6 @@
"clipboard": "^1.5.12",
"raven-js": "^3.7.0",
"es6-promise": "^4.0.5",
"lru-cache": "2.7.3",
"monaco-editor": "0.7.x"
"lru-cache": "2.7.3"
}
}

1
package.json

@ -23,6 +23,7 @@
"fs-extra": "0.26.x",
"http-proxy": "1.12.x",
"lru-cache": "2.7.x",
"monaco-editor": "0.7.x",
"morgan": "1.6.x",
"promise": "7.0.x",
"promise-queue": "2.1.x",

21
static/main.js

@ -38,7 +38,7 @@ require.config({
'raven-js': 'ext/raven-js/dist/raven',
'es6-promise': 'ext/es6-promise/es6-promise',
'lru-cache': 'ext/lru-cache/lib/lru-cache',
'vs': "ext/monaco-editor/release/min/vs"
'vs': "ext/monaco-editor/min/vs"
},
shim: {
underscore: {exports: '_'},
@ -60,7 +60,6 @@ define(function (require) {
var clipboard = require('clipboard');
var Hub = require('hub');
var Raven = require('raven-js');
var Alert = require('alert');
function start() {
analytics.initialise();
@ -68,7 +67,6 @@ define(function (require) {
var options = require('options');
$('.language-name').text(options.language);
var alert = new Alert();
var safeLang = options.language.toLowerCase().replace(/[^a-z_]+/g, '');
var defaultSrc = $('.template .lang.' + safeLang).text().trim();
@ -85,17 +83,7 @@ define(function (require) {
var config;
if (!options.embedded) {
var serializedState = window.location.hash.substr(1);
if (serializedState) {
try {
config = url.deserialiseState(serializedState);
} catch (exception) {
alert.alert("Unable to parse URL",
"<div>Compiler Explorer was unable to parse the URL hash. " +
"Please check it and try again.</div>" +
"<div class='url-parse-info'>" + exception + "</div>");
}
}
config = url.deserialiseState(window.location.hash.substr(1));
if (config) {
// replace anything in the default config with that from the hash
config = _.extend(defaultConfig, config);
@ -164,11 +152,6 @@ define(function (require) {
window.localStorage.removeItem('gl');
window.location.reload();
});
$('#thanks-to').click(function () {
$.get('thanks.html', function (result) {
alert.alert("Special thanks to", $(result));
});
});
}
$(start);

Loading…
Cancel
Save