Permalink
Browse files

Added line to feature list for Fullscreen edit pull request.

Added require.js for including individual source files during development.
  • Loading branch information...
1 parent 7106c00 commit 0c2e3f5f5ab4b20416e47b31c2360ead584f750b @heff heff committed Jan 17, 2012
Showing with 2,215 additions and 203 deletions.
  1. +1 −0 CHANGELOG.md
  2. +24 −189 Rakefile
  3. +2 −2 build/release-files/demo.html
  4. +31 −0 dev/require-list.js
  5. +2,144 −0 dev/require.js
  6. +12 −12 dev/source-list.js
  7. +1 −0 source-list.js
View
@@ -1,3 +1,4 @@
+* Added a check for if Firefox is enabled which fixes a Firefox 9 issue
* Stopped spinner from showing on 'stalled' events since browsers sometimes don't show that they've recovered.
* Fixed CDN Version which was breaking dev.html
* Made full-window mode more independent
View
213 Rakefile
@@ -4,11 +4,6 @@ require 'httparty'
namespace :build do
- task :test do
- Rake::Log['CDN_VERSION = false'.gsub('CDN_VERSION = false', 'hi')]
-
- end
-
desc "Build version for current '/c/' CDN copy and locked in version"
task :current do
Rake::Task["build:source"].execute
@@ -58,7 +53,7 @@ namespace :build do
if File.exist?("dist")
Rake::Shell["rm -r dist"]
end
-
+
# Make distribution folder
Rake::Shell["mkdir dist"]
@@ -107,210 +102,50 @@ namespace :build do
Rake::Log["Minimizing CSS"]
Rake::Shell["java -jar build/lib/yuicompressor-2.4.7.jar dist/video-js.css -o dist/video-js.min.css"]
- Rake::Log[version_number << " Built"]
+ Rake::Log[version_number << " Built"]
end
+ desc "Build list of source files for easy inclusion in projects"
+ task :js_source do
-end
+ File.open("dev/source-list.js", "w+") do |file|
+ file.puts "var vjsSourceList = [];"
-def version
- YAML.load(File.read("VERSION.yml"))
-end
+ src_array = ["src/core", "src/lib"]
+ last = ["flash/swfobject", "src/setup"]
+ exclude = [".", "..", ".DS_Store", "_end.js", "_begin.js"]
-def version_number
- "#{version['major']}.#{version['minor']}.#{version['patch']}"
-end
-
-desc "Set up the environment"
-task :setup do
- Rake::Log["Installing jekyll"]
- Rake::Shell["gem install jekyll"]
- Rake::Log["Installing the RDiscount gem for decent Markdown support"]
- Rake::Shell["gem install rdiscount"]
- Rake::Log["Installing Pygments for syntax highlighting"]
- Rake::Shell["easy_install pygments"]
- if !File.exist?("_config.yml")
- Rake::Log["Setting up _config.yml"]
- Rake::Shell["cp _config.yml.example _config.yml"]
- end
- Rake::Log["SSH configuration should go in ~/.ssh/config:\n\nHost static1\n Hostname static1.zencoder.com\n Port 22777\n User deploy\n\nHost static2\n Hostname static2.zencoder.com\n Port 22777\n User deploy"]
-
- Rake::Log["!!! SYNTAX HIGHLIGHTING WIHT PYGMENTS REQUIRED liquid version 2.2.2"]
- Rake::Log["gem list -d liquid"]
- Rake::Log["If not 2.2.2"]
- Rake::Log["gem uninstall liquid"]
- Rake::Log['gem install liquid --version "2.2.2"']
-end
+ Dir.foreach('src') do |item|
+ next if exclude.include? item
-namespace :site do
- desc "Delete site cache"
- task :delete do
- Rake::Log["Deleting site cache"]
- if File.exist?("_site")
- Rake::Shell["rm -r _site"]
- end
- end
+ item_name = "src/" << item.sub(".js", "")
- desc "Build the site cache"
- task :build do
- Rake::Log["Building site cache"]
- Rake::Shell["jekyll --no-server --no-auto"]
- end
+ next if (src_array + last).include? item_name
- desc "Rebuild the site cache"
- task :rebuild do
- Rake::Task["site:delete"].execute
- Rake::Task["site:build"].execute
- end
-
-end
-
-# Using the HTML5 Boilerplate build script to optimize files
-namespace :hb do
-
- desc "Udate H5BP Page List config property"
- task :update do
- Rake::Log["Updating H5BP Page List (_site/build/config/project.properties)"]
- text = File.read("_site/build/config/project.properties")
- pages = File.read("_site/page-list-for-h5bp.html")
- File.open("_site/build/config/project.properties", "w") do |file|
- file.puts text.gsub(/file\.pages\s+=.*/, "file.pages = " << pages)
- end
- end
-
- desc "Optimize the site cache using the HTML5 Boilerplate build script. Creates a new folder called 'publish' inside _site folder"
- task :build do
- Rake::Task["hb:update"].execute
-
- Rake::Log["Optimizing site cache"]
- Rake::Shell["cd _site/build/ && ant build && cd ../.."]
- end
-end
-
-
-namespace :env do
- desc "Change to development environment"
- task :development do
- Rake::Log["Changing to development environment"]
- set_env_to :development
- end
-
- desc "Change to staging environment"
- task :staging do
- Rake::Log["Changing to staging environment"]
- set_env_to :staging
- end
-
- desc "Change to production environment"
- task :production do
- Rake::Log["Changing to production environment"]
- set_env_to :production
- end
-end
-
-namespace :deploy do
- task :update_local do
- Rake::Log["Updating local git repo and pushing changes"]
- Rake::Shell["git pull && git push"]
- end
-
- desc "Deploy to staging"
- task :staging do
- Rake::Task["deploy:update_local"].execute
- Rake::Log["Rebuilding for staging"]
- Rake::Task["env:staging"].execute
- Rake::Task["site:rebuild"].execute
- Rake::Task["hb:build"].execute
- config["servers"]["staging"].each do |server|
- Rake::Log["Deploying to #{server.split(':').first}"]
- Rake::Shell["rsync -avrzth --delete _site/publish/ #{server}"]
- end
- Rake::Log["Rebuilding for development"]
- Rake::Task["env:development"].execute
- Rake::Task["site:rebuild"].execute
- end
-
- desc "Deploy to production"
- task :production do
- Rake::Task["deploy:update_local"].execute
- Rake::Log["Rebuilding for production"]
- Rake::Task["env:production"].execute
- Rake::Task["site:rebuild"].execute
- Rake::Task["hb:build"].execute
- config["servers"]["production"].each do |server|
- Rake::Log["Deploying to #{server.split(':').first}"]
- Rake::Shell["rsync -avrzth --delete _site/publish/ #{server}"]
- end
- Rake::Log["Rebuilding for development"]
- Rake::Task["env:development"].execute
- Rake::Task["site:rebuild"].execute
- end
-end
-
-namespace :docs do
-
- desc "Generate Doc directories and pages from VideoJS library docs"
- task :generate do
-
- Rake::Log["Getting docs from " << config["videojs_dir"]]
-
- if File.exist?("docs")
- Rake::Shell["rm -r docs"]
- end
- Dir.mkdir("docs");
-
- list = "<ul><li id='docs_nav_start'><a href='/docs/'>Start</a></li>\n"
- list << "<ul><li id='docs_nav_setup'><a href='/docs/setup/'>Setup</a></li>\n"
- list << "<ul><li id='docs_nav_options'><a href='/docs/options/'>Options</a></li>\n"
-
- Dir.foreach(config["videojs_dir"] << '/docs') do |item|
- next if item == '.' or item == '..'
-
- # do work on real items
- Rake::Log[item]
-
- text = File.read(config["videojs_dir"] << "/docs/" << item)
- name = item.gsub(/\.md/, "")
-
- if name == 'index'
- filename = "docs/" << "index.md"
- File.open(filename, "w+") do |file|
- file.puts "" << text
- end
- else
- filename = "docs/" << name << "/index.md"
- Dir.mkdir("docs/" << name)
- if name != "glossary" and name != "setup" and name != "options"
- list << "<li id='docs_nav_#{name}'><a href='/docs/#{name}/'>#{name}</a></li>\n"
- end
+ src_array << item_name
end
- File.open(filename, "w+") do |file|
- file.puts "" << text
- end
+ src_array = src_array + last
- end
+ src_array.each do |item|
+ file.puts "vjsSourceList.push('#{item}')"
+ end
+ # file.puts "vjsSourceList.push('src/#{item.sub(".js", "")}')"
+ # file.puts "vjsSourceList.push('flash/swfobject.js')"
- File.open("_includes/docs_menu.html", "w+") do |file|
- file.puts list << "<li id='docs_nav_glossary'><a href='/docs/glossary/'>glossary</a></li></ul>"
end
end
end
-
-def set_env_to(env)
- text = File.read("_config.yml")
- File.open("_config.yml", "w") do |file|
- file.puts text.gsub(/env:.*/, "env: #{env}")
- end
+def version
+ YAML.load(File.read("VERSION.yml"))
end
-def config
- YAML.load(File.read("_config.yml"))
+def version_number
+ "#{version['major']}.#{version['minor']}.#{version['patch']}"
end
-
module Rake
class Shell
def self.[](command)
@@ -3,10 +3,10 @@
<head>
<title>Video.js | HTML5 Video Player</title>
- <link href="video-js.css" rel="stylesheet" type="text/css">
+ <link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet" type="text/css">
<!-- video.js must be in the <head> for older IEs to work. -->
- <script src="video.js"></script>
+ <script src="http://vjs.zencdn.net/c/video.js"></script>
</head>
<body>
View
@@ -0,0 +1,31 @@
+// Attempting to create a portable script that loads source files in order. So we can change which files are included and have it change multiple places.
+var vjsSourceList = ["require",
+ 'order!../../src/core.js',
+ 'order!../../src/lib.js',
+ 'order!../../src/component.js',
+ 'order!../../src/controls.js',
+ 'order!../../src/ecma.js',
+ 'order!../../src/events.js',
+ 'order!../../src/json.js',
+ 'order!../../src/player.js',
+ 'order!../../src/tech.js',
+ 'order!../../src/tracks.js',
+ 'order!../../flash/swfobject.js',
+ 'order!../../src/setup.js'
+];
+
+// Not going to be used in production, so eval ok.
+require([vjsSourceList])
+
+// var requireEval = '';
+// for (var i=0; i < vjsSourceList.length; i++) {
+// requireEval += 'require(["order!'+vjsSourceList[i]+'"], function() { ';
+// }
+//
+// requireEval += 'var libsLoaded = true;'
+//
+// for (var i=0; i < vjsSourceList.length; i++) {
+// requireEval += ' }); ';
+// }
+//
+// eval(requireEval);
Oops, something went wrong.

0 comments on commit 0c2e3f5

Please sign in to comment.