mirror of
https://github.com/atom/atom.git
synced 2026-01-20 20:38:09 -05:00
Previously coffeestack was requiring a different version of coffeescript than atom was, which had a side effect of re-registering the extension handler for .coffee requires. This disabled coffee-cache, which made require really slow again.
30 lines
754 B
HTML
30 lines
754 B
HTML
<!DOCTYPE html>
|
|
<html style="background: #333">
|
|
<head>
|
|
<title></title>
|
|
|
|
<script>
|
|
window.onload = function() {
|
|
var currentWindow = require('remote').getCurrentWindow();
|
|
try {
|
|
require('coffee-script');
|
|
require('coffee-cache').setCacheDir('/tmp/atom-coffee-cache');
|
|
Object.defineProperty(require.extensions, '.coffee', {
|
|
writable: false,
|
|
value: require.extensions['.coffee']
|
|
});
|
|
require(currentWindow.loadSettings.bootstrapScript);
|
|
currentWindow.emit('window:loaded');
|
|
}
|
|
catch (error) {
|
|
currentWindow.show();
|
|
currentWindow.openDevTools();
|
|
console.error(error.stack || error);
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|