Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fusejs: Begin FuseJS Alpha

  • Loading branch information...
commit 1a4bec7b56d62b1f75a57fdbf10038ce245555ec 1 parent 12a50e5
John-David Dalton jdalton authored
2  CHANGELOG
... ... @@ -1,3 +1,5 @@
  1 +*FuseJS Alpha* (December 6, 2008)
  2 +
1 3 * Add private helper method isHostObject() to correctly detect host methods and properties. [David Mark, jddalton]
2 4
3 5 * Massive code rewrite and restructuring [bkerley, jddalton, Joe Gornick, T.J. Crowder]
2  LICENSE
... ... @@ -1,4 +1,4 @@
1   -Copyright (c) 2005-2008 Sam Stephenson
  1 +Copyright (c) 2008-2009 John-David Dalton
2 2
3 3 Permission is hereby granted, free of charge, to any person obtaining a copy
4 4 of this software and associated documentation files (the "Software"), to deal
43 README.rdoc
Source Rendered
... ... @@ -1,56 +1,55 @@
1   -= Prototype
  1 += FuseJS
2 2 ==== An object-oriented JavaScript framework
3 3
4   -Prototype is a JavaScript framework that aims to ease development of dynamic
  4 +Fuse is a JavaScript framework that aims to ease development of dynamic
5 5 web applications. It offers a familiar class-style OO framework, extensive
6 6 Ajax support, higher-order programming constructs, and easy DOM manipulation.
7 7
8 8 === Targeted platforms
9 9
10   -Prototype currently targets the following platforms:
  10 +FuseJS currently targets the following platforms:
11 11
12 12 * Microsoft Internet Explorer for Windows, version 6.0 and higher
13 13 * Mozilla Firefox 1.5 and higher
14 14 * Apple Safari 2.0 and higher
15 15 * Opera 9.25 and higher
16 16
17   -== Using Prototype
  17 +== Using FuseJS
