diff options
author | James Friend <james@jsdf.co> | 2014-09-09 04:50:35 +0400 |
---|---|---|
committer | James Friend <james@jsdf.co> | 2014-09-09 04:50:35 +0400 |
commit | 3440074bb7db51402e28d17f0da84d3a730bdf49 (patch) | |
tree | d3aeff9f16a0dcca2d9022bbb5788cec6bcbfc7b /grunt | |
parent | 4ba4b7c3cf20b8e9df3ec41af63b68300b402814 (diff) |
code style improvement
Diffstat (limited to 'grunt')
-rw-r--r-- | grunt/bs-commonjs-generator.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/grunt/bs-commonjs-generator.js b/grunt/bs-commonjs-generator.js index 1b0da182f7..18542cc74f 100644 --- a/grunt/bs-commonjs-generator.js +++ b/grunt/bs-commonjs-generator.js @@ -2,6 +2,8 @@ var fs = require('fs'); var path = require('path'); +var COMMONJS_BANNER = '// This file is generated. You can require() it in a CommonJS environment.\n'; + module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) { var destDir = path.dirname(destFilepath); @@ -10,8 +12,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) return 'require(\'' + requirePath + '\')'; } - var moduleOutputJs = '// This file is generated. You can require() it in a CommonJS environment.\n' + - srcFiles.map(srcPathToDestRequire).join('\n'); + var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); try { fs.writeFileSync(destFilepath, moduleOutputJs); } |