|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
537 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | /*
|
|---|
| 2 | Copyright 2015, Yahoo Inc.
|
|---|
| 3 | Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|---|
| 4 | */
|
|---|
| 5 | 'use strict';
|
|---|
| 6 |
|
|---|
| 7 | const path = require('path');
|
|---|
| 8 |
|
|---|
| 9 | module.exports = {
|
|---|
| 10 | isAbsolute: path.isAbsolute,
|
|---|
| 11 | asAbsolute(file, baseDir) {
|
|---|
| 12 | return path.isAbsolute(file)
|
|---|
| 13 | ? file
|
|---|
| 14 | : path.resolve(baseDir || process.cwd(), file);
|
|---|
| 15 | },
|
|---|
| 16 | relativeTo(file, origFile) {
|
|---|
| 17 | return path.isAbsolute(file)
|
|---|
| 18 | ? file
|
|---|
| 19 | : path.resolve(path.dirname(origFile), file);
|
|---|
| 20 | }
|
|---|
| 21 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.