mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
unit test added
This commit is contained in:
24
helpers.js
Normal file
24
helpers.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @author: @AngularClass
|
||||
*/
|
||||
var path = require('path');
|
||||
|
||||
// Helper functions
|
||||
var ROOT = path.resolve(__dirname, '..');
|
||||
|
||||
function hasProcessFlag(flag) {
|
||||
return process.argv.join('').indexOf(flag) > -1;
|
||||
}
|
||||
|
||||
function isWebpackDevServer() {
|
||||
return process.argv[1] && !! (/webpack-dev-server/.exec(process.argv[1]));
|
||||
}
|
||||
|
||||
function root(args) {
|
||||
args = Array.prototype.slice.call(arguments, 0);
|
||||
return path.join.apply(path, [ROOT].concat(args));
|
||||
}
|
||||
|
||||
exports.hasProcessFlag = hasProcessFlag;
|
||||
exports.isWebpackDevServer = isWebpackDevServer;
|
||||
exports.root = root;
|
Reference in New Issue
Block a user