18 18
19   -To use Prototype in your application, download the latest release from the
20   -Prototype web site (http://prototypejs.org/download) and copy
21   -<tt>dist/prototype.js</tt> to a suitable location. Then include it in your HTML
  19 +To use FuseJS in your application, download the latest release from the
  20 +FuseJS web site (http://fusejs.com/download) and copy
  21 +<tt>dist/fuse.js</tt> to a suitable location. Then include it in your HTML
22 22 like so:
23 23
24   - <script type="text/javascript" src="/path/to/prototype.js"></script>
  24 + <script type="text/javascript" src="/path/to/fuse.js"></script>
25 25
26   -=== Building Prototype from source
  26 +=== Building FuseJS from source
27 27
28   -<tt>prototype.js</tt> is a composite file generated from many source files in
29   -the <tt>src/</tt> directory. To build Prototype, you'll need:
  28 +<tt>fuse.js</tt> is a composite file generated from many source files in
  29 +the <tt>src/</tt> directory. To build FuseJS, you'll need:
30 30
31   -* a copy of the Prototype source tree, either from a distribution tarball or
  31 +* a copy of the FuseJS source tree, either from a distribution tarball or
32 32 from the Git repository (see below)
33 33 * Ruby 1.8.2 or higher (http://www.ruby-lang.org/)
34 34 * Rake -- Ruby Make (http://rake.rubyforge.org/)
35 35 * RDoc, if your Ruby distribution does not include it
36 36
37   -From the root Prototype directory,
  37 +From the root FuseJS directory,
38 38
39   -* <tt>rake dist</tt> will preprocess the Prototype source using ERB and
40   - generate the composite <tt>dist/prototype.js</tt>.
  39 +* <tt>rake dist</tt> will preprocess the FuseJS source using ERB and
  40 + generate the composite <tt>dist/fuse.js</tt>.
41 41 * <tt>rake package</tt> will create a distribution tarball in the
42 42 <tt>pkg/</tt> directory.
43 43
44   -== Contributing to Prototype
  44 +== Contributing to FuseJS
45 45
46   -Check out the Prototype source with
47   - $ git clone git://github.com/sstephenson/prototype.git
  46 +Check out the FuseJS source with
  47 + $ git clone git://github.com/jdalton/fusejs.git
48 48
49 49 Find out how to contribute:
50   - http://prototypejs.org/contribute
  50 + http://fusejs.com/contribute
51 51
52 52 == Documentation
53 53
54   -Please see the online Prototype API:
55   - http://prototypejs.org/api
56   -
  54 +Please see the online FuseJS API:
  55 + http://fusejs.com/api
44 Rakefile
... ... @@ -1,46 +1,46 @@
1 1 require 'rake'
2 2 require 'rake/packagetask'
3 3
4   -PROTOTYPE_ROOT = File.expand_path(File.dirname(__FILE__))
5   -PROTOTYPE_SRC_DIR = File.join(PROTOTYPE_ROOT, 'src')
6   -PROTOTYPE_DIST_DIR = File.join(PROTOTYPE_ROOT, 'dist')
7   -PROTOTYPE_PKG_DIR = File.join(PROTOTYPE_ROOT, 'pkg')
8   -PROTOTYPE_TEST_DIR = File.join(PROTOTYPE_ROOT, 'test')
9   -PROTOTYPE_TMP_DIR = File.join(PROTOTYPE_TEST_DIR, 'unit', 'tmp')
10   -PROTOTYPE_VERSION = '1.6.0.2'
  4 +FUSEJS_ROOT = File.expand_path(File.dirname(__FILE__))
  5 +FUSEJS_SRC_DIR = File.join(FUSEJS_ROOT, 'src')
  6 +FUSEJS_DIST_DIR = File.join(FUSEJS_ROOT, 'dist')
  7 +FUSEJS_PKG_DIR = File.join(FUSEJS_ROOT, 'pkg')
  8 +FUSEJS_TEST_DIR = File.join(FUSEJS_ROOT, 'test')
  9 +FUSEJS_TMP_DIR = File.join(FUSEJS_TEST_DIR, 'unit', 'tmp')
  10 +FUSEJS_VERSION = 'Alpha'
11 11
12 12 task :default => [:dist, :dist_helper, :package, :clean_package_source]
13 13
14 14 desc "Builds the distribution."
15 15 task :dist do
16   - $:.unshift File.join(PROTOTYPE_ROOT, 'lib')
  16 + $:.unshift File.join(FUSEJS_ROOT, 'lib')
17 17 require 'protodoc'
18 18
19   - Dir.chdir(PROTOTYPE_SRC_DIR) do
20   - File.open(File.join(PROTOTYPE_DIST_DIR, 'prototype.js'), 'w+') do |dist|
21   - dist << Protodoc::Preprocessor.new('prototype.js')
  19 + Dir.chdir(FUSEJS_SRC_DIR) do
  20 + File.open(File.join(FUSEJS_DIST_DIR, 'fuse.js'), 'w+') do |dist|
  21 + dist << Protodoc::Preprocessor.new('fuse.js')
22 22 end
23 23 end
24 24 end
25 25
26 26 desc "Builds the updating helper."
27 27 task :dist_helper do
28   - $:.unshift File.join(PROTOTYPE_ROOT, 'lib')
  28 + $:.unshift File.join(FUSEJS_ROOT, 'lib')
29 29 require 'protodoc'
30 30
31   - Dir.chdir(File.join(PROTOTYPE_ROOT, 'ext', 'update_helper')) do
32   - File.open(File.join(PROTOTYPE_DIST_DIR, 'prototype_update_helper.js'), 'w+') do |dist|
  31 + Dir.chdir(File.join(FUSEJS_ROOT, 'ext', 'update_helper')) do
  32 + File.open(File.join(FUSEJS_DIST_DIR, 'prototype_update_helper.js'), 'w+') do |dist|
33 33 dist << Protodoc::Preprocessor.new('prototype_update_helper.js')
34 34 end
35 35 end
36 36 end
37 37
38   -Rake::PackageTask.new('prototype', PROTOTYPE_VERSION) do |package|
  38 +Rake::PackageTask.new('fuse', FUSEJS_VERSION) do |package|
39 39 package.need_tar_gz = true
40   - package.package_dir = PROTOTYPE_PKG_DIR
  40 + package.package_dir = FUSEJS_PKG_DIR
41 41 package.package_files.include(
42 42 '[A-Z]*',
43   - 'dist/prototype.js',
  43 + 'dist/fuse.js',
44 44 'lib/**',
45 45 'src/**',
46 46 'test/**'
@@ -60,7 +60,7 @@ JavaScriptTestTask.new(:test_units => [:build_unit_tests]) do |t|
60 60 t.mount("/dist")
61 61 t.mount("/test")
62 62
63   - Dir.mkdir(PROTOTYPE_TMP_DIR) unless File.exist?(PROTOTYPE_TMP_DIR)
  63 + Dir.mkdir(FUSEJS_TMP_DIR) unless File.exist?(FUSEJS_TMP_DIR)
64 64
65 65 Dir["test/unit/tmp/*_test.html"].each do |file|
66 66 test_name = File.basename(file).sub("_test.html", "")
@@ -76,17 +76,17 @@ end
76 76
77 77 task :build_unit_tests do
78 78 Dir[File.join('test', 'unit', '*_test.js')].each do |file|
79   - PageBuilder.new(file, 'prototype.erb').render
  79 + PageBuilder.new(file, 'fuse.erb').render
80 80 end
81 81 end
82 82
83 83 task :clean_package_source do
84   - rm_rf File.join(PROTOTYPE_PKG_DIR, "prototype-#{PROTOTYPE_VERSION}")
  84 + rm_rf File.join(FUSEJS_PKG_DIR, "fuse-#{FUSEJS_VERSION}")
85 85 end
86 86
87 87 desc 'Generates an empty tmp directory for building tests.'
88 88 task :clean_tmp do
89 89 puts 'Generating an empty tmp directory for building tests.'
90   - FileUtils.rm_rf(PROTOTYPE_TMP_DIR) if File.exist?(PROTOTYPE_TMP_DIR)
91   - Dir.mkdir(PROTOTYPE_TMP_DIR)
  90 + FileUtils.rm_rf(FUSEJS_TMP_DIR) if File.exist?(FUSEJS_TMP_DIR)
  91 + Dir.mkdir(FUSEJS_TMP_DIR)
92 92 end
8 src/HEADER
... ... @@ -1,7 +1,7 @@
1   -/* Prototype JavaScript framework, version <%= PROTOTYPE_VERSION %>
2   - * (c) 2005-2008 Sam Stephenson
  1 +/* Fuse JavaScript framework, version <%= FUSEJS_VERSION %>
  2 + * (c) 2008-2009 John-David Dalton
3 3 *
4   - * Prototype is freely distributable under the terms of an MIT-style license.
5   - * For details, see the Prototype web site: http://www.prototypejs.org/
  4 + * FuseJS is freely distributable under the terms of an MIT-style license.
  5 + * For details, see the FuseJS web site: http://www.fusejs.com/
6 6 *
7 7 *--------------------------------------------------------------------------*/
2  src/prototype.js → src/fuse.js
@@ -49,7 +49,7 @@
49 49 /*---------------------------- PROTOTYPE OBJECT ----------------------------*/
50 50
51 51 var P = Prototype = {
52   - Version: '<%= PROTOTYPE_VERSION %>',
  52 + Version: '<%= FUSEJS_VERSION %>',
53 53
54 54 Browser: {
55 55 'IE': isHostObject(global, 'attachEvent') && userAgent.indexOf('Opera') === -1,
4 test/browser.html
@@ -3,7 +3,7 @@
3 3 <html>
4 4 <head>
5 5 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6   - <title>Prototype object browser</title>
  6 + <title>FuseJS object browser</title>
7 7 <style type="text/css" media="screen">
8 8 body {
9 9 font-family: Lucida Grande, Verdana, sans-serif;
@@ -76,7 +76,7 @@
76 76 }
77 77
78 78 </style>
79   - <script type="text/javascript" src="../dist/prototype.js"></script>
  79 + <script type="text/javascript" src="../dist/fuse.js"></script>
80 80 <script type="text/javascript">
81 81 var Browser = Class.create();
82 82 Browser.prototype = {
4 test/console.html
@@ -2,8 +2,8 @@
2 2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 4 <head>
5   - <title>Prototype Console</title>
6   - <script src="../dist/prototype.js" type="text/javascript"></script>
  5 + <title>FuseJS Console</title>
  6 + <script src="../dist/fuse.js" type="text/javascript"></script>
7 7 <script type="text/javascript">
8 8 Prototype.Console = Class.create();
9 9 Prototype.Console.prototype = {
6 test/functional/event.html
@@ -2,9 +2,9 @@
2 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 4 <head>
5   - <title>Prototype functional test file</title>
  5 + <title>FuseJS functional test file</title>
6 6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7   - <script src="../../dist/prototype.js" type="text/javascript"></script>
  7 + <script src="../../dist/fuse.js" type="text/javascript"></script>
8 8
9 9 <style type="text/css" media="screen">
10 10 /* <![CDATA[ */
@@ -51,7 +51,7 @@
51 51 </script>
52 52 </head>
53 53 <body>
54   - <h1>Prototype functional tests for the Event module</h1>
  54 + <h1>FuseJS functional tests for the Event module</h1>
55 55
56 56 <div id="log">log empty</div>
57 57
4 test/lib/templates/default.erb
@@ -2,9 +2,9 @@
2 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 4 <head>
5   - <title>Unit test file | <%= @title %></title>
  5 + <title>FuseJS Unit test file | <%= @title %></title>
6 6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7   - <script src="../../../dist/prototype.js" type="text/javascript"></script>
  7 + <script src="../../../dist/fuse.js" type="text/javascript"></script>
8 8 <script src="../../lib/assets/unittest.js" type="text/javascript"></script>
9 9 <link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
10 10
6 test/lib/templates/prototype.erb → test/lib/templates/fuse.erb
@@ -2,7 +2,7 @@
2 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 4 <head>
5   - <title>Prototype Unit test file | <%= @title %></title>
  5 + <title>FuseJS Unit test file | <%= @title %></title>
6 6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 7 <script type="text/javascript" charset="utf-8">
8 8 var originalElement = window.Element;
@@ -10,7 +10,7 @@
10 10 eventElement: { }
11 11 };
12 12 </script>
13   - <script src="../../../dist/prototype.js" type="text/javascript"></script>
  13 + <script src="../../../dist/fuse.js" type="text/javascript"></script>
14 14 <script src="../../lib/assets/unittest.js" type="text/javascript"></script>
15 15 <link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
16 16
@@ -25,7 +25,7 @@
25 25 <script src="../<%= @js_filename %>" type="text/javascript"></script>
26 26 </head>
27 27 <body>
28   -<h1>Prototype Unit test file</h1>
  28 +<h1>FuseJS Unit test file</h1>
29 29 <h2><%= @title %></h2>
30 30
31 31 <!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify <%= @fixtures_filename %> -->

0 comments on commit 1a4bec7

Please sign in to comment.
Something went wrong with that request. Please try again.