diff --git a/funcunit.html b/funcunit.html new file mode 100644 index 0000000..174b656 --- /dev/null +++ b/funcunit.html @@ -0,0 +1,15 @@ + +
+ +This is a dummy page that loads your app so steal can + get all the files. +
+If you built your app + to depend on HTML in the page before DOMContent loaded or + onload, you can add the HTML here, or you can change the + build.js script to point to a better html file. +
+ + + \ No newline at end of file diff --git a/scripts/build.js b/scripts/build.js new file mode 100644 index 0000000..c4025e9 --- /dev/null +++ b/scripts/build.js @@ -0,0 +1,6 @@ +//steal/js inject/scripts/compress.js + +load("steal/rhino/steal.js"); +steal.plugins('steal/build','steal/build/scripts','steal/build/styles',function(){ + steal.build('inject/scripts/build.html',{to: 'inject'}); +}); diff --git a/scripts/clean.js b/scripts/clean.js new file mode 100644 index 0000000..cc19559 --- /dev/null +++ b/scripts/clean.js @@ -0,0 +1,17 @@ +//steal/js inject/scripts/compress.js + +load("steal/rhino/steal.js"); +steal.plugins('steal/clean',function(){ + steal.clean('inject/inject.html',{ + indent_size: 1, + indent_char: '\t', + jslint : false, + ignore: /jquery\/jquery.js/, + predefined: { + steal: true, + jQuery: true, + $ : true, + window : true + } + }); +}); diff --git a/scripts/docs.js b/scripts/docs.js new file mode 100644 index 0000000..e39d086 --- /dev/null +++ b/scripts/docs.js @@ -0,0 +1,6 @@ +//js inject/scripts/doc.js + +load('steal/rhino/steal.js'); +steal.plugins("documentjs").then(function(){ + DocumentJS('inject/inject.html'); +}); \ No newline at end of file diff --git a/test/funcunit/funcunit.js b/test/funcunit/funcunit.js new file mode 100644 index 0000000..4615dd3 --- /dev/null +++ b/test/funcunit/funcunit.js @@ -0,0 +1,3 @@ +steal + .plugins("funcunit") + .then("inject_test"); \ No newline at end of file diff --git a/test/funcunit/inject_test.js b/test/funcunit/inject_test.js new file mode 100644 index 0000000..7c9b3f6 --- /dev/null +++ b/test/funcunit/inject_test.js @@ -0,0 +1,9 @@ +module("inject test", { + setup: function(){ + S.open("//inject/inject.html"); + } +}); + +test("Copy Test", function(){ + equals(S("h1").text(), "Welcome to JavaScriptMVC 3.0!","welcome text"); +}); \ No newline at end of file diff --git a/test/qunit/inject_test.js b/test/qunit/inject_test.js new file mode 100644 index 0000000..3b0a2ac --- /dev/null +++ b/test/qunit/inject_test.js @@ -0,0 +1,5 @@ +module("inject"); + +test("inject testing works", function(){ + ok(true,"an assert is run"); +}); \ No newline at end of file diff --git a/test/qunit/qunit.js b/test/qunit/qunit.js new file mode 100644 index 0000000..95ca9e3 --- /dev/null +++ b/test/qunit/qunit.js @@ -0,0 +1,3 @@ +steal + .plugins("funcunit/qunit", "inject") + .then("inject_test"); \ No newline at end of file