From: Christopher De Cairos Date: Mon, 19 Sep 2011 14:54:03 +0000 (-0400) Subject: added preload=auto to unit tests. muted unit tests. added Module stuff to Makefile... X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=ed8151f917eaceaf1fc13f6c626938ea6d90d7c2;p=popcorn-js.git added preload=auto to unit tests. muted unit tests. added Module stuff to Makefile (builds into complete, testing, min versions, separately as popcorn.modules.js, lint targets etc [#721] --- diff --git a/Makefile b/Makefile index 5bffbf4..08ed9f9 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ PLUGINS_DIR = ${PREFIX}/plugins PARSERS_DIR = ${PREFIX}/parsers PLAYERS_DIR = ${PREFIX}/players EFFECTS_DIR = $(PREFIX)/effects +MODULES_DIR = $(PREFIX)/modules # Version number used in naming release files. Defaults to git commit sha. VERSION ?= $(shell git show -s --pretty=format:%h) @@ -27,6 +28,10 @@ POPCORN_SRC = ${PREFIX}/popcorn.js POPCORN_DIST = ${DIST_DIR}/popcorn.js POPCORN_MIN = ${DIST_DIR}/popcorn.min.js +# modules +MODULES_DIST = ${DIST_DIR}/popcorn.modules.js +MODULES_MIN = ${DIST_DIR}/popcorn.modules.min.js + # plugins PLUGINS_DIST = ${DIST_DIR}/popcorn.plugins.js PLUGINS_MIN = ${DIST_DIR}/popcorn.plugins.min.js @@ -52,23 +57,30 @@ PARSERS_SRC := $(filter-out %unit.js, $(shell find ${PARSERS_DIR} -name 'popcorn # Grab all popcorn..js files from players dir PLAYERS_SRC := $(filter-out %unit.js, $(shell find ${PLAYERS_DIR} -name 'popcorn.*.js' -print)) -# Grab all popcorn..js files from players dir +# Grab all popcorn..js files from effects dir EFFECTS_SRC := $(filter-out %unit.js, $(shell find $(EFFECTS_DIR) -name 'popcorn.*.js' -print)) -# Grab all popcorn..unit.js files from plugins dir +# Grab all popcorn..js files from modules dir +MODULES_SRC := $(filter-out %unit.js, $(shell find $(MODULES_DIR) -name 'popcorn.*.js' -print)) + +# Grab all popcorn..unit.js files from plugins dir PLUGINS_UNIT := $(shell find ${PLUGINS_DIR} -name 'popcorn.*.unit.js' -print) -# Grab all popcorn..unit.js files from parsers dir +# Grab all popcorn..unit.js files from parsers dir PARSERS_UNIT := $(shell find ${PARSERS_DIR} -name 'popcorn.*.unit.js' -print) # Grab all popcorn..unit.js files from players dir PLAYERS_UNIT := $(shell find ${PLAYERS_DIR} -name 'popcorn.*.unit.js' -print) -# Grab all popcorn..unit.js files from players dir +# Grab all popcorn..unit.js files from effects dir EFFECTS_UNIT := $(shell find $(EFFECTS_DIR) -name 'popcorn.*.unit.js' -print) +# Grab all popcorn..unit.js files from modules dir +MODULES_UNIT := $(shell find $(MODULES_DIR) -name 'popcorn.*.unit.js' -print) + # popcorn + plugins POPCORN_COMPLETE_LIST := --js ${POPCORN_SRC} \ + $(shell for js in ${MODULES_SRC} ; do echo --js $$js ; done) \ $(shell for js in ${PLUGINS_SRC} ; do echo --js $$js ; done) \ $(shell for js in ${PARSERS_SRC} ; do echo --js $$js ; done) \ $(shell for js in ${PLAYERS_SRC} ; do echo --js $$js ; done) @@ -96,7 +108,7 @@ ${POPCORN_DIST}: ${POPCORN_SRC} | ${DIST_DIR} @@echo "Building" ${POPCORN_DIST} @@$(call add_license, $(POPCORN_SRC), $(POPCORN_DIST)) -min: ${POPCORN_MIN} ${PLUGINS_MIN} ${PARSERS_MIN} ${PLAYERS_MIN} $(EFFECTS_MIN) ${POPCORN_COMPLETE_MIN} +min: ${POPCORN_MIN} ${MODULES_MIN} ${PLUGINS_MIN} ${PARSERS_MIN} ${PLAYERS_MIN} $(EFFECTS_MIN) ${POPCORN_COMPLETE_MIN} ${POPCORN_MIN}: ${POPCORN_DIST} @@echo "Building" ${POPCORN_MIN} @@ -104,12 +116,22 @@ ${POPCORN_MIN}: ${POPCORN_DIST} @@$(call add_license, ${POPCORN_MIN}.tmp, ${POPCORN_MIN}) @@rm ${POPCORN_MIN}.tmp -${POPCORN_COMPLETE_MIN}: update ${POPCORN_SRC} ${PLUGINS_SRC} ${PARSERS_SRC} $(EFFECTS_SRC) ${DIST_DIR} +${POPCORN_COMPLETE_MIN}: update ${POPCORN_SRC} ${MODULES_SRC} ${PLUGINS_SRC} ${PARSERS_SRC} $(EFFECTS_SRC) ${DIST_DIR} @@echo "Building" ${POPCORN_COMPLETE_MIN} @@$(call compile, ${POPCORN_COMPLETE_LIST}, ${POPCORN_COMPLETE_MIN}.tmp) @@$(call add_license, ${POPCORN_COMPLETE_MIN}.tmp, ${POPCORN_COMPLETE_MIN}) @@rm ${POPCORN_COMPLETE_MIN}.tmp +modules: ${MODULES_DIST} + +${MODULES_MIN}: ${MODULES_DIST} + @@echo "Building" ${MODULES_MIN} + @@$(call compile, $(shell for js in ${MODULES_SRC} ; do echo --js $$js ; done), ${MODULES_MIN}) + +${MODULES_DIST}: ${MODULES_SRC} ${DIST_DIR} + @@echo "Building ${MODULES_DIST}" + @@cat ${MODULES_SRC} > ${MODULES_DIST} + plugins: ${PLUGINS_DIST} ${PLUGINS_MIN}: ${PLUGINS_DIST} @@ -150,9 +172,9 @@ $(EFFECTS_DIST): $(EFFECTS_SRC) $(DIST_DIR) @@echo "Building $(EFFECTS_DIST)" @@cat $(EFFECTS_SRC) > $(EFFECTS_DIST) -complete: update ${POPCORN_SRC} ${PARSERS_SRC} ${PLUGINS_SRC} ${PLAYERS_SRC} $(EFFECTS_SRC) ${DIST_DIR} - @@echo "Building popcorn + plugins + parsers + players + effects..." - @@cat ${POPCORN_SRC} ${PLUGINS_SRC} ${PARSERS_SRC} ${PLAYERS_SRC} $(EFFECTS_SRC) > ${POPCORN_COMPLETE_DIST}.tmp +complete: update ${POPCORN_SRC} ${MODULES_SRC} ${PARSERS_SRC} ${PLUGINS_SRC} ${PLAYERS_SRC} $(EFFECTS_SRC) ${DIST_DIR} + @@echo "Building popcorn + modules + plugins + parsers + players + effects..." + @@cat ${POPCORN_SRC} ${MODULES_SRC} ${PLUGINS_SRC} ${PARSERS_SRC} ${PLAYERS_SRC} $(EFFECTS_SRC) > ${POPCORN_COMPLETE_DIST}.tmp @@$(call add_license, ${POPCORN_COMPLETE_DIST}.tmp, ${POPCORN_COMPLETE_DIST}) @@rm ${POPCORN_COMPLETE_DIST}.tmp @@ -164,6 +186,10 @@ lint-core-tests: @@echo "Checking core unit tests against JSLint..." @@$(call run_lint,test/popcorn.unit.js) +lint-modules: + @@echo "Checking all modules against JSLint..." + @@$(call run_lint,$(MODULES_SRC)) + lint-plugins: @@echo "Checking all plugins against JSLint..." @@$(call run_lint,$(PLUGINS_SRC)) @@ -180,6 +206,10 @@ lint-effects: @@echo "Checking all effects against JSLint..." @@$(call run_lint,$(EFFECTS_SRC)) +lint-modules-tests: + @@echo "Checking modules unit tests against JSLint..." + @@$(call run_lint,$(MODULES_UNIT)) + lint-plugin-tests: @@echo "Checking plugin unit tests against JSLint..." @@$(call run_lint,$(PLUGINS_UNIT)) @@ -216,6 +246,7 @@ testing: complete @@rm -fr ${TESTING_MIRROR}/AUTHORS ${TESTING_MIRROR}/LICENSE ${TESTING_MIRROR}/LICENSE_HEADER \ ${TESTING_MIRROR}/Makefile ${TESTING_MIRROR}/readme.md @@touch "${TESTING_MIRROR}/THIS IS A TESTING MIRROR -- READ-ONLY" + $(call overwrite_js, ${TESTING_MIRROR}/modules) $(call overwrite_js, ${TESTING_MIRROR}/plugins) $(call overwrite_js, ${TESTING_MIRROR}/players) $(call overwrite_js, ${TESTING_MIRROR}/parsers) diff --git a/modules/timeline-sources/popcorn.timeline-sources.unit.html b/modules/timeline-sources/popcorn.timeline-sources.unit.html index 122aee3..c9578fe 100644 --- a/modules/timeline-sources/popcorn.timeline-sources.unit.html +++ b/modules/timeline-sources/popcorn.timeline-sources.unit.html @@ -19,7 +19,7 @@