mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 13:31:06 +00:00
include a generated index file in /test
This commit is contained in:
parent
e0aa8dec9a
commit
08242c7fc5
@ -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");
|
||||
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 = "<html><body style='font-family: sans-serif'><h1>HTMX TESTS</h1><ul>\n"
|
||||
fs.readdirSync(testRoot).reverse().forEach(function(file){
|
||||
testHTML += "<li><a href='/test/" + file + "/test'>" + file + "</a>\n"
|
||||
});
|
||||
testHTML += "</ul></body>"
|
||||
fs.writeFileSync(testRoot + "/index.html", testHTML);
|
||||
|
7
www/test/index.html
Normal file
7
www/test/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html><body style='font-family: sans-serif'><h1>HTMX TESTS</h1><ul>
|
||||
<li><a href='/test/0.0.4/test'>0.0.4</a>
|
||||
<li><a href='/test/0.0.3/test'>0.0.3</a>
|
||||
<li><a href='/test/0.0.2/test'>0.0.2</a>
|
||||
<li><a href='/test/0.0.1-alpha.3/test'>0.0.1-alpha.3</a>
|
||||
<li><a href='/test/0.0.1/test'>0.0.1</a>
|
||||
</ul></body>
|
Loading…
x
Reference in New Issue
Block a user