GNU ease.js
ease.js is now part of the GNU project; this merges in changes that led up to the submission being accepted and additional cleanup thereafter. More information will be included in the release announcement (which will be included in the 0.2.0 tag), and relicensing rationale is included in the commit that introduced the license change. The release announcement will also include a small essay I have been authoring with the help and input of RMS about the importance of making JavaScript code free. Happy GNU year!perfodd
commit
e1a28d7c71
|
@ -1,8 +1,30 @@
|
|||
build
|
||||
node_modules
|
||||
package.json
|
||||
lib/version.js
|
||||
|
||||
# downloaded by minification build
|
||||
tools/compiler.jar
|
||||
# generated by dist target
|
||||
AUTHORS
|
||||
NEWS
|
||||
ChangeLog
|
||||
|
||||
# autotools- and configure-generated
|
||||
aclocal.m4
|
||||
Makefile.in
|
||||
Makefile
|
||||
*.cache/
|
||||
configure
|
||||
config.*
|
||||
|
||||
# should be added using autoreconf -i
|
||||
INSTALL
|
||||
tools/install-sh
|
||||
tools/missing
|
||||
tools/mdate-sh
|
||||
tools/texinfo.tex
|
||||
|
||||
# downloaded manually by user
|
||||
tools/closure-compiler.jar
|
||||
|
||||
# website branch
|
||||
webroot/
|
||||
|
|
165
COPYING.LGPL
165
COPYING.LGPL
|
@ -1,165 +0,0 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
113
Makefile
113
Makefile
|
@ -1,113 +0,0 @@
|
|||
##
|
||||
# ease.js Makefile
|
||||
#
|
||||
# Copyright (C) 2012 Mike Gerwitz
|
||||
#
|
||||
# This file is part of ease.js.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
path_build=./build
|
||||
path_tools=./tools
|
||||
path_lib=./lib
|
||||
path_combine_output=${path_build}/ease.js
|
||||
path_combine_output_full=${path_build}/ease-full.js
|
||||
path_browser_test=${path_tools}/browser-test.html
|
||||
path_test=./test
|
||||
path_perf_test=${path_test}/perf
|
||||
|
||||
perf_tests := $(shell find "$(path_perf_test)" -name 'perf-*.js')
|
||||
|
||||
src_js := index.js $(wildcard $(path_lib)/*.js)
|
||||
src_tests := index.js $(shell find "$(path_test)" -name test-* \
|
||||
-o -name *Test* \
|
||||
-o -name inc-*.js )
|
||||
|
||||
path_doc := ./doc
|
||||
|
||||
combine := $(path_tools)/combine
|
||||
compiler := $(path_tools)/compiler.jar
|
||||
path_externs_internal := $(path_build)/externs-internal.js
|
||||
|
||||
.PHONY: combine min doc test test-combine clean distclean
|
||||
|
||||
|
||||
default: combine min
|
||||
all: combine min doc
|
||||
|
||||
mkbuild: $(path_build)
|
||||
|
||||
# create build dir
|
||||
$(path_build):
|
||||
mkdir -p "$(path_build)"
|
||||
|
||||
# combine all modules into easily redistributable ease.js file (intended for
|
||||
# browser)
|
||||
$(path_combine_output): $(src_js) | mkbuild
|
||||
${combine} > "$(path_combine_output)"
|
||||
$(path_combine_output_full): $(src_js) $(src_tests) | mkbuild
|
||||
INC_TEST=1 "$(combine)" > "${path_combine_output_full}"
|
||||
$(path_build)/browser-test.html: $(path_browser_test) | $(path_combine_output_full)
|
||||
cp "$(path_browser_test)" $@
|
||||
$(path_build)/browser-test-min.html: $(path_browser_test) | $(path_combine_output_full)
|
||||
cat "$(path_browser_test)" | sed 's/ease-full\.js/ease-full\.min\.js/' > $@
|
||||
combine: $(path_combine_output) $(path_build)/browser-test.html
|
||||
|
||||
doc:
|
||||
$(MAKE) -C $(path_doc)
|
||||
doc-html:
|
||||
$(MAKE) -C $(path_doc) html
|
||||
|
||||
test: default
|
||||
$(MAKE) -C $(path_test)
|
||||
|
||||
# performance tests
|
||||
perf: default $(perf_tests)
|
||||
perf-%.js: default
|
||||
@node $@
|
||||
|
||||
# externs for compilation process
|
||||
$(path_externs_internal): | mkbuild
|
||||
$(path_tools)/mkexterns > $@
|
||||
|
||||
# minification process uses Google Closure compiler
|
||||
min: build/ease.min.js build/ease-full.min.js $(path_build)/browser-test-min.html \
|
||||
| combine
|
||||
$(compiler):
|
||||
wget -O- http://closure-compiler.googlecode.com/files/compiler-latest.tar.gz \
|
||||
| tar -C $(path_tools) -xzv compiler.jar
|
||||
build/%.min.js: build/%.js $(path_tools)/externs-global.js $(path_externs_internal) \
|
||||
$(compiler)
|
||||
cat $(path_tools)/license-min.tpl > $@
|
||||
java -jar $(compiler) \
|
||||
--externs $(path_tools)/externs-global.js \
|
||||
--externs $(path_build)/externs-internal.js \
|
||||
--js $< >> $@ || rm $@
|
||||
|
||||
install: doc-info
|
||||
[ -d $(path_info_install) ] || mkdir -p $(path_info_install)
|
||||
cp $(path_doc_output_info) $(path_info_install)
|
||||
|
||||
uninstall:
|
||||
rm $(path_info_install)/easejs.info
|
||||
|
||||
# clean up build dir
|
||||
clean:
|
||||
$(MAKE) -C $(path_doc) clean
|
||||
rm -rf "${path_build}"
|
||||
|
||||
distclean: clean
|
||||
rm $(compiler)
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
## ease.js Makefile.am
|
||||
#
|
||||
# Copyright (C) 2013, 2014 Mike Gerwitz
|
||||
#
|
||||
# This file is part of GNU ease.js.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
path_build = $(top_builddir)/build
|
||||
path_tools = $(top_builddir)/tools
|
||||
path_lib = $(top_builddir)/lib
|
||||
path_test = $(top_builddir)/test
|
||||
path_doc = $(top_builddir)/doc
|
||||
|
||||
path_combine_output = $(path_build)/ease.js
|
||||
path_combine_output_full = $(path_build)/ease-full.js
|
||||
path_browser_test = $(path_tools)/browser-test.html
|
||||
|
||||
path_combine_output_min = $(path_combine_output:.js=.min.js)
|
||||
path_combine_output_full_min = $(path_combine_output_full:.js=.min.js)
|
||||
|
||||
src_js = @SRC_JS@
|
||||
path_externs_internal = $(path_build)/externs-internal.js
|
||||
|
||||
test_cases=$(shell find test/ -name '*Test.*' | tr '\n' ' ' )
|
||||
src_tests=$(shell find test/ -name test-* | tr '\n' ' ' )
|
||||
|
||||
combine = $(path_tools)/combine
|
||||
compiler = @CCJAR@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
|
||||
# see README
|
||||
SUBDIRS = doc
|
||||
EXTRA_DIST = AUTHORS NEWS ChangeLog README.md README.hacking \
|
||||
lib test index.js package.json \
|
||||
$(path_combine_output) $(path_combine_output_full) \
|
||||
$(path_browser_test) $(path_combine_output_min) \
|
||||
$(path_combine_output_full_min) \
|
||||
tools/combine tools/mkexterns tools/rmtrail \
|
||||
tools/signchk tools/browser-test.html tools/combine-order.js \
|
||||
tools/combine-test.tpl tools/combine.tpl tools/externs-global.js \
|
||||
tools/externs.js tools/license-min.tpl tools/license.tpl \
|
||||
tools/linechk-ignores
|
||||
|
||||
.PHONY: mkbuild combine min doc check test test-suite perf FORCE
|
||||
|
||||
default: combine
|
||||
|
||||
mkbuild: $(path_build)
|
||||
|
||||
# create build dir
|
||||
$(path_build):
|
||||
$(MKDIR_P) "$(path_build)"
|
||||
|
||||
|
||||
combine: $(path_combine_output) $(path_build)/browser-test.html
|
||||
|
||||
# combine all modules into easily redistributable ease.js file (intended for
|
||||
# browser)
|
||||
$(path_combine_output): $(src_js) | mkbuild
|
||||
$(combine) > "$(path_combine_output)"
|
||||
$(path_combine_output_full): $(src_js) $(src_tests) | mkbuild
|
||||
INC_TEST=1 "$(combine)" > "${path_combine_output_full}"
|
||||
$(path_build)/browser-test.html: $(path_browser_test) | $(path_combine_output_full)
|
||||
cp -f "$(path_browser_test)" $@
|
||||
$(path_build)/browser-test-min.html: $(path_browser_test) | $(path_combine_output_full)
|
||||
cat "$(path_browser_test)" | sed 's/ease-full\.js/ease-full\.min\.js/' > $@
|
||||
|
||||
# minification process uses Google Closure compiler
|
||||
min: $(path_build)/ease.min.js $(path_build)/ease-full.min.js \
|
||||
$(path_build)/browser-test-min.html | combine
|
||||
build/%.min.js: build/%.js $(path_tools)/externs-global.js $(path_externs_internal)
|
||||
if HAS_JAVA
|
||||
if HAS_CCJAR
|
||||
cat $(path_tools)/license-min.tpl > $@
|
||||
$(JAVA) -jar $(compiler) \
|
||||
--externs $(path_tools)/externs-global.js \
|
||||
--externs $(path_build)/externs-internal.js \
|
||||
--js $< >> $@ || rm $@
|
||||
else
|
||||
@echo "cannot create $@:"
|
||||
@echo " please download closure-compiler.jar and re-run ./configure"
|
||||
@exit 1
|
||||
endif
|
||||
else
|
||||
@echo "Please install a Java virtual machine (e.g. openjdk)"
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
# externs for compilation process
|
||||
$(path_externs_internal): | mkbuild
|
||||
$(path_tools)/mkexterns > $@
|
||||
|
||||
doc:
|
||||
$(MAKE) -C "$(path_doc)"
|
||||
html-single:
|
||||
$(MAKE) -C "$(path_doc)" html-single
|
||||
|
||||
test: check
|
||||
check: $(src_tests) test-suite
|
||||
|
||||
# performance tests
|
||||
perf: @PERF_TESTS@
|
||||
perf-%.js: FORCE
|
||||
if HAS_NODE
|
||||
@$(NODE) $@
|
||||
else
|
||||
@echo "Node.js must be installed in order to run performance tests"
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
# test cases (old format)
|
||||
test/%.js: FORCE
|
||||
NODE_PATH="$(path_test):$(NODE_PATH)" $(NODE) --stack_trace_limit=20 "$@"
|
||||
test/test-%: FORCE
|
||||
./"$@"
|
||||
|
||||
# test suite (new format)
|
||||
test-suite:
|
||||
if HAS_NODE
|
||||
@echo "ease.js Test Suite"
|
||||
@echo
|
||||
@NODE_PATH="$(path_test):$(NODE_PATH)" $(NODE) --stack_trace_limit=20 \
|
||||
$(path_test)/runner.js $(test_cases)
|
||||
else
|
||||
@echo "Node.js must be installed in order to run the test suite"
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
# generate the familiar files that automake normally checks for
|
||||
dist-hook: AUTHORS NEWS ChangeLog
|
||||
cp $? $(distdir)
|
||||
AUTHORS: FORCE
|
||||
$(path_tools)/gitlog-to-authors > AUTHORS
|
||||
NEWS: FORCE
|
||||
$(path_tools)/gitlog-to-news $(path_tools)/news-ignore > NEWS
|
||||
ChangeLog: FORCE
|
||||
$(path_tools)/gitlog-to-changelog \
|
||||
--strip-cherry-pick \
|
||||
--format=%s \
|
||||
-- \
|
||||
--no-merges \
|
||||
> ChangeLog
|
||||
|
||||
clean-local:
|
||||
-rm -rf "$(path_build)"
|
||||
-rm -rf doc-cp # created by website branch build
|
||||
-rm -f AUTHORS NEWS ChangeLog
|
||||
|
||||
distclean-local:
|
||||
-rm -f package.json
|
||||
|
||||
maintainer-clean-local:
|
||||
-rm -f "$(compiler)"
|
|
@ -0,0 +1,51 @@
|
|||
Configuring ease.js
|
||||
*******************
|
||||
|
||||
Copyright (C) 2013 Mike Gerwitz
|
||||
|
||||
This file is part of GNU ease.js.
|
||||
|
||||
Copying and distribution of this file, with or without modification, are
|
||||
permitted in any medium without royalty provided the copyright notice and
|
||||
this notice are preserved. This file is offered as-is, without warranty
|
||||
of any kind.
|
||||
|
||||
|
||||
This file contains information on configuring and building GNU ease.js; for
|
||||
information on using the library, please see the Markdown-formatted README.md
|
||||
file or the Texinfo manual.
|
||||
|
||||
|
||||
Installing
|
||||
==========
|
||||
|
||||
For information on installing ease.js on your system, see INSTALL.
|
||||
Alternatively, you may install the software using npm by issuing the
|
||||
following command:
|
||||
|
||||
$ npm install easejs
|
||||
|
||||
|
||||
|
||||
Configuring
|
||||
===========
|
||||
|
||||
If your distribution contains a `configure' file in the project root, you
|
||||
may jump immediately to INSTALL.
|
||||
|
||||
Otherwise, you likely have the sources as they exist in the project
|
||||
repository, which does not contain the generated `configure' script; you
|
||||
may generate it by issuing the following command:
|
||||
|
||||
$ autoreconf -fvi
|
||||
|
||||
Please note that certain files (such as AUTHORS, NEWS, and ChangeLog) are
|
||||
generated as part of the `dist' target and do not exist as part of the
|
||||
repository.
|
||||
|
||||
|
||||
|
||||
Hacking
|
||||
=======
|
||||
For information on hacking and contributing to GNU ease.js, please see
|
||||
README.hacking.
|
51
README.md
51
README.md
|
@ -1,8 +1,19 @@
|
|||
# ease.js
|
||||
<!--
|
||||
Copyright (C) 2013 Mike Gerwitz
|
||||
|
||||
ease.js is a collection of CommonJS modules intended to "ease" the transition
|
||||
into JavaScript from other Object-Oriented languages. It provides an intuitive
|
||||
means of achieving classical inheritance and has planned support traits/mixins.
|
||||
This file is part of GNU ease.js.
|
||||
|
||||
Copying and distribution of this file, with or without modification, are
|
||||
permitted in any medium without royalty provided the copyright notice and
|
||||
this notice are preserved. This file is offered as-is, without warranty
|
||||
of any kind.
|
||||
-->
|
||||
|
||||
# GNU ease.js
|
||||
|
||||
GNU ease.js is a classical object-oriented framework for Javascript, intended to
|
||||
eliminate boilerplate code and "ease" the transition into JavaScript from other
|
||||
object-oriented languages.
|
||||
|
||||
Current support includes:
|
||||
|
||||
|
@ -10,10 +21,10 @@ Current support includes:
|
|||
* Classical inheritance
|
||||
* Abstract classes and methods
|
||||
* Interfaces
|
||||
* Visibility (public, protected and private members)
|
||||
* Visibility (public, protected, and private members)
|
||||
* Static and constant members
|
||||
|
||||
While the current focus of the project is Object-Oriented design, it is likely
|
||||
While the current focus of the project is object-oriented design, it is likely
|
||||
that ease.js will expand to other paradigms in the future.
|
||||
|
||||
**This project is under active development. Please see the manual for more
|
||||
|
@ -32,7 +43,7 @@ http://easejs.org/bugs/
|
|||
|
||||
## Why ease.js?
|
||||
There are already a number of libraries/frameworks that permit basic classical
|
||||
Object-Oriented development, so why ease.js? While many of the existing
|
||||
object-oriented development, so why ease.js? While many of the existing
|
||||
solutions certainly provide viable solutions, they are largely incomplete. Until
|
||||
the appearance of ECMAScript 5, many of the features enjoyed by classical OO
|
||||
developers were elusive to JavaScript. The aim of this project is to provide an
|
||||
|
@ -49,7 +60,7 @@ whatever native ECMAScript implementation is decided upon.
|
|||
### Why Classical OOP in JavaScript?
|
||||
ease.js was created (historically) for a number of reasons:
|
||||
|
||||
* To "ease" Object-Oriented developers into JavaScript by providing a familiar
|
||||
* To "ease" object-oriented developers into JavaScript by providing a familiar
|
||||
environment.
|
||||
* To provide the maintenance and development benefits of classical OOP.
|
||||
* To provide features missing from the language, such as proper encapsulation
|
||||
|
@ -57,9 +68,9 @@ ease.js was created (historically) for a number of reasons:
|
|||
etc.
|
||||
* To encapsulate the hacks commonly used to perform the above tasks.
|
||||
|
||||
Many JS purists believe that classical Object-Oriented programming should be
|
||||
Many JS purists believe that classical object-oriented programming should be
|
||||
left out of the language and one should stick strictly to prototypal
|
||||
development. While the two are related (both Object-Oriented), they can be
|
||||
development. While the two are related (both object-oriented), they can be
|
||||
applied to different problem domains in order to achieve results that are more
|
||||
natural or intuitive to developers. ease.js works seamlessly with existing
|
||||
prototypes, allowing the developer to choose whether or not they want to use
|
||||
|
@ -223,13 +234,17 @@ To implement an interface, use the `implement()` class method:
|
|||
Note that, if a concrete implementation for each method is not provided, the
|
||||
implementing type must be declared abstract.
|
||||
|
||||
## License
|
||||
ease.js is free software: you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
## Use of Reserved Words
|
||||
Though JavaScript doesn't currently implement classes, interfaces, etc, it does
|
||||
reserve the keywords. In an effort to ensure that ease.js will not clash, the
|
||||
following precautions are taken:
|
||||
|
||||
* `Class` is used with a capital 'C'
|
||||
* `Interface` is used with a capital 'I'
|
||||
* Reserved keywords are quoted when used (e.g. in property strings)
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
**N.B.:** Versions prior to 0.2.0 were released under the LGPLv3+. Upon becoming
|
||||
a GNU project, it was relicensed under the GPLv3+ to help the FSF stand strong
|
||||
in its fight against proprietary JavaScript. For more information, please see
|
||||
the NEWS file (which can be built with `make NEWS`).
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
# For use by automake and autoconf
|
||||
#
|
||||
# Copyright (C) 2013 Mike Gerwitz
|
||||
#
|
||||
# This file is part of GNU ease.js.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
AC_INIT([ease.js], [0.2.0-dev], [bugs@easejs.org])
|
||||
AC_CONFIG_AUX_DIR([tools])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
|
||||
# provide more granular version numbers based on the above AC_INIT line
|
||||
m4_define([ver_split], m4_split(m4_translit(AC_PACKAGE_VERSION, [-], [.]), [\.]))
|
||||
AC_SUBST(MAJOR, m4_argn(1, ver_split))
|
||||
AC_SUBST(MINOR, m4_argn(2, ver_split))
|
||||
AC_SUBST(REV, m4_argn(3, ver_split))
|
||||
AC_SUBST(SUFFIX, m4_argn(4, ver_split))
|
||||
|
||||
AC_PROG_MKDIR_P
|
||||
|
||||
# check for node, which is required for nearly every operation
|
||||
AC_ARG_VAR([NODE], [The node.js interpreter])
|
||||
AC_CHECK_PROGS(NODE, [node nodejs])
|
||||
AM_CONDITIONAL(HAS_NODE, [test "$NODE"])
|
||||
|
||||
# certain portions of the build process require that node be installed (in the
|
||||
# future, we may be able to allow alternatives, such as SpiderMonkey)
|
||||
test "$NODE" || AC_MSG_WARN([
|
||||
|
||||
Node.js is not installed; certain make targets have been disabled.
|
||||
])
|
||||
|
||||
# yes, this isn't necessarily a good practice, however the directory itself can
|
||||
# be loaded and used without being built, so it's important that our resulting
|
||||
# file includes exactly what is contained within the dir and is rebuilt if /any/
|
||||
# of the files change
|
||||
AC_MSG_CHECKING([for source js files])
|
||||
SRC_JS_LIB="$(find lib/*.js | tr '\n' ' ' )"
|
||||
SRC_JS="index.js $SRC_JS_LIB"
|
||||
AC_SUBST(SRC_JS)
|
||||
if test -n "$SRC_JS_LIB"; then
|
||||
AC_MSG_RESULT(ok)
|
||||
else
|
||||
AC_MSG_ERROR(failed!)
|
||||
fi
|
||||
|
||||
# Java is used for Closure Compiler
|
||||
AC_ARG_VAR([JAVA], [The Java executable])
|
||||
AC_ARG_VAR([CCJAR], [The Clojure Compiler jar file])
|
||||
AC_CHECK_PROGS(JAVA, [java])
|
||||
AM_CONDITIONAL(HAS_JAVA, [test "$JAVA"])
|
||||
|
||||
ccjar=
|
||||
AS_IF(test "$JAVA" -a ! "$CCJAR",
|
||||
[AC_CHECK_FILE([$srcdir/tools/closure-compiler.jar],
|
||||
[AC_SUBST([CCJAR], [$srcdir/tools/closure-compiler.jar])],
|
||||
[AC_MSG_NOTICE([
|
||||
|
||||
If you wish perform minification of the combined source file, you must
|
||||
download closure-compiler.jar into the tools sub-directory; it is
|
||||
available here:
|
||||
|
||||
https://developers.google.com/closure/compiler/
|
||||
|
||||
If it is installed elsewhere on your system, specify its location with
|
||||
the CCJAR environment variable.
|
||||
])])], [])
|
||||
|
||||
AM_CONDITIONAL(HAS_CCJAR, [test "$CCJAR"])
|
||||
|
||||
# check for performance tests
|
||||
AC_MSG_CHECKING([for performance tests])
|
||||
PERF_TESTS=$( find test/perf -name 'perf-*.js' | tr '\n' ' ' )
|
||||
AC_SUBST(PERF_TESTS)
|
||||
AS_IF([test "$PERF_TESTS"], [AC_MSG_RESULT(ok)], [AC_MSG_WARN(none found)])
|
||||
|
||||
AC_CONFIG_FILES([Makefile doc/Makefile package.json lib/version.js])
|
||||
AC_OUTPUT
|
|
@ -10,3 +10,10 @@
|
|||
*.vr
|
||||
*.pdf
|
||||
*.toc
|
||||
|
||||
stamp-vti
|
||||
version.texi
|
||||
easejs.info
|
||||
easejs.txt
|
||||
easejs.html
|
||||
easejs-single.html
|
||||
|
|
131
doc/Makefile
131
doc/Makefile
|
@ -1,131 +0,0 @@
|
|||
##
|
||||
# ease.js manual Makefile
|
||||
#
|
||||
# Responsible for building the project documentation.
|
||||
#
|
||||
# Copyright (C) 2012 Mike Gerwitz
|
||||
#
|
||||
# This file is part of ease.js.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
path_doc=.
|
||||
path_build=../build
|
||||
path_lib=../lib
|
||||
path_doc_output=${path_build}/doc
|
||||
path_doc_output_info=${path_doc_output}/easejs.info
|
||||
path_doc_output_plain=${path_doc_output}/manual.txt
|
||||
path_doc_output_html=${path_doc_output}/manual
|
||||
path_doc_output_html1=${path_doc_output}/manual.html
|
||||
path_doc_css=${path_doc}/manual.css
|
||||
path_doc_img=${path_doc}/img
|
||||
path_doc_css_ref=manual.css
|
||||
path_manual_texi=${path_doc}/manual.texi
|
||||
|
||||
path_info_install := /usr/local/share/info
|
||||
|
||||
doc_src := $(wildcard $(path_doc)/*.texi)
|
||||
doc_imgs := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.dia))
|
||||
doc_imgs_txt := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.txt))
|
||||
|
||||
doc_replace := s/<\/body>/<script type="text\/javascript" \
|
||||
src="highlight.pack.js"><\/script><script type="text\/javascript" \
|
||||
src="interactive.js"><\/script><\/body>/\
|
||||
;s/\>\;=/\&\#8805\;/g\
|
||||
;s/\<\;=/\&\#8804\;/g\
|
||||
|
||||
.PHONY: doc mkbuild-doc img pdf info plain html
|
||||
|
||||
# generate texinfo documentation (twice to generate TOC), then remove the extra
|
||||
# files that were generated
|
||||
#
|
||||
# generates: pdf, info, HTML (multiple pages), HTML (single page)
|
||||
default: pdf info plain html
|
||||
|
||||
mkbuild-doc: $(path_doc_output)
|
||||
|
||||
$(path_doc_output):
|
||||
[ -d $(path_doc_output) ] || mkdir -p "$(path_doc_output)"
|
||||
|
||||
# doc images
|
||||
$(path_doc)/img/%.png: $(path_doc)/img/%.dia
|
||||
echo "$<" | grep -q 'wide' \
|
||||
&& dia -e $@ -s x250 $< \
|
||||
|| dia -e $@ -s 300x $<
|
||||
|
||||
# doc pdf
|
||||
$(path_doc_output)/%.pdf: $(doc_src) $(doc_imgs) | mkbuild-doc img
|
||||
TEXINPUTS="$(path_doc):" \
|
||||
pdftex -output-directory "${path_doc}" "${path_manual_texi}" && \
|
||||
TEXINPUTS="$(path_doc):" \
|
||||
pdftex -output-directory "${path_doc}" "${path_manual_texi}"
|
||||
mv -f "${path_doc}"/*.pdf "${path_doc_output}"
|
||||
cd "$(path_doc)" && rm -f $(shell cat "$(path_doc)/.gitignore")
|
||||
|
||||
# doc info
|
||||
$(path_doc_output_info): $(doc_src) $(doc_imgs_txt) | mkbuild-doc
|
||||
makeinfo -I "$(path_doc)" -o $@ "$(path_manual_texi)";
|
||||
|
||||
# doc plain text
|
||||
$(path_doc_output_plain): $(doc_imgs_txt) | mkbuild-doc
|
||||
makeinfo --plain -I "$(path_doc)" "${path_manual_texi}" > $@
|
||||
|
||||
# doc html (multiple pages)
|
||||
$(path_doc_output_html)/index.html: $(doc_src) $(path_doc_css) \
|
||||
| $(path_doc_output_html)/img $(path_doc_output_html)/interactive.js \
|
||||
$(path_doc_output_html)/highlight.pack.js \
|
||||
$(path_doc_output_html)/$(path_doc_css_ref) mkbuild-doc img
|
||||
makeinfo --html --css-ref="$(path_doc_css_ref)" \
|
||||
-I "$(path_doc)" -o "${path_doc_output_html}" "${path_manual_texi}"
|
||||
sed -i '$(doc_replace)' $(path_doc_output_html)/*.htm?
|
||||
|
||||
# doc html (single page)
|
||||
$(path_doc_output_html1): $(doc_src) $(path_doc_css) \
|
||||
| $(path_doc_output)/img $(path_doc_output)/interactive.js \
|
||||
$(path_doc_output)/highlight.pack.js mkbuild-doc img
|
||||
makeinfo --no-split --html --css-include="${path_doc_css}" \
|
||||
-I "$(path_doc)" -o - "${path_manual_texi}" \
|
||||
| sed '$(doc_replace)' \
|
||||
> "$(path_doc_output_html1)"
|
||||
|
||||
# doc images (in build dir)
|
||||
$(path_doc_output)/img: $(doc_imgs) | mkbuild-doc img
|
||||
[ -d "$@" ] || mkdir -p $@
|
||||
cp "$(path_doc_img)"/*.png $@
|
||||
$(path_doc_output_html)/img: $(path_doc_output)/img
|
||||
mkdir -p $(path_doc_output_html)
|
||||
ln -s ../img $@
|
||||
|
||||
# interactive html doc (js)
|
||||
$(path_doc_output_html)/%.js: $(path_doc)/%.js
|
||||
cp $< $@
|
||||
$(path_doc_output)/%.js: $(path_doc)/%.js
|
||||
cp $< $@
|
||||
|
||||
# doc css
|
||||
$(path_doc_output_html)/%.css: $(path_doc)/%.css
|
||||
cp $< $@
|
||||
|
||||
|
||||
img: $(doc_imgs)
|
||||
pdf: $(path_doc_output)/manual.pdf
|
||||
info: $(path_doc_output_info)
|
||||
plain: $(path_doc_output_plain)
|
||||
html: $(path_doc_output_html)/index.html $(path_doc_output_html1)
|
||||
|
||||
clean:
|
||||
rm -rf $(path_doc_output)
|
||||
rm -rf $(path_doc_img)/*.png
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
# ease.js manual Makefile
|
||||
#
|
||||
# Responsible for building the project documentation.
|
||||
#
|
||||
# Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
#
|
||||
# This file is part of GNU ease.js.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
info_TEXINFOS = easejs.texi
|
||||
easejs_TEXINFOS = license.texi about.texi classes.texi \
|
||||
impl-details.texi integration.texi mkeywords.texi source-tree.texi
|
||||
|
||||
EXTRA_DIST = img README highlight.pack.js interactive.js easejs.css
|
||||
|
||||
path_build=../build
|
||||
path_lib=../lib
|
||||
docdir = @docdir@
|
||||
path_doc_output_plain=easejs.txt
|
||||
path_doc_output_html=easejs.html
|
||||
path_doc_output_html1=easejs-single.html
|
||||
path_doc_css=easejs.css
|
||||
path_doc_img=img
|
||||
path_easejs_texi=easejs.texi
|
||||
path_doc_css_ref=$(path_doc_css)
|
||||
|
||||
MAKEINFOHTML=$(MAKEINFO) --html --css-ref="$(path_doc_css_ref)"
|
||||
|
||||
doc_src := $(wildcard *.texi)
|
||||
doc_imgs := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.dia))
|
||||
doc_imgs_txt := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.txt))
|
||||
|
||||
doc_replace := s/<\/body>/<script type="text\/javascript" \
|
||||
src="highlight.pack.js"><\/script><script type="text\/javascript" \
|
||||
src="interactive.js"><\/script><\/body>/\
|
||||
;s/\>\;=/\&\#8805\;/g\
|
||||
;s/\<\;=/\&\#8804\;/g
|
||||
|
||||
.PHONY: doc mkbuild-doc img info html
|
||||
|
||||
mkbuild-doc: $(path_doc_output)
|
||||
|
||||
dvi-local: img
|
||||
pdf-local: img
|
||||
html-local: img easejs.css highlight.pack.js interactive.js
|
||||
|
||||
# doc images
|
||||
img/%.png: img/%.dia
|
||||
echo "$<" | grep -q 'wide' \
|
||||
&& dia -e $@ -s x250 $< \
|
||||
|| dia -e $@ -s 300x $<
|
||||
|
||||
# doc plain text
|
||||
$(path_doc_output_plain): $(doc_imgs_txt)
|
||||
makeinfo --plain -I "." "${path_easejs_texi}" -o "$@"
|
||||
|
||||
# doc html (multiple pages); override default target to call automake's
|
||||
# first and then post-process output (it has no *-hook target support)
|
||||
html: html-local html-am $(path_doc_output_html)/$(path_doc_css_ref)
|
||||
sed -i '$(doc_replace)' easejs.html/*.htm?
|
||||
|
||||
# doc html (single page)
|
||||
html-single: $(path_doc_output_html1)
|
||||
$(path_doc_output_html1): html-local
|
||||
$(MAKEINFO) --no-split --html --css-include="${path_doc_css}" \
|
||||
-I . -o "$(path_doc_output_html1)" "${path_easejs_texi}" \
|
||||
&& sed -i '$(doc_replace)' "$(path_doc_output_html1)"
|
||||
|
||||
# doc images (in build dir)
|
||||
$(path_doc_output)/img: $(doc_imgs) | mkbuild-doc img
|
||||
[ -d "$@" ] || mkdir -p $@
|
||||
cp "$(path_doc_img)"/*.png $@
|
||||
$(path_doc_output_html)/img: $(path_doc_output)/img
|
||||
mkdir -p $(path_doc_output_html)
|
||||
ln -s ../img $@
|
||||
|
||||
# interactive html doc (js)
|
||||
$(path_doc_output_html)/%.js: %.js
|
||||
cp $< $@
|
||||
$(path_doc_output)/%.js: %.js
|
||||
cp $< $@
|
||||
|
||||
# doc css
|
||||
$(path_doc_output_html)/%.css: %.css
|
||||
cp $< $@
|
||||
|
||||
|
||||
img: $(doc_imgs)
|
||||
|
||||
plain: $(path_doc_output_plain)
|
||||
install-plain: plain
|
||||
install -d $(DESTDIR)$(docdir)
|
||||
install -m644 $(path_doc_output_plain) \
|
||||
$(DESTDIR)$(docdir)/easejs.txt
|
||||
|
||||
clean-local:
|
||||
rm -rf $(path_doc_img)/*.png
|
||||
rm -f $(path_doc_output_plain)
|
||||
|
|
@ -2,8 +2,8 @@ The ease.js website uses 3rd-party scripts, described below.
|
|||
|
||||
highlight.js
|
||||
------------
|
||||
Used for syntax highlighting on both the website itself and in the manual. Uses
|
||||
the modified BSD license.
|
||||
Used for syntax highlighting on both the website itself and in the manual.
|
||||
Uses the modified BSD license.
|
||||
|
||||
Copyright (c) 2006, Ivan Sagalaev
|
||||
All rights reserved.
|
||||
|
@ -27,5 +27,5 @@ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
236
doc/about.texi
236
doc/about.texi
|
@ -1,19 +1,18 @@
|
|||
@c This document is part of the ease.js manual
|
||||
@c Copyright (c) 2011 Mike Gerwitz
|
||||
@c This document is part of the GNU ease.js manual.
|
||||
@c Copyright (C) 2011, 2013, 2014 Mike Gerwitz
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
@c Texts. A copy of the license is included in the section entitled ``GNU
|
||||
@c Free Documentation License''.
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
@c any later version published by the Free Software Foundation; with no
|
||||
@c Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled ``GNU Free
|
||||
@c Documentation License''.
|
||||
|
||||
@node About
|
||||
@unnumbered About ease.js
|
||||
@unnumbered About GNU ease.js
|
||||
|
||||
ease.js is a collection of @uref{http://commonjs.org, CommonJS} modules intended
|
||||
to ``ease'' the transition into JavaScript from other Object-Oriented languages.
|
||||
It provides an intuitive means of achieving classical inheritance and has
|
||||
planned support for traits/mixins, function overloading and more.
|
||||
GNU ease.js is a classical object-oriented framework for Javascript,
|
||||
intended to eliminate boilerplate code and ``ease'' the transition into
|
||||
JavaScript from other object-oriented languages.
|
||||
|
||||
Current support includes:
|
||||
@itemize @bullet
|
||||
|
@ -21,161 +20,172 @@ Current support includes:
|
|||
@item Classical inheritance
|
||||
@item Abstract classes and methods
|
||||
@item Interfaces
|
||||
@item Visibility (public, protected and private members)
|
||||
@item Static, constant and final members
|
||||
@item Visibility (public, protected, and private members)
|
||||
@item Static, constant, and final members
|
||||
@end itemize
|
||||
|
||||
While the current focus of the project is Object-Oriented design, it is likely
|
||||
that ease.js will expand to other paradigms in the future.
|
||||
While the current focus of the project is Object-Oriented design, it is
|
||||
likely that ease.js will expand to other paradigms in the future.
|
||||
|
||||
|
||||
@section History
|
||||
ease.js was initially developed for use at Mike's place of employment in order to
|
||||
move the familiar concept of Object Oriented development over to JavaScript for
|
||||
use in robust web applications. JavaScript lacks basic core principals of Object
|
||||
Oriented development, the most major of which is proper encapsulation.
|
||||
ease.js was initially developed for use at the author's place of employment
|
||||
in order to move the familiar concept of object-oriented development over to
|
||||
JavaScript for use in what would one day be liberated under the
|
||||
@uref{https://github.com/lovullo/liza,Liza Data Collection Framework}.
|
||||
JavaScript lacks basic core principals of object-oriented development, the
|
||||
most major of which is proper encapsulation.
|
||||
|
||||
The library would be required to work both server and client-side, supporting
|
||||
all major web browsers as far back as Internet Explorer 6. Since it would be
|
||||
used in a production system and would be used to develop a core business
|
||||
application, it must also work flawlessly. This meant heavy unit testing.
|
||||
The library would be required to work both server and client-side,
|
||||
supporting all major web browsers as far back as Internet Explorer 6. Since
|
||||
it would be used in a production system and would be used to develop a core
|
||||
business application, it must also work flawlessly. This meant heavy unit
|
||||
testing.
|
||||
|
||||
The solution was to develop a library that would first work server-side. The
|
||||
software of choice for server-side JavaScript was @uref{http://nodejs.org,
|
||||
Node.js}. Node uses the CommonJS format for modules. This provided an intuitive
|
||||
means of modularizing the code without use of an Object Oriented development
|
||||
style (the closest other option would be Prototypal). ease.js was first
|
||||
developed to work on Node.js.
|
||||
Node.js}. Node uses the CommonJS format for modules. This provided an
|
||||
intuitive means of modularizing the code without use of an Object Oriented
|
||||
development style (the closest other option would be Prototypal). ease.js
|
||||
was first developed to work on Node.js.
|
||||
|
||||
Moving the code over to the browser is not a difficult concept, since the entire
|
||||
library relied only on standard JavaScript. A couple important factors had to be
|
||||
taken into account, mainly that CommonJS modules don't simply ``work''
|
||||
client-side without some type of wrapper, not all browsers support ECMAScript 5
|
||||
and the assertion system used for tests is a Node.js module.
|
||||
Moving the code over to the browser is not a difficult concept, since the
|
||||
entire library relied only on standard JavaScript. A couple important
|
||||
factors had to be taken into account, mainly that CommonJS modules don't
|
||||
simply ``work'' client-side without some type of wrapper, not all browsers
|
||||
support ECMAScript 5 and the assertion system used for tests is a Node.js
|
||||
module.
|
||||
|
||||
This involved writing a simple script to concatenate all the modules and
|
||||
appropriately wrap them in closures, thereby solving the CommonJS issue. The
|
||||
required assertions were ported over to the client. The only issue was then
|
||||
ECMAScript 5 support, which with a little thought, the browser could gracefully
|
||||
fall back on by sacrificing certain features but leaving the core functionality
|
||||
relatively unscathed. This provides a proper cross-browser implementation and,
|
||||
very importantly, allows the unit tests to be run both server and client side.
|
||||
One can then be confident that ease.js will operate on both the server and a
|
||||
wide range of web browsers without having to maintain separate tests for each.
|
||||
ECMAScript 5 support, which with a little thought, the browser could
|
||||
gracefully fall back on by sacrificing certain features but leaving the core
|
||||
functionality relatively unscathed. This provides a proper cross-browser
|
||||
implementation and, very importantly, allows the unit tests to be run both
|
||||
server and client side. One can then be confident that ease.js will operate
|
||||
on both the server and a wide range of web browsers without having to
|
||||
maintain separate tests for each.
|
||||
|
||||
Needless to say, the development was successful and the project has been used in
|
||||
production long before v0.1.0-pre was even conceived. It was thought at the
|
||||
beginning of the project that versions would be unnecessary, due to its relative
|
||||
simplicity and fairly basic feature set. The project has since evolved past its
|
||||
original specification and hopes to introduce a number of exciting features in
|
||||
the future.
|
||||
Needless to say, the development was successful and the project has been
|
||||
used in production long before v0.1.0-pre was even conceived. It was thought
|
||||
at the beginning of the project that versions would be unnecessary, due to
|
||||
its relative simplicity and fairly basic feature set. The project has since
|
||||
evolved past its original specification and hopes to introduce a number of
|
||||
exciting features in the future.
|
||||
|
||||
The project is owned and developed independently by Mike Gerwitz. There is no
|
||||
ownership by his employer.
|
||||
The project is owned and developed independently by Mike Gerwitz. There is
|
||||
no ownership by his employer.
|
||||
|
||||
On 22 December 2013, ease.js officially became a part of GNU with the kind
|
||||
help and supervision of Brandon Invergo.
|
||||
|
||||
|
||||
@section Why ease.js?
|
||||
There already exists a number of different ways to accomplish inheritance and
|
||||
various levels of encapsulation in JavaScript. Why ease.js? Though a number of
|
||||
frameworks did provide class-like definitions, basic inheritance and other minor
|
||||
feature sets, none of them seemed to be an all-encompassing solution to providing
|
||||
a strong framework for Object-Oriented development in JavaScript.
|
||||
There already exists a number of different ways to accomplish inheritance
|
||||
and various levels of encapsulation in JavaScript. Why ease.js? Though a
|
||||
number of frameworks did provide class-like definitions, basic inheritance
|
||||
and other minor feature sets, none of them seemed to be an all-encompassing
|
||||
solution to providing a strong framework for Object-Oriented development in
|
||||
JavaScript.
|
||||
|
||||
ease.js was first inspired by John Resig's post on "Simple JavasScript
|
||||
Inheritance"@footnote{John's blog post is available at
|
||||
@uref{http://ejohn.org/blog/simple-javascript-inheritance/}.}. This very basic
|
||||
example provided a means to define a ``class'' and extend it. It used a
|
||||
PHP-style constructor and was intuitive to use. Though it was an excellent
|
||||
ease.js was first inspired by John Resig's post on ``Simple JavasScript
|
||||
Inheritance''@footnote{John's blog post is available at
|
||||
@uref{http://ejohn.org/blog/simple-javascript-inheritance/}.}. This very
|
||||
basic example provided a means to define a ``class'' and extend it. It used
|
||||
a PHP-style constructor and was intuitive to use. Though it was an excellent
|
||||
alternative to defining and inheriting classes by working directly with
|
||||
prototypes, it was far from a solid solution. It lacked abstract methods,
|
||||
interfaces, encapsulation (visibility) and many other important features.
|
||||
interfaces, encapsulation (visibility), and many other important features.
|
||||
Another solution was needed.
|
||||
|
||||
Using John's example as a base concept, ease.js was developed to address those
|
||||
core issues. Importantly, the project needed to fulfill the following goals:
|
||||
Using John's example as a base concept, ease.js was developed to address
|
||||
those core issues. Importantly, the project needed to fulfill the following
|
||||
goals:
|
||||
|
||||
@table @strong
|
||||
@item Intuitive Class Definitions
|
||||
Users of Object-Oriented languages are used to a certain style of class
|
||||
declaration that is fairly consistent. Class definitions within the framework
|
||||
should be reflective of this. A programmer familiar with Object-Oriented
|
||||
development should be able to look at the code and clearly see what the class is
|
||||
doing and how it is defined.
|
||||
declaration that is fairly consistent. Class definitions within the
|
||||
framework should be reflective of this. A programmer familiar with
|
||||
Object-Oriented development should be able to look at the code and clearly
|
||||
see what the class is doing and how it is defined.
|
||||
|
||||
@item Encapsulation
|
||||
The absolute most important concept that ease.js wished to address was that of
|
||||
encapsulation. Encapsulation is one of the most important principals of
|
||||
The absolute most important concept that ease.js wished to address was that
|
||||
of encapsulation. Encapsulation is one of the most important principals of
|
||||
Object-Oriented development. This meant implementing a system that would not
|
||||
only support public and private members (which can be done conventionally in
|
||||
JavaScript through ``privileged members''), but must also support
|
||||
@emph{protected} members. Protected members have long been elusive to JavaScript
|
||||
developers.
|
||||
@emph{protected} members. Protected members have long been elusive to
|
||||
JavaScript developers.
|
||||
|
||||
@item Interfaces / Abstract Classes
|
||||
Interfaces and Abstract Classes are a core concept and facilitate code reuse and
|
||||
the development of consistent APIs. They also prove to be very useful for
|
||||
polymorphism. Without them, we must trust that the developer has implemented the
|
||||
correct API. If not, it will likely result in confusing runtime errors.
|
||||
We also cannot ensure an object is passed with the expected API through the use
|
||||
of polymorphism.
|
||||
Interfaces and Abstract Classes are a core concept and facilitate code reuse
|
||||
and the development of consistent APIs. They also prove to be very useful
|
||||
for polymorphism. Without them, we must trust that the developer has
|
||||
implemented the correct API. If not, it will likely result in confusing
|
||||
runtime errors. We also cannot ensure an object is passed with the expected
|
||||
API through the use of polymorphism.
|
||||
|
||||
@item Inheritance
|
||||
Basic inheritance can be done through use of prototype chains. However, the
|
||||
above concepts introduce additional complications. Firstly, we must be able to
|
||||
implement interfaces. A simple prototype chain cannot do this (an object cannot
|
||||
have multiple prototypes). Furthermore, protected members must be inherited by
|
||||
subtypes, while making private members unavailable. In the future, when traits
|
||||
are added to the mix, we run into the same problem as we do with interfaces.
|
||||
above concepts introduce additional complications. Firstly, we must be able
|
||||
to implement interfaces. A simple prototype chain cannot do this (an object
|
||||
cannot have multiple prototypes). Furthermore, protected members must be
|
||||
inherited by subtypes, while making private members unavailable. In the
|
||||
future, when traits are added to the mix, we run into the same problem as we
|
||||
do with interfaces.
|
||||
|
||||
@item CommonJS, Server and Client
|
||||
The framework would have to be used on both the server and client. Server-side,
|
||||
@uref{http://nodejs.org, Node.js} was chosen. It used a CommonJS format for
|
||||
modules. In order to get ease.js working client side, it would have to be
|
||||
wrapped in such a way that the code could remain unchanged and still operate the
|
||||
same. Furthermore, all tests written for the framework would have to run both
|
||||
server and client-side, ensuring a consistent experience on the server and
|
||||
across all supported browsers. Support would have to go as far back as Internet
|
||||
Explorer 6 to support legacy systems.
|
||||
The framework would have to be used on both the server and client.
|
||||
Server-side, @uref{http://nodejs.org, Node.js} was chosen. It used a
|
||||
CommonJS format for modules. In order to get ease.js working client side, it
|
||||
would have to be wrapped in such a way that the code could remain unchanged
|
||||
and still operate the same. Furthermore, all tests written for the framework
|
||||
would have to run both server and client-side, ensuring a consistent
|
||||
experience on the server and across all supported browsers. Support would
|
||||
have to go as far back as Internet Explorer 6 to support legacy systems.
|
||||
|
||||
@item Performance
|
||||
Everyone knows that Object-Oriented programming incurs a performance hit in
|
||||
return for numerous benefits. ease.js is not magic; it too would incur a
|
||||
performance it. This hit must be low. Throughout the entire time the software is
|
||||
running, the hit must be low enough that it is insignificant (less than 1% of
|
||||
the total running time). This applies to any time the framework is used - from
|
||||
class creation to method invocation.
|
||||
performance it. This hit must be low. Throughout the entire time the
|
||||
software is running, the hit must be low enough that it is insignificant
|
||||
(less than 1% of the total running time). This applies to any time the
|
||||
framework is used - from class creation to method invocation.
|
||||
|
||||
@item Quality Design
|
||||
A quality design for the system is important for a number of reasons. This
|
||||
includes consistency with other languages and performance considerations. It
|
||||
must also be easily maintainable and extensible. Object-Oriented programming is
|
||||
all about @emph{restricting} what the developer can do. It is important to do so
|
||||
properly and ensure it is consistent with other languages. If something is
|
||||
inconsistent early on, and that inconsistency is adopted throughout a piece of
|
||||
software, fixing the inconsistency could potentially result in breaking the
|
||||
software.
|
||||
must also be easily maintainable and extensible. Object-Oriented programming
|
||||
is all about @emph{restricting} what the developer can do. It is important
|
||||
to do so properly and ensure it is consistent with other languages. If
|
||||
something is inconsistent early on, and that inconsistency is adopted
|
||||
throughout a piece of software, fixing the inconsistency could potentially
|
||||
result in breaking the software.
|
||||
|
||||
@item Heavily Tested
|
||||
The framework would be used to develop critical business applications. It needed
|
||||
to perform flawlessly. A bug could potentially introduce flaws into the entire
|
||||
system. Furthermore, bugs in the framework could create a debugging nightmare,
|
||||
with developers wondering if the flaw exists in their own software or the
|
||||
framework. This is a framework that would be very tightly coupled with the
|
||||
software built atop of it. In order to ensure production quality, the framework
|
||||
would have to be heavily tested. As such, a test-driven development cycle is
|
||||
preferred.
|
||||
The framework would be used to develop critical business applications. It
|
||||
needed to perform flawlessly. A bug could potentially introduce flaws into
|
||||
the entire system. Furthermore, bugs in the framework could create a
|
||||
debugging nightmare, with developers wondering if the flaw exists in their
|
||||
own software or the framework. This is a framework that would be very
|
||||
tightly coupled with the software built atop of it. In order to ensure
|
||||
production quality, the framework would have to be heavily tested. As such,
|
||||
a test-driven development cycle is preferred.
|
||||
|
||||
@item Well Documented
|
||||
The framework should be intuitive enough that documentation is generally
|
||||
unneeded, but in the event the developer does need help in implementing the
|
||||
framework in their own software, the help should be readily available. Wasting
|
||||
time attempting to figure out the framework is both frustrating and increases
|
||||
project cost.
|
||||
framework in their own software, the help should be readily available.
|
||||
Wasting time attempting to figure out the framework is both frustrating and
|
||||
increases project cost.
|
||||
|
||||
@end table
|
||||
|
||||
The above are the main factors taken into consideration when first developing
|
||||
ease.js. There were no existing frameworks that met all of the above criteria.
|
||||
Therefore, it was determined that ease.js was a valid project that addressed
|
||||
genuine needs for which there was no current, all-encompassing solution.
|
||||
|
||||
The above are the main factors taken into consideration when first
|
||||
developing ease.js. There were no existing frameworks that met all of the
|
||||
above criteria. Therefore, it was determined that ease.js was a valid
|
||||
project that addressed genuine needs for which there was no current,
|
||||
all-encompassing solution.
|
||||
|
|
1102
doc/classes.texi
1102
doc/classes.texi
File diff suppressed because it is too large
Load Diff
|
@ -27,7 +27,7 @@ body, .float-caption
|
|||
}
|
||||
|
||||
.float pre, var {
|
||||
font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Courier, monospace;
|
||||
font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', Courier, monospace;
|
||||
}
|
||||
|
||||
table {
|
|
@ -1,15 +1,24 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c This document is part of the GNU ease.js manual.
|
||||
@c Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
@c any later version published by the Free Software Foundation; with no
|
||||
@c Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled ``GNU Free
|
||||
@c Documentation License''.
|
||||
|
||||
@c %**start of header
|
||||
@setfilename manual.info
|
||||
@settitle ease.js Manual v@value{VERSION}
|
||||
@setfilename easejs.info
|
||||
@settitle GNU ease.js Manual v@value{VERSION}
|
||||
@c %**end of header
|
||||
|
||||
@include version.texi
|
||||
|
||||
@copying
|
||||
This manual is for ease.js, version @value{VERSION}.
|
||||
This manual is for GNU ease.js, version @value{VERSION}.
|
||||
|
||||
Copyright @copyright{} 2011 Mike Gerwitz.
|
||||
Copyright @copyright{} 2011, 2012, 2013, 2014 Mike Gerwitz.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
|
@ -24,7 +33,7 @@ Free Documentation License".
|
|||
|
||||
|
||||
@titlepage
|
||||
@title ease.js Manual v@value{VERSION}
|
||||
@title GNU ease.js Manual v@value{VERSION}
|
||||
@subtitle User & Developer Documentation
|
||||
@author Mike Gerwitz
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
,---------------------------------------, ,-----------------------------------,
|
||||
,-------------------------------------, ,---------------------------------,
|
||||
| Per Instance of C\_0 | | Per Instance of C\_1 |
|
||||
| | | |
|
||||
| ,---------, ,---------, ,---------, | | ,---------, ,---------, |
|
||||
|
@ -6,9 +6,9 @@
|
|||
| `---------` `---------` `---------` | | `---------` `---------` |
|
||||
| | | | | | | | |
|
||||
| | ,-------, | | | | ,-------, | |
|
||||
| `--------| P\_0 |--------` | | `------| P\_1 |------` |
|
||||
| `-------| P\_0 |-------` | | `-----| P\_1 |-----` |
|
||||
| `-------` | | `-------` |
|
||||
`-------------------|-------------------` `-----------------|-----------------`
|
||||
`------------------|------------------` `----------------|----------------`
|
||||
| |
|
||||
,-------, ,-------,
|
||||
| C\_0 | | C\_1 |
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,40 +1,41 @@
|
|||
@c This document is part of the ease.js manual
|
||||
@c Copyright (c) 2011 Mike Gerwitz
|
||||
@c This document is part of the GNU ease.js manual.
|
||||
@c Copyright (C) 2011, 2013, 2014 Mike Gerwitz
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
@c Texts. A copy of the license is included in the section entitled ``GNU
|
||||
@c Free Documentation License''.
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
@c any later version published by the Free Software Foundation; with no
|
||||
@c Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled ``GNU Free
|
||||
@c Documentation License''.
|
||||
|
||||
@node Integration
|
||||
@chapter Integrating ease.js
|
||||
@chapter Integrating GNU ease.js
|
||||
|
||||
Before diving into ease.js, let's take a moment to get you set up. How ease.js
|
||||
is integrated depends on how it is being used - on the server or in the client
|
||||
(web browser). You may also wish to build ease.js yourself rather than
|
||||
downloading pre-built packages. Depending on what you are doing, you may not
|
||||
have to build ease.js at all.
|
||||
Before diving into ease.js, let's take a moment to get you set up. How
|
||||
ease.js is integrated depends on how it is being used---on the server or in
|
||||
the client (web browser). You may also wish to build ease.js yourself rather
|
||||
than downloading pre-built packages. Depending on what you are doing, you
|
||||
may not have to build ease.js at all.
|
||||
|
||||
@menu
|
||||
* Getting ease.js:: How to get ease.js
|
||||
* Building:: How to build ease.js
|
||||
* Including:: Including ease.js in your own project
|
||||
* Getting GNU ease.js:: How to get GNU ease.js
|
||||
* Building:: How to build GNU ease.js
|
||||
* Including:: Including GNU ease.js in your own project
|
||||
@end menu
|
||||
|
||||
|
||||
@node Getting ease.js
|
||||
@section Getting ease.js
|
||||
@node Getting GNU ease.js
|
||||
@section Getting GNU ease.js
|
||||
If you simply want to use ease.js in your project, you may be interested in
|
||||
simply grabbing an archive (tarball, zip, etc), or installing through your
|
||||
favorite package manger. More information on those options will become available
|
||||
as ease.js nears its first release.
|
||||
favorite package manger. More information on those options will become
|
||||
available as ease.js nears its first release.
|
||||
|
||||
If you are interested in building ease.js, you need to get a hold of the source
|
||||
tree. Either download an archive (tarball, zip, etc), or clone the Git
|
||||
repository. We will do the latter in the example below. Feel free to clone from
|
||||
your favorite source.
|
||||
If you are interested in building ease.js, you need to get a hold of the
|
||||
source tree. Either download an archive (tarball, zip, etc), or clone the
|
||||
Git repository. We will do the latter in the example below. Feel free to
|
||||
clone from your favorite source.
|
||||
|
||||
@c TODO: Savannah
|
||||
@example
|
||||
# to clone from GitHub (do one or the other, not both)
|
||||
$ git clone git://github.com/mikegerwitz/easejs
|
||||
|
@ -52,11 +53,11 @@ Feel free to skip this section if you have no interest in building ease.js
|
|||
yourself. The build process is fast, and is unnecessary if using ease.js
|
||||
server-side.
|
||||
|
||||
First, we should clarify what the term ``build'' means in context of ease.js.
|
||||
JavaScript is compiled on the fly. That is, we don't actually need to compile it
|
||||
manually through a build process. So when we are talking about ``building''
|
||||
ease.js, we are not talking about compiling the source code. Rather, we are
|
||||
referring to any of the following:
|
||||
First, we should clarify what the term ``build'' means in context of
|
||||
ease.js. JavaScript is compiled on the fly. That is, we don't actually need
|
||||
to compile it manually through a build process. So when we are talking about
|
||||
``building'' ease.js, we are not talking about compiling the source code.
|
||||
Rather, we are referring to any of the following:
|
||||
|
||||
@itemize
|
||||
@item
|
||||
|
@ -66,49 +67,53 @@ Prepare the script for client-side deployment [and testing]
|
|||
Generate the documentation (manual and API)
|
||||
@end itemize
|
||||
|
||||
In fact, if you're using ease.js server-side with software such as Node.js, you
|
||||
do not need to build anything at all. You can simply begin using it.
|
||||
In fact, if you're using ease.js server-side with software such as Node.js,
|
||||
you do not need to build anything at all. You can simply begin using it.
|
||||
|
||||
The aforementioned are built using @command{make}. The process that is run will
|
||||
vary depending on your system. The command will read @file{Makefile} in the root
|
||||
directory and execute the associated command. The following are the targets
|
||||
available to you:
|
||||
The aforementioned are built using @command{make}. The process that is run
|
||||
will vary depending on your system. The command will read @file{Makefile} in
|
||||
the root directory and execute the associated command. The following are the
|
||||
targets available to you:
|
||||
|
||||
@table @command
|
||||
@item mkbuild
|
||||
Creates the @file{build/} directory, where all output will be stored. This is run
|
||||
automatically by any of the targets.
|
||||
Creates the @file{build/} directory, where all output will be stored. This
|
||||
is run automatically by any of the targets.
|
||||
|
||||
@item combine
|
||||
Runs the @command{combine} @ref{Tools Directory, tool} to produce two separate
|
||||
files: @file{ease.js}, which can be used to use ease.js within the web browser,
|
||||
and @file{ease-full.js}, which permits both using ease.js and running the unit
|
||||
tests within the browser. The output is stored in the @file{build/} directory.
|
||||
Runs the @command{combine} @ref{Tools Directory, tool} to produce two
|
||||
separate files: @file{ease.js}, which can be used to use ease.js within the
|
||||
web browser, and @file{ease-full.js}, which permits both using ease.js and
|
||||
running the unit tests within the browser. The output is stored in the
|
||||
@file{build/} directory.
|
||||
|
||||
The unit tests can be run by opening the @file{build/browser-test.html} file in your
|
||||
web browser.
|
||||
The unit tests can be run by opening the @file{build/browser-test.html} file
|
||||
in your web browser.
|
||||
|
||||
@item min
|
||||
Runs @command{combine} and minifies the resulting combined files. These files
|
||||
are output in the @file{build/} directory and are useful for distribution. It is
|
||||
recommended that you use the minified files in production.
|
||||
Runs @command{combine} and minifies the resulting combined files. These
|
||||
files are output in the @file{build/} directory and are useful for
|
||||
distribution. It is recommended that you use the minified files in
|
||||
production.
|
||||
|
||||
@item test
|
||||
Run unit tests. This will first perform the @command{combine} process and will
|
||||
also run the tests for the combined script, ensuring that it was properly
|
||||
combined.
|
||||
Run unit tests. This will first perform the @command{combine} process and
|
||||
will also run the tests for the combined script, ensuring that it was
|
||||
properly combined.
|
||||
|
||||
Unit tests will be covered later in the chapter.
|
||||
|
||||
@item doc
|
||||
Generates documentation. Currently, only the manual is build. API documentation
|
||||
will be added in the near future. The resulting documentation will be stored in
|
||||
@file{build/doc/}. For your convenience, the manual is output in the following
|
||||
forms: PDF, HTML (single page), HTML (multiple pages) and plain text.
|
||||
Generates documentation. Currently, only the manual is build. API
|
||||
documentation will be added in the near future. The resulting documentation
|
||||
will be stored in @file{build/doc/}. For your convenience, the manual is
|
||||
output in the following forms: PDF, HTML (single page), HTML (multiple
|
||||
pages) and plain text.
|
||||
|
||||
In order to build the documentation, you must have Texinfo installed. You likely
|
||||
also need LaTeX installed. If you are on a Debian-based system, for example, you
|
||||
will likely be able to run the following command to get started:
|
||||
In order to build the documentation, you must have Texinfo installed. You
|
||||
likely also need LaTeX installed. If you are on a Debian-based system, for
|
||||
example, you will likely be able to run the following command to get
|
||||
started:
|
||||
|
||||
@example
|
||||
$ sudo apt-get install texlive texinfo
|
||||
|
@ -116,8 +121,8 @@ will likely be able to run the following command to get started:
|
|||
|
||||
@item install
|
||||
Installs info documentation. Must first build @command{doc-info}. After
|
||||
installation, the manual may be viewed from the command line with: @samp{info
|
||||
easejs}.
|
||||
installation, the manual may be viewed from the command line with:
|
||||
@samp{info easejs}.
|
||||
|
||||
@item uninstall
|
||||
Removes everything from the system that was installed with @command{make
|
||||
|
@ -130,15 +135,15 @@ Runs all targets, except for clean, install and uninstall.
|
|||
Cleans up after the build process by removing the @file{build/} directory.
|
||||
@end table
|
||||
|
||||
If you do not want to build ease.js yourself, you are welcome to download the
|
||||
pre-built files.
|
||||
If you do not want to build ease.js yourself, you are welcome to download
|
||||
the pre-built files.
|
||||
|
||||
|
||||
@node Including
|
||||
@section Including ease.js In Your Projects
|
||||
Using ease.js in your projects should be quick and painless. We'll worry about
|
||||
the details of how to actually @emph{use} ease.js in a bit. For now, let's just
|
||||
worry about how to include it in your project.
|
||||
@section Including GNU ease.js In Your Projects
|
||||
Using ease.js in your projects should be quick and painless. We'll worry
|
||||
about the details of how to actually @emph{use} ease.js in a bit. For now,
|
||||
let's just worry about how to include it in your project.
|
||||
|
||||
@menu
|
||||
* Server-Side Include:: Including ease.js server-side
|
||||
|
@ -147,12 +152,13 @@ worry about how to include it in your project.
|
|||
|
||||
@node Server-Side Include
|
||||
@subsection Server-Side Include
|
||||
ease.js should work with any CommonJS-compliant system. The examples below have
|
||||
been tested with Node.js. Support is not guaranteed with any other software.
|
||||
ease.js should work with any CommonJS-compliant system. The examples below
|
||||
have been tested with Node.js. Support is not guaranteed with any other
|
||||
software.
|
||||
|
||||
Let's assume that you have installed ease.js somewhere that is accessible to
|
||||
@code{require.paths}. If you used a tool such as @command{npm}, this should have
|
||||
been done for you.
|
||||
@code{require.paths}. If you used a tool such as @command{npm}, this should
|
||||
have been done for you.
|
||||
|
||||
@float Figure, f:inc-serverside
|
||||
@verbatim
|
||||
|
@ -163,22 +169,24 @@ var easejs = require( 'easejs' );
|
|||
@end float
|
||||
|
||||
It's important to understand what exactly the above command is doing. We are
|
||||
including the @file{easejs/} directory (adjust your path as needed). Inside that
|
||||
directory is the @file{index.js} file, which is loaded. The exports of that
|
||||
module are returned and assigned to the @var{easejs} variable. We will discuss
|
||||
what to actually do with those exports later on.
|
||||
including the @file{easejs/} directory (adjust your path as needed). Inside
|
||||
that directory is the @file{index.js} file, which is loaded. The exports of
|
||||
that module are returned and assigned to the @var{easejs} variable. We will
|
||||
discuss what to actually do with those exports later on.
|
||||
|
||||
That's it. You should now have ease.js available to your project.
|
||||
|
||||
@node Client-Side Include
|
||||
@subsection Client-Side Include (Web Browser)
|
||||
ease.js can also be included in the web browser. Not only does this give you a
|
||||
powerful Object-Oriented framework client-side, but it also facilitates code
|
||||
reuse by permitting you to reuse your server-side code that depends on ease.js.
|
||||
ease.js can also be included in the web browser. Not only does this give you
|
||||
a powerful Object-Oriented framework client-side, but it also facilitates
|
||||
code reuse by permitting you to reuse your server-side code that depends on
|
||||
ease.js.
|
||||
|
||||
In order for ease.js to operate within the client, you must either download
|
||||
@file{ease.js} or @ref{Building, build it yourself}. Let's assume that you have
|
||||
placed @file{ease.js} within the @file{scripts/} directory of your web root.
|
||||
@file{ease.js} or @ref{Building, build it yourself}. Let's assume that you
|
||||
have placed @file{ease.js} within the @file{scripts/} directory of your web
|
||||
root.
|
||||
|
||||
@float Figure, f:inc-clientside
|
||||
@verbatim
|
||||
|
@ -191,10 +199,10 @@ placed @file{ease.js} within the @file{scripts/} directory of your web root.
|
|||
@caption{Including ease.js client-side}
|
||||
@end float
|
||||
|
||||
Likely, you only want the first one. The unit tests can more easily be run by
|
||||
loading @file{build/browser-test.html} in your web browser (@pxref{Building}).
|
||||
|
||||
The script will define a global @var{easejs} variable, which can be used exactly
|
||||
like the server-side @code{require()} (@pxref{Server-Side Include}). Keep that
|
||||
in mind when going through the examples in this manual.
|
||||
Likely, you only want the first one. The unit tests can more easily be run
|
||||
by loading @file{build/browser-test.html} in your web browser
|
||||
(@pxref{Building}).
|
||||
|
||||
The script will define a global @var{easejs} variable, which can be used
|
||||
exactly like the server-side @code{require()} (@pxref{Server-Side Include}).
|
||||
Keep that in mind when going through the examples in this manual.
|
||||
|
|
|
@ -39,12 +39,15 @@ jqueryCheck( function()
|
|||
$( document ).ready( function()
|
||||
{
|
||||
// syntax highlighting for code samples
|
||||
$( '.verbatim, .samp, .code, .example' ).each( function( i, element )
|
||||
$( '.verbatim, .samp, .code, .example' ).each(
|
||||
function( i, element )
|
||||
{
|
||||
hljs.highlightBlock( element, ' ' );
|
||||
} );
|
||||
}
|
||||
);
|
||||
|
||||
// quick-n-dirty sub and super script impl (it is by no means perfect)
|
||||
// quick-n-dirty sub and super script impl (it is by no means
|
||||
// perfect)
|
||||
$( 'var:contains("\\")' ).each( function()
|
||||
{
|
||||
var $this = $( this );
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
@uref{http://fsf.org/}
|
||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software
|
||||
Foundation, Inc. @uref{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
@ -122,9 +122,9 @@ A section ``Entitled XYZ'' means a named subunit of the Document whose
|
|||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as ``Acknowledgements'',
|
||||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section ``Entitled XYZ'' according to this definition.
|
||||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the
|
||||
Title'' of such a section when you modify the Document means that it remains
|
||||
a section ``Entitled XYZ'' according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
@c This document is part of the ease.js manual
|
||||
@c Copyright (c) 2011 Mike Gerwitz
|
||||
@c This document is part of the GNU ease.js manual.
|
||||
@c Copyright (C) 2011, 2013, 2014 Mike Gerwitz
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
@c Texts. A copy of the license is included in the section entitled ``GNU
|
||||
@c Free Documentation License''.
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
@c any later version published by the Free Software Foundation; with no
|
||||
@c Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled ``GNU Free
|
||||
@c Documentation License''.
|
||||
|
||||
@node Member Keywords
|
||||
@chapter Member Keywords
|
||||
Keywords are defined within the context of the @dfn{definition object}
|
||||
(@pxref{dfnobj,,Definition Object}). In the sections that follow, let @var{C}
|
||||
denote a class that contains the definition object @var{dfn}, which in turn
|
||||
contains @var{keywords} within the declaration of method @var{name}, whose
|
||||
definition is denoted by @var{value}.
|
||||
(@pxref{dfnobj,,Definition Object}). In the sections that follow, let
|
||||
@var{C} denote a class that contains the definition object @var{dfn}, which
|
||||
in turn contains @var{keywords} within the declaration of method @var{name},
|
||||
whose definition is denoted by @var{value}.
|
||||
|
||||
The table below summarizes the available keywords accepted by @var{keywords}.
|
||||
The table below summarizes the available keywords accepted by
|
||||
@var{keywords}.
|
||||
|
||||
@float Table, t:keywords
|
||||
@multitable @columnfractions .10 .90
|
||||
|
@ -24,37 +25,42 @@ The table below summarizes the available keywords accepted by @var{keywords}.
|
|||
@tab Places member @var{name} into the public API for @var{C} (@pxref{Access
|
||||
Modifiers}).
|
||||
@item @code{protected}
|
||||
@tab Places member @var{name} into the protected API for @var{C} (@pxref{Access
|
||||
Modifiers}).
|
||||
@tab Places member @var{name} into the protected API for @var{C}
|
||||
(@pxref{Access Modifiers}).
|
||||
@item @code{private}
|
||||
@tab Places member @var{name} into the private API for @var{C} (@pxref{Access
|
||||
Modifiers}).
|
||||
@tab Places member @var{name} into the private API for @var{C}
|
||||
(@pxref{Access Modifiers}).
|
||||
@item @code{static}
|
||||
@tab Binds member @var{name} to class @var{C} rather than instance of @var{C}.
|
||||
Member data shared with each instance of type @var{C}. @xref{Static Members}.
|
||||
@tab Binds member @var{name} to class @var{C} rather than instance of
|
||||
@var{C}. Member data shared with each instance of type @var{C}.
|
||||
@xref{Static Members}.
|
||||
@item @code{abstract}
|
||||
@tab Declares member @var{name} and defers definition to subtype. @var{value}
|
||||
is interpreted as an argument list and must be of type @code{array}. May only be
|
||||
used with methods. Member @var{name} must be part of @var{dfn} of either an
|
||||
@tab Declares member @var{name} and defers definition to subtype.
|
||||
@var{value} is interpreted as an argument list and must be of type
|
||||
@code{array}. May only be used with methods. Member @var{name} must be part
|
||||
of @var{dfn} of either an
|
||||
@code{Interface} or @code{AbstractClass}. @xref{Abstract Members}.
|
||||
@item @code{const}
|
||||
@tab Defines an immutable property @var{name}. May not be used with methods or
|
||||
getters/setters. @xref{Constants}.
|
||||
@tab Defines an immutable property @var{name}. May not be used with methods
|
||||
or getters/setters. @xref{Constants}.
|
||||
@item @code{virtual}
|
||||
@tab Declares that method @var{name} may be overridden by subtypes. Methods
|
||||
without this keyword may not be overridden. May only be used with methods.
|
||||
@xref{Inheritance}.
|
||||
@item @code{override}
|
||||
@tab Overrides method @var{name} of supertype of @var{C} with @var{value}. May
|
||||
only override virtual methods. May only be used with methods.
|
||||
@tab Overrides method @var{name} of supertype of @var{C} with @var{value}.
|
||||
May only override virtual methods. May only be used with methods.
|
||||
@xref{Inheritance}.
|
||||
@item @code{proxy}
|
||||
@tab Proxies calls to method @var{name} to the object stored in property
|
||||
@var{value}.
|
||||
@end multitable
|
||||
@caption{Supported keywords}
|
||||
@end float
|
||||
|
||||
Not all keywords are supported by each member and some keywords conflict with
|
||||
each other. More information can be found in the appropriate sections as
|
||||
mentioned above in @ref{t:keywords}.
|
||||
Not all keywords are supported by each member and some keywords conflict
|
||||
with each other. More information can be found in the appropriate sections
|
||||
as mentioned above in @ref{t:keywords}.
|
||||
|
||||
@menu
|
||||
* Access Modifiers:: Control the context in which members may be accessed
|
||||
|
@ -64,8 +70,9 @@ mentioned above in @ref{t:keywords}.
|
|||
@section Access Modifiers
|
||||
@dfn{Access modifiers}, when provided in @var{keywords}, alter the interface
|
||||
into which the definition of member @var{name} is placed. There are three
|
||||
interfaces, or levels of @dfn{visibility}, that dictate the context from which a
|
||||
member may be accessed, listed here from the most permissive to the least:
|
||||
interfaces, or levels of @dfn{visibility}, that dictate the context from
|
||||
which a member may be accessed, listed here from the most permissive to the
|
||||
least:
|
||||
|
||||
@table @dfn
|
||||
@item public
|
||||
|
@ -88,17 +95,17 @@ Not accessible outside of @var{C} or any instance of @var{C}. @emph{Not}
|
|||
@headitem Keyword @tab Description
|
||||
@item @code{public}
|
||||
@tab
|
||||
Places member @var{name} in public interface (accessible outside of @var{C} or
|
||||
instance of @var{C}; accessible by subtypes). Implied if no other access
|
||||
Places member @var{name} in public interface (accessible outside of @var{C}
|
||||
or instance of @var{C}; accessible by subtypes). Implied if no other access
|
||||
modifier is provided.
|
||||
@item @code{protected}
|
||||
@tab
|
||||
Places member @var{name} in protected interface (accessible only within @var{C}
|
||||
or instance of @var{C}; accessible by subtypes).
|
||||
Places member @var{name} in protected interface (accessible only within
|
||||
@var{C} or instance of @var{C}; accessible by subtypes).
|
||||
@item @code{private}
|
||||
@tab
|
||||
Places member @var{name} in private interface (accessible only within @var{C} or
|
||||
instance of @var{C}; not accessible by subtypes).
|
||||
Places member @var{name} in private interface (accessible only within
|
||||
@var{C} or instance of @var{C}; not accessible by subtypes).
|
||||
@end multitable
|
||||
@caption{Access modifiers}
|
||||
@end float
|
||||
|
@ -107,10 +114,11 @@ Access modifiers have the following properties:
|
|||
|
||||
@itemize
|
||||
@item
|
||||
Only one access modifier may appear in @var{keywords} for any given @var{name}.
|
||||
Only one access modifier may appear in @var{keywords} for any given
|
||||
@var{name}.
|
||||
@item
|
||||
If no access modifier is provided in @var{keywords} for any member @var{name},
|
||||
member @var{name} is implicitly @code{public}.
|
||||
If no access modifier is provided in @var{keywords} for any member
|
||||
@var{name}, member @var{name} is implicitly @code{public}.
|
||||
@end itemize
|
||||
|
||||
@menu
|
||||
|
@ -122,87 +130,92 @@ member @var{name} is implicitly @code{public}.
|
|||
@subsection Discussion
|
||||
One of the major hurdles ease.js aimed to address (indeed, one of the core
|
||||
reasons for its creation) was that of encapsulation. JavaScript's prototypal
|
||||
model provides limited means of encapsulating data. Since functions limit scope,
|
||||
they may be used to mimic private members; these are often referred to as
|
||||
@dfn{privileged members}. However, declaring classes in this manner tends be
|
||||
messy, which has the consequence of increasing maintenance costs and reducing
|
||||
the benefit of the implementation. ease.js aims to provide an elegant
|
||||
implementation that is both a pleasure to work with and able to support
|
||||
protected members.
|
||||
model provides limited means of encapsulating data. Since functions limit
|
||||
scope, they may be used to mimic private members; these are often referred
|
||||
to as @dfn{privileged members}. However, declaring classes in this manner
|
||||
tends be messy, which has the consequence of increasing maintenance costs
|
||||
and reducing the benefit of the implementation. ease.js aims to provide an
|
||||
elegant implementation that is both a pleasure to work with and able to
|
||||
support protected members.
|
||||
|
||||
By default, all members are public. This means that the members can be accessed
|
||||
and modified from within an instance as well as from outside of it. Subtypes
|
||||
(classes that inherit from it; @pxref{Inheritance}) will inherit public members.
|
||||
Public methods expose an API by which users may use your class. Public
|
||||
properties, however, should be less common in practice for a very important
|
||||
reason, which is explored throughout the remainder of this section.
|
||||
By default, all members are public. This means that the members can be
|
||||
accessed and modified from within an instance as well as from outside of it.
|
||||
Subtypes (classes that inherit from it; @pxref{Inheritance}) will inherit
|
||||
public members. Public methods expose an API by which users may use your
|
||||
class. Public properties, however, should be less common in practice for a
|
||||
very important reason, which is explored throughout the remainder of this
|
||||
section.
|
||||
|
||||
@anchor{Encapsulation}
|
||||
@subsubsection Encapsulation
|
||||
@dfn{Encapsulation} is the act of hiding information within a class or instance.
|
||||
Classes should be thought of black boxes; we want them to do their job, but we
|
||||
should not concern ourselves with @emph{how} they do their job. Encapsulation
|
||||
takes a great deal of complexity out of an implementation and allows the
|
||||
developer to focus on accomplishing the task by focusing on the implementing in
|
||||
terms of the problem domain.
|
||||
@dfn{Encapsulation} is the act of hiding information within a class or
|
||||
instance. Classes should be thought of black boxes; we want them to do
|
||||
their job, but we should not concern ourselves with @emph{how} they do their
|
||||
job. Encapsulation takes a great deal of complexity out of an implementation
|
||||
and allows the developer to focus on accomplishing the task by focusing on
|
||||
the implementing in terms of the problem domain.
|
||||
|
||||
For example - consider a class named @var{Dog} which has a method @code{walk()}.
|
||||
To walk a dog, we simply call @code{Dog().walk()}. The @code{walk()} method
|
||||
could be doing anything. In the case of a real dog, perhaps it will send a
|
||||
message to the dog's brain, perform the necessary processing to determine how
|
||||
that command should be handled and communicate the result to the limbs. The
|
||||
limbs will communicate back the information they receive from their nerves,
|
||||
which will be processed by the brain to determine when they hit the ground,
|
||||
thereby triggering additional actions and the further movement of the other
|
||||
legs. This could be a terribly complicated implementation if we had to worry
|
||||
about how all of this was done.
|
||||
For example - consider a class named @var{Dog} which has a method
|
||||
@code{walk()}. To walk a dog, we simply call @code{Dog().walk()}. The
|
||||
@code{walk()} method could be doing anything. In the case of a real dog,
|
||||
perhaps it will send a message to the dog's brain, perform the necessary
|
||||
processing to determine how that command should be handled and communicate
|
||||
the result to the limbs. The limbs will communicate back the information
|
||||
they receive from their nerves, which will be processed by the brain to
|
||||
determine when they hit the ground, thereby triggering additional actions
|
||||
and the further movement of the other legs. This could be a terribly
|
||||
complicated implementation if we had to worry about how all of this was
|
||||
done.
|
||||
|
||||
In addition to the actual walking algorithm, we have the state of each of the
|
||||
legs - their current position, their velocity, the state of each of the muscles,
|
||||
etc. This state pertains only to the operations performed by the dog. Exposing
|
||||
this state to everyone wouldn't be terribly useful. Indeed, if this information
|
||||
was exposed, it would complicate the implementation. What if someone decided to
|
||||
alter this state in the middle of a walking operation? Or what if the developer
|
||||
implementing @var{Dog} relied on this state in order to determine when the leg
|
||||
reached a certain position, but later versions of @var{Dog} decided to alter the
|
||||
algorithm, thereby changing those properties?
|
||||
In addition to the actual walking algorithm, we have the state of each of
|
||||
the legs - their current position, their velocity, the state of each of the
|
||||
muscles, etc. This state pertains only to the operations performed by the
|
||||
dog. Exposing this state to everyone wouldn't be terribly useful. Indeed, if
|
||||
this information was exposed, it would complicate the implementation. What
|
||||
if someone decided to alter this state in the middle of a walking operation?
|
||||
Or what if the developer implementing @var{Dog} relied on this state in
|
||||
order to determine when the leg reached a certain position, but later
|
||||
versions of @var{Dog} decided to alter the algorithm, thereby changing those
|
||||
properties?
|
||||
|
||||
By preventing these details from being exposed, we present the developer with a
|
||||
very simple interface@footnote{One would argue that this isn't necessary a good
|
||||
thing. What if additional flexibility was needed? @var{Dog}, in the sense of
|
||||
this example, can be thought of as a Facade (GoF). One could provide more
|
||||
flexibility by composing @var{Dog} of, say, @var{Leg} instances, a @var{Brain},
|
||||
etc. However, encapsulation still remains a factor. Each of those components
|
||||
would encapsulate their own data.}. Rather than the developer having to be
|
||||
concerned with moving each of the dog's legs, all they have to do is understand
|
||||
that the dog is being walked.
|
||||
By preventing these details from being exposed, we present the developer
|
||||
with a very simple interface@footnote{One would argue that this isn't
|
||||
necessary a good thing. What if additional flexibility was needed?
|
||||
@var{Dog}, in the sense of this example, can be thought of as a Facade
|
||||
(GoF). One could provide more flexibility by composing @var{Dog} of, say,
|
||||
@var{Leg} instances, a @var{Brain}, etc. However, encapsulation still
|
||||
remains a factor. Each of those components would encapsulate their own
|
||||
data.}. Rather than the developer having to be concerned with moving each of
|
||||
the dog's legs, all they have to do is understand that the dog is being
|
||||
walked.
|
||||
|
||||
When developing your classes, the following best practices should be kept in
|
||||
mind:
|
||||
|
||||
@itemize
|
||||
@item
|
||||
When attempting to determine the best access modifier (@pxref{Access Modifiers})
|
||||
to use for a member, start with the least level of visibility (@code{private})
|
||||
and work your way up if necessary.
|
||||
When attempting to determine the best access modifier (@pxref{Access
|
||||
Modifiers}) to use for a member, start with the least level of visibility
|
||||
(@code{private}) and work your way up if necessary.
|
||||
@item
|
||||
If your member is not private, be sure that you can justify your choice.
|
||||
@itemize
|
||||
@item
|
||||
If protected - why do subclasses need access to that data? Is there a better
|
||||
way to accomplish the same task without breaking encapsulation?
|
||||
If protected - why do subclasses need access to that data? Is there a
|
||||
better way to accomplish the same task without breaking encapsulation?
|
||||
@item
|
||||
If public - is this member necessary to use the class externally? In the case
|
||||
of a method - does it make sense to be part of a public API? If a property -
|
||||
why is that data not encapsulated? Should you consider an accessor method?
|
||||
If public - is this member necessary to use the class externally? In the
|
||||
case of a method - does it make sense to be part of a public API? If a
|
||||
property - why is that data not encapsulated? Should you consider an
|
||||
accessor method?
|
||||
@end itemize
|
||||
@end itemize
|
||||
|
||||
@node Access Modifiers Example
|
||||
@subsection Example
|
||||
Let's consider our @var{Dog} class in more detail. We will not go so far as to
|
||||
implement an entire nervous system in our example. Instead, let's think of our
|
||||
@var{Dog} similar to a wind-up toy:
|
||||
Let's consider our @var{Dog} class in more detail. We will not go so far as
|
||||
to implement an entire nervous system in our example. Instead, let's think
|
||||
of our @var{Dog} similar to a wind-up toy:
|
||||
|
||||
@float Figure, f:encapsulation
|
||||
@verbatim
|
||||
|
@ -254,23 +267,23 @@ Class( 'Dog',
|
|||
@end float
|
||||
|
||||
As you can see above, the act of making the dog move forward is a bit more
|
||||
complicated than the developer may have originally expected. The dog has four
|
||||
separate legs that need to be moved individually. The dog must also first stand
|
||||
before it can be walked, but it can only stand if it's sitting. Detailed tasks
|
||||
such as these occur all the time in classes, but they are hidden from the
|
||||
developer using the public API. The developer should not be concerned with all
|
||||
of the legs. Worrying about such details brings the developer outside of the
|
||||
problem domain and into a @emph{new} problem domain - how to get the dog to
|
||||
walk.
|
||||
complicated than the developer may have originally expected. The dog has
|
||||
four separate legs that need to be moved individually. The dog must also
|
||||
first stand before it can be walked, but it can only stand if it's sitting.
|
||||
Detailed tasks such as these occur all the time in classes, but they are
|
||||
hidden from the developer using the public API. The developer should not be
|
||||
concerned with all of the legs. Worrying about such details brings the
|
||||
developer outside of the problem domain and into a @emph{new} problem domain
|
||||
- how to get the dog to walk.
|
||||
|
||||
|
||||
@subsection Private Members
|
||||
Let's first explore private members. The majority of the members in the
|
||||
@var{Dog} class (@pxref{f:encapsulation,}) are private. This is the lowest level
|
||||
of visibility (and consequently the @emph{highest} level of encapsulation). By
|
||||
convention, we prefix private members with an underscore. Private members are
|
||||
available @emph{only to the class that defined it} and are not available outside
|
||||
the class.
|
||||
@var{Dog} class (@pxref{f:encapsulation,}) are private. This is the lowest
|
||||
level of visibility (and consequently the @emph{highest} level of
|
||||
encapsulation). By convention, we prefix private members with an underscore.
|
||||
Private members are available @emph{only to the class that defined it} and
|
||||
are not available outside the class.
|
||||
|
||||
@float Figure, f:encapsulation-call-priv
|
||||
@verbatim
|
||||
|
@ -283,16 +296,18 @@ the class.
|
|||
@end float
|
||||
|
||||
You will notice that the dog's legs are declared private as well
|
||||
(@pxref{f:encapsulation,}). This is to ensure we look at the dog as a whole; we
|
||||
don't care about what the dog is made up of. Legs, fur, tail, teeth, tongue, etc
|
||||
(@pxref{f:encapsulation,}). This is to ensure we look at the dog as a whole;
|
||||
we don't care about what the dog is made up of. Legs, fur, tail, teeth,
|
||||
tongue, etc
|
||||
- they are all irrelevant to our purpose. We just want to walk the dog.
|
||||
Encapsulating those details also ensures that they will not be tampered with,
|
||||
which will keep the dog in a consistent, predictable state.
|
||||
Encapsulating those details also ensures that they will not be tampered
|
||||
with, which will keep the dog in a consistent, predictable state.
|
||||
|
||||
Private members cannot be inherited. Let's say we want to make a class called
|
||||
@var{TwoLeggedDog} to represent a dog that was trained to walk only on two feet.
|
||||
We could approach this in a couple different ways. The first way would be to
|
||||
prevent the front legs from moving. What happens when we explore that approach:
|
||||
Private members cannot be inherited. Let's say we want to make a class
|
||||
called @var{TwoLeggedDog} to represent a dog that was trained to walk only
|
||||
on two feet. We could approach this in a couple different ways. The first
|
||||
way would be to prevent the front legs from moving. What happens when we
|
||||
explore that approach:
|
||||
|
||||
|
||||
@float Figure, f:encapsulation-inherit-priv
|
||||
|
@ -315,22 +330,22 @@ prevent the front legs from moving. What happens when we explore that approach:
|
|||
@end float
|
||||
|
||||
If you were to attempt to walk a @var{TwoLeggedDog}, you would find that
|
||||
@emph{the dog's front legs still move}! This is because, as mentioned before,
|
||||
private methods are not inherited. Rather than overriding the parent's
|
||||
@var{_moveFrontLeg} method, you are instead @emph{defining a new method}, with
|
||||
the name @var{_moveFrontLeg}. The old method will still be called. Instead, we
|
||||
would have to override the public @var{walk} method to prevent our dog from
|
||||
moving his front feet.
|
||||
@emph{the dog's front legs still move}! This is because, as mentioned
|
||||
before, private methods are not inherited. Rather than overriding the
|
||||
parent's @var{_moveFrontLeg} method, you are instead @emph{defining a new
|
||||
method}, with the name @var{_moveFrontLeg}. The old method will still be
|
||||
called. Instead, we would have to override the public @var{walk} method to
|
||||
prevent our dog from moving his front feet.
|
||||
|
||||
@subsection Protected Members
|
||||
Protected members are often misunderstood. Many developers will declare all
|
||||
of their members as either public or protected under the misconception that they
|
||||
may as well allow subclasses to override whatever functionality they want. This
|
||||
makes the class more flexible.
|
||||
of their members as either public or protected under the misconception that
|
||||
they may as well allow subclasses to override whatever functionality they
|
||||
want. This makes the class more flexible.
|
||||
|
||||
While it is true that the class becomes more flexible to work with for subtypes,
|
||||
this is a dangerous practice. In fact, doing so @emph{violates encapsulation}.
|
||||
Let's reconsider the levels of visibility in this manner:
|
||||
While it is true that the class becomes more flexible to work with for
|
||||
subtypes, this is a dangerous practice. In fact, doing so @emph{violates
|
||||
encapsulation}. Let's reconsider the levels of visibility in this manner:
|
||||
|
||||
@table @strong
|
||||
@item public
|
||||
|
@ -344,19 +359,20 @@ Provides an API for @emph{the class itself}.
|
|||
@end table
|
||||
|
||||
Just as we want to hide data from the public API, we want to do the same for
|
||||
subtypes. If we simply expose all members to any subclass that comes by, that
|
||||
acts as a peephole in our black box. We don't want people spying into our
|
||||
internals. Subtypes shouldn't care about the dog's implementation either.
|
||||
subtypes. If we simply expose all members to any subclass that comes by,
|
||||
that acts as a peephole in our black box. We don't want people spying into
|
||||
our internals. Subtypes shouldn't care about the dog's implementation
|
||||
either.
|
||||
|
||||
Private members should be used whenever possible, unless you are looking to
|
||||
provide subtypes with the ability to access or override methods. In that case,
|
||||
we can move up to try protected members. Remember not to make a member public
|
||||
unless you wish it to be accessible to the entire world.
|
||||
provide subtypes with the ability to access or override methods. In that
|
||||
case, we can move up to try protected members. Remember not to make a
|
||||
member public unless you wish it to be accessible to the entire world.
|
||||
|
||||
@var{Dog} (@pxref{f:encapsulation,}) defined a single method as protected -
|
||||
@code{stand()}. Because the method is protected, it can be inherited by
|
||||
subtypes. Since it is inherited, it may also be overridden. Let's define another
|
||||
subtype, @var{LazyDog}, which refuses to stand.
|
||||
subtypes. Since it is inherited, it may also be overridden. Let's define
|
||||
another subtype, @var{LazyDog}, which refuses to stand.
|
||||
|
||||
@float Figure, f:encapsulation-inherit-prot
|
||||
@verbatim
|
||||
|
@ -378,19 +394,19 @@ subtype, @var{LazyDog}, which refuses to stand.
|
|||
@caption{Protected members are inherited by subtypes}
|
||||
@end float
|
||||
|
||||
There are a couple important things to be noted from the above example. Firstly,
|
||||
we are able to override the @code{walk()} method, because it was inherited.
|
||||
Secondly, since @code{rollOver()} was also inherited from the parent, we are
|
||||
able to call that method, resulting in an upside-down dog that refuses to stand
|
||||
up, just moving his feet.
|
||||
There are a couple important things to be noted from the above example.
|
||||
Firstly, we are able to override the @code{walk()} method, because it was
|
||||
inherited. Secondly, since @code{rollOver()} was also inherited from the
|
||||
parent, we are able to call that method, resulting in an upside-down dog
|
||||
that refuses to stand up, just moving his feet.
|
||||
|
||||
Another important detail to notice is that @code{Dog.rollOver()} accesses a
|
||||
private property of @var{Dog} -- @var{_body}. Our subclass does not have access
|
||||
to that variable. Since it is private, it was not inherited. However, since the
|
||||
@code{rollOver()} method is called within the context of the @var{Dog} class,
|
||||
the @emph{method} has access to the private member, allowing our dog to
|
||||
successfully roll over. If, on the other hand, we were to override
|
||||
@code{rollOver()}, our code would @emph{not} have access to that private object.
|
||||
Calling @samp{this.__super()} from within the overridden method would, however,
|
||||
call the parent method, which would again have access to its parent's private
|
||||
members.
|
||||
private property of @var{Dog} -- @var{_body}. Our subclass does not have
|
||||
access to that variable. Since it is private, it was not inherited. However,
|
||||
since the @code{rollOver()} method is called within the context of the
|
||||
@var{Dog} class, the @emph{method} has access to the private member,
|
||||
allowing our dog to successfully roll over. If, on the other hand, we were
|
||||
to override @code{rollOver()}, our code would @emph{not} have access to that
|
||||
private object. Calling @samp{this.__super()} from within the overridden
|
||||
method would, however, call the parent method, which would again have access
|
||||
to its parent's private members.
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
@c This document is part of the ease.js manual
|
||||
@c Copyright (c) 2011 Mike Gerwitz
|
||||
@c This document is part of the GNU ease.js manual.
|
||||
@c Copyright (C) 2011, 2013, 2014 Mike Gerwitz
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
@c Texts. A copy of the license is included in the section entitled ``GNU
|
||||
@c Free Documentation License''.
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
@c any later version published by the Free Software Foundation; with no
|
||||
@c Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled ``GNU Free
|
||||
@c Documentation License''.
|
||||
|
||||
@node Source Tree
|
||||
@appendix Source Tree
|
||||
You should already have gotten a hold of the source tree
|
||||
(@pxref{Getting ease.js}). If not, please do so first and feel free to follow
|
||||
along.
|
||||
(@pxref{Getting GNU ease.js}). If not, please do so first and feel free to
|
||||
follow along.
|
||||
|
||||
@example
|
||||
$ cd easejs
|
||||
|
@ -19,7 +19,8 @@ along.
|
|||
doc/ lib/ test/ tools/
|
||||
@end example
|
||||
|
||||
The project contains four main directories in addition to the root directory:
|
||||
The project contains four main directories in addition to the root
|
||||
directory:
|
||||
|
||||
@table @file
|
||||
@item ./
|
||||
|
@ -27,8 +28,8 @@ The root directory contains basic project files, such as @file{README},
|
|||
@file{Makefile} and @file{index.js}.
|
||||
|
||||
@item doc/
|
||||
Contains documentation source files (you are currently reading part of it - the
|
||||
manual).
|
||||
Contains documentation source files (you are currently reading part of it -
|
||||
the manual).
|
||||
|
||||
@item lib/
|
||||
Contains the actual source code for the various modules.
|
||||
|
@ -65,20 +66,21 @@ Contains the project license.
|
|||
Invoked by the @command{make} command. Used for building ease.js.
|
||||
|
||||
@item package.json
|
||||
Used by @command{npm}, a package manager for Node.js, to automate installation.
|
||||
Used by @command{npm}, a package manager for Node.js, to automate
|
||||
installation.
|
||||
|
||||
@item README.hacking
|
||||
Useful information for those looking to modify/contribute to the project.
|
||||
|
||||
@item README.md
|
||||
Serves as a quick reference for the project, in markdown@footnote{See
|
||||
@uref{http://en.wikipedia.org/wiki/Markdown}.} format. This format was chosen
|
||||
because it is displayed nicely on GitHub.
|
||||
@uref{http://en.wikipedia.org/wiki/Markdown}.} format. This format was
|
||||
chosen because it is displayed nicely on GitHub.
|
||||
|
||||
@item README.todo
|
||||
Incomplete tasks. Future direction of the project. If you're looking to help
|
||||
out, take a look at this file to see what needs to be done. (See also the bug
|
||||
tracker at @uref{http://easejs.org/bugs}).
|
||||
out, take a look at this file to see what needs to be done. (See also the
|
||||
bug tracker at @uref{http://easejs.org/bugs}).
|
||||
@end table
|
||||
|
||||
These files will be discussed in further detail when they are actually used.
|
||||
|
@ -86,51 +88,53 @@ These files will be discussed in further detail when they are actually used.
|
|||
|
||||
@node Doc Directory
|
||||
@section Doc Directory
|
||||
The @file{doc/} directory contains the source files for the manual. The source
|
||||
files are in Texinfo@footnote{See @uref{http://www.gnu.org/software/texinfo/}.}
|
||||
format. Instructions for compiling the documentation are included later in this
|
||||
chapter.
|
||||
The @file{doc/} directory contains the source files for the manual. The
|
||||
source files are in Texinfo@footnote{See
|
||||
@uref{http://www.gnu.org/software/texinfo/}.} format. Instructions for
|
||||
compiling the documentation are included later in this chapter.
|
||||
|
||||
API documentation is @emph{not} included in this directory. It is generated from
|
||||
the source code.
|
||||
API documentation is @emph{not} included in this directory. It is generated
|
||||
from the source code.
|
||||
|
||||
|
||||
@node Lib Directory
|
||||
@section Lib Directory
|
||||
The @file{lib/} directory contains the source code for the project. Each source
|
||||
file represents a single CommonJS module, often containing a prototype, and is
|
||||
written in JavaScript. Additional information about each of the modules can be
|
||||
found in the header of each file.
|
||||
The @file{lib/} directory contains the source code for the project. Each
|
||||
source file represents a single CommonJS module, often containing a
|
||||
prototype, and is written in JavaScript. Additional information about each
|
||||
of the modules can be found in the header of each file.
|
||||
|
||||
Unless you are developing for ease.js, you needn't concern yourself with these
|
||||
files. @file{index.js}, in the root directory, contains mappings to these files
|
||||
where necessary, exposing the useful portions of the API for general use. You
|
||||
can use ease.js without even recognizing that the @file{lib/} directory even
|
||||
exists.
|
||||
Unless you are developing for ease.js, you needn't concern yourself with
|
||||
these files. @file{index.js}, in the root directory, contains mappings to
|
||||
these files where necessary, exposing the useful portions of the API for
|
||||
general use. You can use ease.js without even recognizing that the
|
||||
@file{lib/} directory even exists.
|
||||
|
||||
|
||||
@node Test Directory
|
||||
@section Test Directory
|
||||
The @file{test/} directory contains all the unit tests for the project. ease.js
|
||||
follows a test-driven development model; every single aspect of the framework is
|
||||
tested to ensure that features work as intended both server-side and across all
|
||||
supported web browsers. The tests also serve as regression tests, ensuring that
|
||||
bugs are not introduced for anything that has been covered. These tests should
|
||||
also give outside developers confidence; if a developer makes a modification to
|
||||
ease.js and does not cause any failing tests, it's likely that their change
|
||||
didn't have negative consequences on the integrity of the framework.
|
||||
The @file{test/} directory contains all the unit tests for the project.
|
||||
ease.js follows a test-driven development model; every single aspect of the
|
||||
framework is tested to ensure that features work as intended both
|
||||
server-side and across all supported web browsers. The tests also serve as
|
||||
regression tests, ensuring that bugs are not introduced for anything that
|
||||
has been covered. These tests should also give outside developers
|
||||
confidence; if a developer makes a modification to ease.js and does not
|
||||
cause any failing tests, it's likely that their change didn't have negative
|
||||
consequences on the integrity of the framework.
|
||||
|
||||
ease.js is currently in a transition period in regards to the style of the test
|
||||
cases. Tests written in the original format are prefixed with @samp{test-},
|
||||
followed by the name of the module, followed optionally by the specific part of
|
||||
the module that is being tested. Newer test cases are prefixed with the
|
||||
prototype name of the unit being tested, followed by @samp{Test.js}. If there
|
||||
are a number of test cases for a given prototype, any number of tests will be
|
||||
included (with the same suffix) in a directory with the same name as the
|
||||
prototype. The tests are written in JavaScript and use Node.js's @file{assert}
|
||||
module. Newer tests use a test case system that was developed to suit the needs
|
||||
of the project (still using the @file{assert} module). They may be run
|
||||
individually or all at once during the build process.
|
||||
ease.js is currently in a transition period in regards to the style of the
|
||||
test cases. Tests written in the original format are prefixed with
|
||||
@samp{test-}, followed by the name of the module, followed optionally by the
|
||||
specific part of the module that is being tested. Newer test cases are
|
||||
prefixed with the prototype name of the unit being tested, followed by
|
||||
@samp{Test.js}. If there are a number of test cases for a given prototype,
|
||||
any number of tests will be included (with the same suffix) in a directory
|
||||
with the same name as the prototype. The tests are written in JavaScript and
|
||||
use Node.js's @file{assert} module. Newer tests use a test case system that
|
||||
was developed to suit the needs of the project (still using the
|
||||
@file{assert} module). They may be run individually or all at once during
|
||||
the build process.
|
||||
|
||||
Developers interested in contributing to ease.js can aid in this transition
|
||||
process by helping to move all @file{test-*} tests over to the new test case
|
||||
|
@ -142,26 +146,27 @@ performance tests used for benchmarking.
|
|||
|
||||
@node Tools Directory
|
||||
@section Tools Directory
|
||||
The @file{tools/} directory contains scripts and data necessary for the build
|
||||
process. The tools are shell scripts that may be run independently of the build
|
||||
process if you find them to be useful. The remaining files are data to accompany
|
||||
those tools.
|
||||
The @file{tools/} directory contains scripts and data necessary for the
|
||||
build process. The tools are shell scripts that may be run independently of
|
||||
the build process if you find them to be useful. The remaining files are
|
||||
data to accompany those tools.
|
||||
|
||||
@table @file
|
||||
@item combine
|
||||
Concatenates all the modules and wraps them for client-side deployment. If
|
||||
requested, the tests are also wrapped and concatenated so that they may be run
|
||||
in the web browser. The contents are stripped of trailing commas using the
|
||||
@command{rmtrail} tool. The resulting file is @emph{not} minified; the user can
|
||||
use whatever process he/she wishes to do so. In the future, minification will be
|
||||
part of the build script.
|
||||
requested, the tests are also wrapped and concatenated so that they may be
|
||||
run in the web browser. The contents are stripped of trailing commas using
|
||||
the @command{rmtrail} tool. The resulting file is @emph{not} minified; the
|
||||
user can use whatever process he/she wishes to do so. In the future,
|
||||
minification will be part of the build script.
|
||||
|
||||
@item rmtrail
|
||||
Removes trailing commas from object and array definitions. Reads from standard
|
||||
in. @emph{This script is not intelligent.} It was designed to work with ease.js.
|
||||
It does not, for example, check to ensure that it is not removing commas from
|
||||
within strings. This would not be a difficult addition, but is currently
|
||||
unnecessary. Use caution when using this tool outside of ease.js.
|
||||
Removes trailing commas from object and array definitions. Reads from
|
||||
standard in. @emph{This script is not intelligent.} It was designed to work
|
||||
with ease.js. It does not, for example, check to ensure that it is not
|
||||
removing commas from within strings. This would not be a difficult addition,
|
||||
but is currently unnecessary. Use caution when using this tool outside of
|
||||
ease.js.
|
||||
|
||||
@item minify.js
|
||||
Responsible for receiving input from stdin and writing minified output to
|
||||
|
@ -169,33 +174,31 @@ stdout. This script uses UglifyJS to minify source files for distribution,
|
|||
improving download times.
|
||||
|
||||
@item browser-test.html
|
||||
Skeleton page to be used after the build process. Runs ease.js unit tests in the
|
||||
web browser and reports any failures. This is very important to ensure that
|
||||
ease.js operates consistently between all supported browsers. The tests that are
|
||||
run are the same exact tests that are run server-side.
|
||||
Skeleton page to be used after the build process. Runs ease.js unit tests in
|
||||
the web browser and reports any failures. This is very important to ensure
|
||||
that ease.js operates consistently between all supported browsers. The tests
|
||||
that are run are the same exact tests that are run server-side.
|
||||
|
||||
@item combine-test.tpl
|
||||
Contains a client-side implementation of any modules required for testing. This
|
||||
file contains mainly assertions. It is included by the @command{combine} script
|
||||
when tests are requested.
|
||||
Contains a client-side implementation of any modules required for testing.
|
||||
This file contains mainly assertions. It is included by the
|
||||
@command{combine} script when tests are requested.
|
||||
|
||||
@item combine.tpl
|
||||
Contains the basic functionality required to get CommonJS modules working
|
||||
client-side. This is a very basic implementation, only doing what is necessary
|
||||
for ease.js to work properly. It is not meant to be a solution for all of your
|
||||
client-side CommonJS problems.
|
||||
client-side. This is a very basic implementation, only doing what is
|
||||
necessary for ease.js to work properly. It is not meant to be a solution for
|
||||
all of your client-side CommonJS problems.
|
||||
|
||||
@item license.tpl
|
||||
Contains the license that is to appear atop every combined file, including
|
||||
minified. The original text must remain in tact. If you make changes to the
|
||||
source code, you are welcome to add additional text. See the @file{LICENSE} file
|
||||
in the root directory for more information on what is permitted.
|
||||
source code, you are welcome to add additional text. See the @file{LICENSE}
|
||||
file in the root directory for more information on what is permitted.
|
||||
@end table
|
||||
|
||||
While the tools may be useful outside of ease.js in some regard, please note
|
||||
that they have been tailored especially for ease.js. They do not contain
|
||||
unnecessary features that ease.js does not need to make use of. Therefore, you
|
||||
may need to adapt them to your own project and individual needs should you
|
||||
decide to use them in your own projects.
|
||||
|
||||
|
||||
unnecessary features that ease.js does not need to make use of. Therefore,
|
||||
you may need to adapt them to your own project and individual needs should
|
||||
you decide to use them in your own projects.
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
@c DO NOT MODIFY; generated by verset (not autoconf)
|
||||
@set VERSION 0.2.0-dev
|
24
index.js
24
index.js
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Provides ease of access to all submodules
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
exports.Class = require( __dirname + '/lib/class' );
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
/**
|
||||
* Handles building of classes
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*
|
||||
* TODO: This module is currently being tested /indirectly/ by the class tests.
|
||||
* This is because of a refactoring. All of this logic used to be part of
|
||||
* the class module. Test this module directly, but keep the existing
|
||||
* class tests in tact for a higher-level test.
|
||||
* TODO: This module is currently being tested /indirectly/ by the class
|
||||
* tests. This is because of a refactoring. All of this logic used to
|
||||
* be part of the class module. Test this module directly, but keep
|
||||
* the existing class tests in tact for a higher-level test.
|
||||
*/
|
||||
|
||||
var util = require( __dirname + '/util' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Handles building members (properties, methods) in a pre-ES5 environment
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Contains fallback visibility object factory
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Initializes fallback visibility object factory
|
||||
*
|
||||
|
|
|
@ -1,34 +1,32 @@
|
|||
/**
|
||||
* Handles building members (properties, methods)
|
||||
*
|
||||
* This prototype could have easily been refactored into a number of others
|
||||
* (e.g. one for each type of member), but that refactoring has been deferred
|
||||
* until necessary to ensure ease.js maintains a relatively small footprint.
|
||||
* Ultimately, however, such a decision is a micro-optimization and shouldn't
|
||||
* harm the design and maintainability of the software.
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* TODO: Implementation is inconsistent between various members. For example,
|
||||
* methods use ___$$keywords$$, whereas properties use [ val, keywords ]. Decide
|
||||
* on a common format.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
* This prototype could have easily been refactored into a number of others
|
||||
* (e.g. one for each type of member), but that refactoring has been
|
||||
* deferred until necessary to ensure ease.js maintains a relatively small
|
||||
* footprint. Ultimately, however, such a decision is a micro-optimization
|
||||
* and shouldn't harm the design and maintainability of the software.
|
||||
*
|
||||
* TODO: Implementation is inconsistent between various members. For
|
||||
* example, methods use ___$$keywords$$, whereas properties use [ val,
|
||||
* keywords ]. Decide on a common format.
|
||||
*/
|
||||
|
||||
var util = require( __dirname + '/util' ),
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Validation rules for members
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
module.exports = exports = function MemberBuilderValidator( warn_handler )
|
||||
{
|
||||
// permit omitting 'new' keyword
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Builds method wrappers
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Initializes factory to wrap methods
|
||||
*
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Default method wrapper functions
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Contains visibility object factory
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,28 +1,25 @@
|
|||
/**
|
||||
* Contains factory for visibility object factory
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
* @package core
|
||||
*
|
||||
* XXX: Figure out how to resolve Closure Compiler's warning about shared type
|
||||
* information
|
||||
* XXX: Figure out how to resolve Closure Compiler's warning about shared
|
||||
* type information
|
||||
*/
|
||||
|
||||
// XXX: Tightly coupled
|
||||
|
|
24
lib/class.js
24
lib/class.js
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Contains basic inheritance mechanism
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var util = require( __dirname + '/util' ),
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
/**
|
||||
* Wrapper permitting the definition of abstract classes
|
||||
*
|
||||
* This doesn't actually introduce any new functionality. Rather, it sets a flag
|
||||
* to allow abstract methods within a class, forcing users to clearly state
|
||||
* that a class is abstract.
|
||||
* This doesn't actually introduce any new functionality. Rather, it sets a
|
||||
* flag to allow abstract methods within a class, forcing users to clearly
|
||||
* state that a class is abstract.
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var Class = require( __dirname + '/class' );
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Wrapper permitting the definition of final classes
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var Class = require( __dirname + '/class' );
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Contains interface module
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var util = require( __dirname + '/util' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Property keyword parser module
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
26
lib/util.js
26
lib/util.js
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Contains utilities functions shared by modules
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var propParseKeywords = require( __dirname + '/prop_parser' ).parseKeywords;
|
||||
|
@ -554,8 +552,6 @@ exports.getPropertyDescriptor = function( obj, prop, nobase )
|
|||
/**
|
||||
* Indicates whether or not the getPropertyDescriptor method is capable of
|
||||
* traversing the prototype chain
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
exports.defineSecureProp( exports.getPropertyDescriptor, 'canTraverse',
|
||||
( Object.getPrototypeOf ) ? true : false
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/**
|
||||
* Provides version information
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/*** DO NOT MODIFY; generated by verset ***/
|
||||
|
||||
var major = 0,
|
||||
minor = 2,
|
||||
rev = 0,
|
||||
suffix = 'dev',
|
||||
|
||||
version = [ major, minor, rev, suffix ];
|
||||
|
||||
version.major = major;
|
||||
version.minor = minor;
|
||||
version.rev = rev;
|
||||
version.suffix = suffix;
|
||||
|
||||
version.toString = function()
|
||||
{
|
||||
return this.join( '.' )
|
||||
.replace( /\.([^.]+)$/, '-$1' )
|
||||
.replace( /-$/, '' );
|
||||
};
|
||||
|
||||
module.exports = version;
|
|
@ -1,28 +1,26 @@
|
|||
/**
|
||||
* Provides version information
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/*** DO NOT MODIFY; generated by verset ***/
|
||||
|
||||
var major = @MAJOR@,
|
||||
minor = @MINOR@,
|
||||
rev = @REV@,
|
24
lib/warn.js
24
lib/warn.js
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* ease.js warning system
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "easejs",
|
||||
"description": "A Classical Object-Oriented Framework for JavaScript",
|
||||
"version": "0.1.0",
|
||||
"version": "@VERSION@",
|
||||
"author": "Mike Gerwitz <mike@mikegerwitz.com> (http://mikegerwitz.com)",
|
||||
"homepage": "http://easejs.org",
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
|||
|
||||
"licenses": [
|
||||
{
|
||||
"type": "LGPLv3+",
|
||||
"url": "http://www.gnu.org/licenses/lgpl.html"
|
||||
"type": "GPLv3+",
|
||||
"url": "http://www.gnu.org/licenses/gpl.html"
|
||||
}
|
||||
],
|
||||
|
|
@ -3,24 +3,22 @@
|
|||
*
|
||||
* Note that this test case can also be run in an ES5 environment.
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
require( './common' ).testCase(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests fallback visibility object factory
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
require( 'common' ).testCase(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests extending of interfaces
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( 'common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests interfaces
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
require( 'common' ).testCase(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests MemberBuilder getter/setter builder
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( 'common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests method builder
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var shared = require( __dirname + '/inc-common' );
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests MemberBuilder property builder
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var shared = require( __dirname + '/inc-common' );
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests visibility portion of member builder
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
// get-set-test (supported)
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Shared functions for MemberBuilder tests
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,24 +4,22 @@
|
|||
* These tests can be run in a pre-ES5 environment since they do not deal with
|
||||
* actual getters/setters; they deal only with the data associated with them.
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var shared = require( __dirname + '/inc-common' );
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests member builder validation rules
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var shared = require( __dirname + '/inc-common' );
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests member builder validation rules
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var shared = require( __dirname + '/inc-common' );
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Shared functions for MemberBuilderValidator tests
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Member name to be used in tests
|
||||
* @type {string}
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Tests MethodWrapperFactory prototype
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
require( 'common' ).testCase(
|
||||
{
|
||||
caseSetUp: function()
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests method sut
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
require( 'common' ).testCase(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests version.js
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
require( 'common' ).testCase(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests factory for visibility object factory
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
require( 'common' ).testCase(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests visibility object factory
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
require( 'common' ).testCase(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Common paths for testing
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Simple X-Unit-style test cases
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var assert = require( 'assert' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Common performance testing functionality
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,26 +2,23 @@
|
|||
* Tests amount of time taken to declare 1000 classes with a few members,
|
||||
* private keyword
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
* This file is part of GNU ease.js.
|
||||
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
|
|
@ -2,27 +2,24 @@
|
|||
* Tests amount of time taken to declare 1000 classes with a few members,
|
||||
* protected keyword
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -2,27 +2,24 @@
|
|||
* Tests amount of time taken to declare 1000 classes with a few members, public
|
||||
* keyword
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -2,27 +2,24 @@
|
|||
* Tests amount of time taken to declare 1000 classes with a few members, no
|
||||
* keywords
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Tests amount of time taken to declare 1000 classes
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -2,26 +2,23 @@
|
|||
* Tests amount of time taken to declare 1000 classes with a few properties,
|
||||
* private keyword
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
* This file is part of GNU ease.js.
|
||||
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
|
|
@ -2,26 +2,23 @@
|
|||
* Tests amount of time taken to declare 1000 classes with a few properties,
|
||||
* protected keyword
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
* This file is part of GNU ease.js.
|
||||
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
|
|
@ -2,27 +2,24 @@
|
|||
* Tests amount of time taken to declare 1000 classes with a few properties,
|
||||
* public keyword
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -2,27 +2,24 @@
|
|||
* Tests amount of time taken to declare 1000 classes with few properties, no
|
||||
* keywords
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Tests amount of time taken to declare 1000 classes
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -2,26 +2,23 @@
|
|||
* Tests amount of time taken to declare read properties internally and
|
||||
* externally
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
* This file is part of GNU ease.js.
|
||||
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' ),
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Tests amount of time taken to instantiate anonymous classes
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Tests amount of time taken to instantiate named classes
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' )
|
||||
|
||||
|
|
|
@ -18,27 +18,24 @@
|
|||
* will remove this performance hit if the Class contains no private
|
||||
* members.
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' ),
|
||||
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
/**
|
||||
* Tests amount of time spent on requiring class module
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' );
|
||||
|
||||
// we run this test once because require() will cache the object in memory
|
||||
|
|
|
@ -2,27 +2,24 @@
|
|||
* Tests amount of time taken to declare read properties internally and
|
||||
* externally
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
|
||||
var common = require( __dirname + '/common.js' ),
|
||||
Class = common.require( 'class' ),
|
||||
|
||||
|
|
|
@ -4,24 +4,22 @@
|
|||
* This script must be fed the tests to be run as arguments, one test case per
|
||||
* argument. All test cases should use common.testCase().
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( 'common' );
|
||||
|
@ -40,7 +38,7 @@ process.argv.forEach( function( val, i )
|
|||
}
|
||||
|
||||
// the tests will run themselves; we need only require 'em
|
||||
require( __dirname + '/' + val );
|
||||
require( val );
|
||||
} );
|
||||
|
||||
// output statistics
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests abstract classes
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class module constructor creation
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class module extend() method
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class getter/setter inheritance
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class interface implement method
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class naming
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class parent invocation
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
@ -48,7 +46,7 @@ var common = require( './common' ),
|
|||
return this;
|
||||
},
|
||||
|
||||
'virtual double': function()
|
||||
'virtual dbl': function()
|
||||
{
|
||||
hitDouble = true;
|
||||
}
|
||||
|
@ -66,7 +64,7 @@ var common = require( './common' ),
|
|||
return this.__super( arg );
|
||||
},
|
||||
|
||||
'override double': function()
|
||||
'override dbl': function()
|
||||
{
|
||||
this.myMethod();
|
||||
this.__super();
|
||||
|
@ -95,7 +93,7 @@ assert.equal(
|
|||
hitMethod = hitMethod2 = false;
|
||||
|
||||
var arg = 'foobar';
|
||||
sub_foo.myMethod().myMethod2( arg ).double();
|
||||
sub_foo.myMethod().myMethod2( arg ).dbl();
|
||||
|
||||
// myMethod overrides without calling parent
|
||||
assert.equal(
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class member visibility (public, private, protected)
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class module object creation
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests const keyword
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests final members
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests class builder member restrictions
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests static members
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -3,24 +3,22 @@
|
|||
*
|
||||
* See also: test-class-visibility.js
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2012, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -6,24 +6,22 @@
|
|||
* choice. It is intended to catch errors early, to ensure bugs are not
|
||||
* committed between browser tests.
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests combined file (basic evaluation)
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests index.js
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests interface naming
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
/**
|
||||
* Tests property keyword parser
|
||||
*
|
||||
* Copyright (C) 2010,2011 Mike Gerwitz
|
||||
* Copyright (C) 2010, 2011, 2013 Mike Gerwitz
|
||||
*
|
||||
* This file is part of ease.js.
|
||||
* This file is part of GNU ease.js.
|
||||
*
|
||||
* ease.js is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
* ease.js is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Mike Gerwitz
|
||||
*/
|
||||
|
||||
var common = require( './common' ),
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue