1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = getExisting;
|
7 |
|
8 | var _fs = _interopRequireDefault(require("fs"));
|
9 |
|
10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | function getExisting(minifiedPath, sourcePath) {
|
17 | let source = _fs.default.readFileSync(sourcePath, 'utf8').trim();
|
18 |
|
19 | return {
|
20 | source,
|
21 | minified: _fs.default.existsSync(minifiedPath) ? _fs.default.readFileSync(minifiedPath, 'utf8').trim().replace(/;$/, '') : source
|
22 | };
|
23 | } |
\ | No newline at end of file |