2019-10-08 22:17:55 +00:00
|
|
|
"use strict";
|
|
|
|
|
2017-08-01 16:52:45 +00:00
|
|
|
var fs = require( "fs" );
|
|
|
|
|
|
|
|
module.exports = function( grunt ) {
|
|
|
|
grunt.registerTask( "qunit_fixture", function() {
|
|
|
|
var dest = "./test/data/qunit-fixture.js";
|
|
|
|
fs.writeFileSync(
|
|
|
|
dest,
|
|
|
|
"// Generated by build/tasks/qunit_fixture.js\n" +
|
|
|
|
"QUnit.config.fixture = " +
|
|
|
|
JSON.stringify(
|
|
|
|
fs.readFileSync(
|
|
|
|
"./test/data/qunit-fixture.html",
|
|
|
|
"utf8"
|
2018-01-09 15:50:09 +00:00
|
|
|
).toString().replace( /\r\n/g, "\n" )
|
2017-08-01 16:52:45 +00:00
|
|
|
) +
|
2019-03-11 16:25:48 +00:00
|
|
|
";\n"
|
2017-08-01 16:52:45 +00:00
|
|
|
);
|
|
|
|
grunt.log.ok( "Updated " + dest + "." );
|
|
|
|
} );
|
|
|
|
};
|