diff options
| author | James Friend <[email protected]> | 2014-09-09 08:50:35 +0800 |
|---|---|---|
| committer | James Friend <[email protected]> | 2014-09-09 08:50:35 +0800 |
| commit | 3440074bb7db51402e28d17f0da84d3a730bdf49 (patch) | |
| tree | d3aeff9f16a0dcca2d9022bbb5788cec6bcbfc7b /grunt | |
| parent | 4ba4b7c3cf20b8e9df3ec41af63b68300b402814 (diff) | |
| download | bootstrap-3440074bb7db51402e28d17f0da84d3a730bdf49.tar.xz bootstrap-3440074bb7db51402e28d17f0da84d3a730bdf49.zip | |
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 1b0da182f..18542cc74 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); } |
