diff options
author | xudan <xudan16@huawei.com> | 2018-07-05 22:37:35 -0400 |
---|---|---|
committer | Georg Kunz <georg.kunz@ericsson.com> | 2018-07-25 09:17:09 +0000 |
commit | 58b91dd3baaaf72ab65062a4804403cd4a5935b2 (patch) | |
tree | 801b1f39b3bee25ecbaae387339955d55651e98b /cvp/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js | |
parent | 947f1bf0147c40971fdae36feecd477ab3caf3b8 (diff) |
Move OVP web portal code to a separate repo
The new repo for web portal is https://gerrit.opnfv.org/gerrit/dovetail-webportal
JIRA: DOVETAIL-671
Change-Id: Iac085abc3d175b9a091d70d0448af56c7a6845e9
Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'cvp/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js')
-rw-r--r-- | cvp/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/cvp/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js b/cvp/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js deleted file mode 100644 index b0642cd8..00000000 --- a/cvp/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; -var fs = require('fs'); -var path = require('path'); - -var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n'; - -module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) { - var destDir = path.dirname(destFilepath); - - function srcPathToDestRequire(srcFilepath) { - var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/'); - return 'require(\'' + requirePath + '\')'; - } - - var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); - try { - fs.writeFileSync(destFilepath, moduleOutputJs); - } - catch (err) { - grunt.fail.warn(err); - } - grunt.log.writeln('File ' + destFilepath.cyan + ' created.'); -}; |