fix packaging and re-add packaged demo
This commit is contained in:
parent
32d7246abd
commit
8e85ac83ab
4 changed files with 227 additions and 6 deletions
|
|
@ -3,4 +3,4 @@ ACE (Ajax.org Code Editor)
|
||||||
|
|
||||||
ACE is a standalone code editor written in JavaScript. It can be easily embedded in any web page and JavaScript application. It is currently used as the editor component of the [Cloud9 IDE](http://cloud9ide.com).
|
ACE is a standalone code editor written in JavaScript. It can be easily embedded in any web page and JavaScript application. It is currently used as the editor component of the [Cloud9 IDE](http://cloud9ide.com).
|
||||||
|
|
||||||
Checkout the [demo](http://ajaxorg.github.com/ace/editor.html)!
|
Checkout the [demo](http://ajaxorg.github.com/ace/editor-build.html)!
|
||||||
|
|
|
||||||
21
build.js
21
build.js
|
|
@ -1,7 +1,14 @@
|
||||||
{
|
{
|
||||||
baseUrl: "./lib",
|
baseUrl: "lib",
|
||||||
dir: "build",
|
dir: "build",
|
||||||
|
|
||||||
|
paths: {
|
||||||
|
"ace": "ace",
|
||||||
|
"demo": "../demo",
|
||||||
|
"cockpit": "../support/cockpit/lib/cockpit",
|
||||||
|
"pilot": "../support/cockpit/support/pilot/lib/pilot"
|
||||||
|
},
|
||||||
|
|
||||||
//- "closure": uses Google's Closure Compiler in simple optimization
|
//- "closure": uses Google's Closure Compiler in simple optimization
|
||||||
//mode to minify the code.
|
//mode to minify the code.
|
||||||
//- "closure.keepLines": Same as closure option, but keeps line returns
|
//- "closure.keepLines": Same as closure option, but keeps line returns
|
||||||
|
|
@ -23,6 +30,13 @@
|
||||||
skipModuleInsertion: false,
|
skipModuleInsertion: false,
|
||||||
|
|
||||||
modules: [
|
modules: [
|
||||||
|
{
|
||||||
|
name: "demo/startup",
|
||||||
|
includeRequire: false,
|
||||||
|
include: [
|
||||||
|
"pilot/fixoldbrowsers"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "ace/editor",
|
name: "ace/editor",
|
||||||
include: [
|
include: [
|
||||||
|
|
@ -35,7 +49,6 @@
|
||||||
],
|
],
|
||||||
includeRequire: false
|
includeRequire: false
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "ace/theme/eclipse",
|
name: "ace/theme/eclipse",
|
||||||
exclude: [
|
exclude: [
|
||||||
|
|
@ -77,8 +90,8 @@
|
||||||
{
|
{
|
||||||
name: "ace/mode/python",
|
name: "ace/mode/python",
|
||||||
exclude: [
|
exclude: [
|
||||||
"ace/lib/oop",
|
"pilot/oop",
|
||||||
"ace/lib/lang",
|
"pilot/lang",
|
||||||
"ace/tokenizer",
|
"ace/tokenizer",
|
||||||
"ace/range",
|
"ace/range",
|
||||||
"ace/mode/text"
|
"ace/mode/text"
|
||||||
|
|
|
||||||
208
editor-build.html
Normal file
208
editor-build.html
Normal file
|
|
@ -0,0 +1,208 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||||
|
"http://www.w3.org/TR/html4/strict.dtd">
|
||||||
|
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<title>Editor</title>
|
||||||
|
<meta name="author" content="Fabian Jakobs">
|
||||||
|
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
|
||||||
|
html {
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
background: rgb(14, 98, 165);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#editor {
|
||||||
|
top: 55px;
|
||||||
|
left: 0px;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#controls {
|
||||||
|
width: 100%;
|
||||||
|
height: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#jump {
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border: 1px solid red;
|
||||||
|
z-index: 10000;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cockpitInput {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
border: none; outline: none;
|
||||||
|
font-family: consolas, courier, monospace;
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cockpitOutput {
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 15px;
|
||||||
|
border: 1px solid #AAA;
|
||||||
|
-moz-border-radius-topleft: 10px;
|
||||||
|
-moz-border-radius-topright: 10px;
|
||||||
|
border-top-left-radius: 4px; border-top-right-radius: 4px;
|
||||||
|
background: #DDD; color: #000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="jump"></div>
|
||||||
|
|
||||||
|
<table id="controls">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="doc">Document:</label>
|
||||||
|
<select id="doc" size="1">
|
||||||
|
<option value="js">JS Document</option>
|
||||||
|
<option value="html">HTML Document</option>
|
||||||
|
<option value="css">CSS Document</option>
|
||||||
|
<option value="python">Python Document</option>
|
||||||
|
<option value="php">PHP Document</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label for="mode">Mode:</label>
|
||||||
|
<select id="mode" size="1">
|
||||||
|
<option value="text">Plain Text</option>
|
||||||
|
<option value="javascript">JavaScript</option>
|
||||||
|
<option value="xml">XML</option>
|
||||||
|
<option value="html">HTML</option>
|
||||||
|
<option value="css">CSS</option>
|
||||||
|
<option value="python">Python</option>
|
||||||
|
<option value="php">PHP</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label for="theme">Theme:</label>
|
||||||
|
<select id="theme" size="1">
|
||||||
|
<option value="ace/theme/textmate">TextMate</option>
|
||||||
|
<option value="ace/theme/eclipse">Eclipse</option>
|
||||||
|
<option value="ace/theme/dawn">Dawn</option>
|
||||||
|
<option value="ace/theme/idle_fingers">idleFingers</option>
|
||||||
|
<option value="ace/theme/pastel_on_dark">Pastel on dark</option>
|
||||||
|
<option value="ace/theme/twilight">Twilight</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label for="select_style">Full line selections</label>
|
||||||
|
<input type="checkbox" name="select_style" id="select_style" checked>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label for="highlight_active">Highlight active line</label>
|
||||||
|
<input type="checkbox" name="highlight_active" id="highlight_active" checked>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label for="show_hidden">Show invisibles</label>
|
||||||
|
<input type="checkbox" name="show_hidden" id="show_hidden">
|
||||||
|
</td>
|
||||||
|
<td align="right">
|
||||||
|
<img src="demo/logo.png">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="editor">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/editor" id="jstext">function foo(items) {
|
||||||
|
for (var i=0; i<items.length; i++) {
|
||||||
|
alert(items[i] + "juhu");
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
|
||||||
|
<script type="text/editor" id="csstext">.text-layer {
|
||||||
|
font-family: Monaco, "Courier New", monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: text;
|
||||||
|
}</script>
|
||||||
|
|
||||||
|
<script type="text/editor" id="htmltext"><html>
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.text-layer {
|
||||||
|
font-family: Monaco, "Courier New", monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 style="color:red">Juhu Kinners</h1>
|
||||||
|
</body>
|
||||||
|
</html></script>
|
||||||
|
|
||||||
|
<script type="text/editor" id="pythontext">#!/usr/local/bin/python
|
||||||
|
|
||||||
|
import string, sys
|
||||||
|
|
||||||
|
# If no arguments were given, print a helpful message
|
||||||
|
if len(sys.argv)==1:
|
||||||
|
print 'Usage: celsius temp1 temp2 ...'
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
# Loop over the arguments
|
||||||
|
for i in sys.argv[1:]:
|
||||||
|
try:
|
||||||
|
fahrenheit=float(string.atoi(i))
|
||||||
|
except string.atoi_error:
|
||||||
|
print repr(i), "not a numeric value"
|
||||||
|
else:
|
||||||
|
celsius=(fahrenheit-32)*5.0/9.0
|
||||||
|
print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5))
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/editor" id="phptext"><?php
|
||||||
|
|
||||||
|
function nfact($n) {
|
||||||
|
if ($n == 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return $n * nfact($n - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "\n\nPlease enter a whole number ... ";
|
||||||
|
$num = trim(fgets(STDIN));
|
||||||
|
|
||||||
|
// ===== PROCESS - Determing the factorial of the input number =====
|
||||||
|
$output = "\n\nFactorial " . $num . " = " . nfact($num) . "\n\n";
|
||||||
|
echo $output;
|
||||||
|
|
||||||
|
?></script>
|
||||||
|
|
||||||
|
<input id="cockpitInput" type="text"/>
|
||||||
|
|
||||||
|
<script src="demo/require.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="build/demo/startup.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="build/demo/boot.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
require("demo/boot", function() {})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
<br/>
|
<br/>
|
||||||
<br/> </p>
|
<br/> </p>
|
||||||
<h2>Demo</h2>
|
<h2>Demo</h2>
|
||||||
Check out the <a href="editor.html">demo</a>.
|
Check out the <a href="editor-build.html">demo</a>.
|
||||||
<h2>Contact</h2>
|
<h2>Contact</h2>
|
||||||
<p>Fabian Jakobs (fabian.jakobs@web.de)
|
<p>Fabian Jakobs (fabian.jakobs@web.de)
|
||||||
<br/> </p>
|
<br/> </p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue