mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +00:00
bbad821c39
So far, only browser-based JS files were required to be in strict mode (in the function form). This commit adds such a requirement to Node.js scripts where the global form is preferred. All Node.js scripts in sloppy mode were converted to strict mode. Closes gh-4499
23 lines
495 B
JavaScript
23 lines
495 B
JavaScript
"use strict";
|
|
|
|
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"
|
|
).toString().replace( /\r\n/g, "\n" )
|
|
) +
|
|
";\n"
|
|
);
|
|
grunt.log.ok( "Updated " + dest + "." );
|
|
} );
|
|
};
|