diff options
author | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-11-01 12:44:50 +0200 |
---|---|---|
committer | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-11-01 11:08:17 +0000 |
commit | 8ac6a7ef3809cb511b10494d9c1f4654db1e071e (patch) | |
tree | f9d7b80d863f4451ad2359c469366f7170475a4b /3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js | |
parent | c53c8c2b31b6734765f0f5638a8bb0e3bf3cff9b (diff) |
Dynamically fetching javascript dependencies
JIRA: DOVETAIL-746
This patch deletes the source code of javascript dependencies from
web portal. Furthermore, it uses npm to install them.
Change-Id: Idc40606ff9e7286aa66421cbbe05f94d7ce9f7e6
Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to '3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js')
-rw-r--r-- | 3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js b/3rd_party/static/testapi-ui/assets/lib/bootstrap/grunt/bs-commonjs-generator.js deleted file mode 100644 index b0642cd..0000000 --- a/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.'); -}; |