diff --git a/scripts/www.js b/scripts/www.js index f60d9135..f2aa5664 100644 --- a/scripts/www.js +++ b/scripts/www.js @@ -3,12 +3,20 @@ var fs = require('fs-extra'); console.log(config.version) -var testRoot = "www/test/" + config.version; -fs.ensureDirSync(testRoot); -fs.copySync("node_modules/mocha/mocha.js", testRoot + "/node_modules/mocha/mocha.js"); -fs.copySync("node_modules/mocha/mocha.css", testRoot + "/node_modules/mocha/mocha.css"); -fs.copySync("node_modules/chai/chai.js", testRoot + "/node_modules/chai/chai.js"); -fs.copySync("node_modules/sinon/pkg/sinon.js", testRoot + "/node_modules/sinon/pkg/sinon.js"); -fs.copySync("test/", testRoot + "/test"); -fs.copySync("src/", testRoot + "/src"); -fs.copySync("src/htmx.js", "www/js/htmx.js"); \ No newline at end of file +var testRoot = "www/test/"; +var currentReleaseRoot = testRoot + config.version; +fs.ensureDirSync(currentReleaseRoot); +fs.copySync("node_modules/mocha/mocha.js", currentReleaseRoot + "/node_modules/mocha/mocha.js"); +fs.copySync("node_modules/mocha/mocha.css", currentReleaseRoot + "/node_modules/mocha/mocha.css"); +fs.copySync("node_modules/chai/chai.js", currentReleaseRoot + "/node_modules/chai/chai.js"); +fs.copySync("node_modules/sinon/pkg/sinon.js", currentReleaseRoot + "/node_modules/sinon/pkg/sinon.js"); +fs.copySync("test/", currentReleaseRoot + "/test"); +fs.copySync("src/", currentReleaseRoot + "/src"); +fs.copySync("src/htmx.js", "www/js/htmx.js"); + +var testHTML = "

HTMX TESTS

" +fs.writeFileSync(testRoot + "/index.html", testHTML); diff --git a/www/test/index.html b/www/test/index.html new file mode 100644 index 00000000..28d06045 --- /dev/null +++ b/www/test/index.html @@ -0,0 +1,7 @@ +

HTMX TESTS

\ No newline at end of file