2016-05-06 04:52:36 +00:00
|
|
|
// Copyright IBM Corp. 2014. All Rights Reserved.
|
|
|
|
// Node module: loopback-boot
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
2017-05-08 21:48:48 +00:00
|
|
|
'use strict';
|
|
|
|
|
2014-05-26 15:30:02 +00:00
|
|
|
var fs = require('fs-extra');
|
|
|
|
var path = require('path');
|
|
|
|
|
|
|
|
var sandbox = exports;
|
|
|
|
sandbox.PATH = path.join(__dirname, '..', 'sandbox');
|
|
|
|
|
|
|
|
sandbox.reset = function() {
|
|
|
|
fs.removeSync(sandbox.PATH);
|
|
|
|
fs.mkdirsSync(sandbox.PATH);
|
|
|
|
};
|
|
|
|
|
|
|
|
sandbox.resolve = function() {
|
|
|
|
var args = Array.prototype.slice.apply(arguments);
|
|
|
|
args.unshift(sandbox.PATH);
|
|
|
|
return path.resolve.apply(path.resolve, args);
|
|
|
|
};
|