Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 146 lines (88 sloc) 4.866 kb
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
1 Coreweb overview
2 ================
3
70f9723e » ivan
2011-12-13 README: Improve the Overview
4 Coreweb is an assortment of JavaScript tools used by [Minerva](http://ludios.org/minerva/).
5
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
6 In [js_coreweb/cw/](https://github.com/ludios/Coreweb/tree/master/js_coreweb/cw) you'll find:
7
8 * cw/unittest.js - JavaScript unit testing framework with Deferred
1c591b6f » ivan
2011-12-13 README: Link to Twisted Trial and Foolscap eventual
9 support, inspired by [Twisted Trial](http://twistedmatrix.com/trac/wiki/TwistedTrial).
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
10
11 * cw/repr.js - Provides `cw.repr.repr`, a Python-like `repr` with
12 support for `__repr__` and an optimized variant `__reprPush__`
59319ec8 » ivan
2011-12-15 README: Fix typos
13 that avoids copying strings. cw/repr.js handles circular references.
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
14
15 * cw/eq.js - Provides `cw.eq.equals`, which can deep-compare objects
59319ec8 » ivan
2011-12-15 README: Fix typos
16 using its own comparisons and the `equals` method on your objects.
70f9723e » ivan
2011-12-13 README: Improve the Overview
17 See its docstring for the exact behavior.
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
18
19 * cw/eventual.js - Provides a `setTimeout(..., 0)` that guarantees
1c591b6f » ivan
2011-12-13 README: Link to Twisted Trial and Foolscap eventual
20 first-queued-first-called ordering. This is a port of
21 [Foolscap's eventual](http://foolscap.lothar.com/docs/api/foolscap.eventual-pysrc.html).
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
22
23 * cw/crosstab.js - Makes it possible to do synchronous funcalls
24 across already-open browser tabs (or windows), using
70f9723e » ivan
2011-12-13 README: Improve the Overview
25 `window.name`/`window.open`. It doesn't work in Chrome or IE8+.
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
26
70f9723e » ivan
2011-12-13 README: Improve the Overview
27 * cw/env.js - Provides functions to grab information about the browser
28 environment: plugins, window properties, screen information, time zone.
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
29
30 * cw/externalinterface.js - A JS->Flash ExternalInterface that is
70f9723e » ivan
2011-12-13 README: Improve the Overview
31 fast and not broken (unlike what Flash Player injects into the page).
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
32
33 * cw/loadflash.js - Functions to load a Flash object that follows
70f9723e » ivan
2011-12-13 README: Improve the Overview
34 our own `onloadcallback` protocol. Returns a Deferred that fires
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
35 when loading has finished.
36
37 * cw/clock.js - Provides a deterministic clock for unit testing,
38 roughly equivalent to `twisted.internet.task.Clock` but with
39 `setTimeout` and `setInterval` methods.
40
41 * cw/string.js - String utilities, some inspired by Python.
42
43 * cw/deferred.js - Provides `cw.deferred.maybeDeferred`.
44
45 * cw/objsize.js - Provides a function to guess how much memory
46 an object is using.
47
48 * cw/math.js - Provides special numbers.
49
70f9723e » ivan
2011-12-13 README: Improve the Overview
50 * cw/func.js - Provides `cw.func.isCallable`, which returns the right
51 result even when called on IE's cross-window object proxies.
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
52
53 * cw/linkify.js - A copy of Ben Alman's [js-linkify](http://benalman.com/code/test/js-linkify/).
54
70f9723e » ivan
2011-12-13 README: Improve the Overview
55 * Tests for the above, in [js_coreweb/cw/Test/](https://github.com/ludios/Coreweb/tree/master/js_coreweb/cw/Test).
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
56
70f9723e » ivan
2011-12-13 README: Improve the Overview
57 Coreweb also includes a set of test pages and browser experiments in
58 [coreweb/exp/](https://github.com/ludios/Coreweb/tree/master/coreweb/exp). The
59 convenient way to run these is to start the `coreweb_site` server (see below).
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
60
61
62
63 Use with Closure Library
64 ========================
2be35ce3 » ivan
2011-05-13 Document requirements in README
65
66 If you want to use Coreweb in your JavaScript project, all you need is:
67
68 * Closure Library: http://code.google.com/intl/en/closure/library/
69
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
70 For uncompiled development, include `js_coreweb` as a sibling directory to
71 `closure-library` on your filesystem or web server. If you make modifications
72 to files in `js_coreweb`, remember to run `./build_depsjs.sh` if necessary.
73
74 For compilation with Closure Compiler using closurebuilder, include
75 `js_coreweb` as an additional `--root=`.
2be35ce3 » ivan
2011-05-13 Document requirements in README
76
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
77
78
79 Running the tests
80 =================
81
82 Right now, Coreweb requires using its built-in web server to run the tests.
83 You'll need to install:
2be35ce3 » ivan
2011-05-13 Document requirements in README
84
85 * Twisted: http://twistedmatrix.com/
86
87 * Webmagic: https://github.com/ludios/Webmagic
88
89 * Closure Library: http://code.google.com/intl/en/closure/library/
90
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
91 Note that Twisted and Webmagic can be installed using `pip`.
92
39cc5c04 » ivan
2011-05-13 README: clarify instructions for starting server; remove obsolete doc…
93 To start the server, run:
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
94
d156efc6 » ivan
2011-06-08 Rename option -h (--http) to -t; look for closure-library in a locati…
95 `twistd -n coreweb_site -t tcp:9090:interface=127.0.0.1 --closure-library=/abspath/closure-library`
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
96
97 or on Windows:
98
99 ```
100 set PYTHONPATH=C:\Coreweb's_parent_directory (if not already in PYTHONPATH)
d156efc6 » ivan
2011-06-08 Rename option -h (--http) to -t; look for closure-library in a locati…
101 C:\Python27\python.exe C:\Python27\Scripts\twistd.py -n coreweb_site -t tcp:9090:interface=127.0.0.1 --closure-library=C:\abspath\closure-library
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
102 ```
103
d84568ba » ivan
2011-06-08 Fix minor README problem
104 Note that if `closure-library` is in the parent of the source directory,
105 you can omit `--closure-library=`.
39cc5c04 » ivan
2011-05-13 README: clarify instructions for starting server; remove obsolete doc…
106
107 Then, navigate to `http://127.0.0.1:9090/` in your browser.
108
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
109
110
111 Recompiling the compiled .js and .swf files
112 ===========================================
2be35ce3 » ivan
2011-05-13 Document requirements in README
113
114 If you want to recompile the compiled-JavaScript and .swf files, you also need:
115
116 * Closure Compiler: http://code.google.com/p/closure-compiler/
117
118 * haXe: http://haxe.org/
119
fc56f1c0 » ivan
2011-05-13 README: Write about requirements and usage
120 Then run:
121
122 ```
123 ./build_compiled_js.sh
124 ./build_swfs.sh
125 ```
2be35ce3 » ivan
2011-05-13 Document requirements in README
126
127
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
128
59d085cd » ivan
2011-05-13 README.md: reduce verbosity about project scope
129 Limited project scope
130 =====================
baa6d192 » ivank
2009-09-24 clean up some code; mention that a patched Node.js is required
131
59d085cd » ivan
2011-05-13 README.md: reduce verbosity about project scope
132 Why the separation between Coreweb and Minerva? Coreweb should contain
133 JavaScript and haXe files that assist in building web applications, but do not
134 rely on any server-side technology.
ba895cba » ivank
2009-06-23 add README containing project constraints
135
59d085cd » ivan
2011-05-13 README.md: reduce verbosity about project scope
136 An example: client-side code to synchronize the client's clock with a server
ba895cba » ivank
2009-06-23 add README containing project constraints
137 should not be here, because that requires a custom-built server.
a9455bfb » ivan
2011-12-13 README: Describe Coreweb contents; link to coding standard
138
139
140
141 Contributing
142 ============
143
144 Patches and pull requests are welcome.
145
146 This coding standard applies: http://ludios.org/coding-standard/
Something went wrong with that request. Please try again.