watchful-cli 1.7.19 → 1.7.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/constants.js +1 -1
- package/bin/utilities/transpile.js +2 -4
- package/package.json +2 -1
package/bin/constants.js
CHANGED
|
@@ -12,7 +12,7 @@ const S = "s",
|
|
|
12
12
|
EMPTY_STRING = "",
|
|
13
13
|
WATCHFUL_CLI = "watchful-cli",
|
|
14
14
|
PACKAGE_JSON = "package.json",
|
|
15
|
-
SOURCE_MAP_PREAMBLE = "//# sourceMappingURL=data:application/json;
|
|
15
|
+
SOURCE_MAP_PREAMBLE = "//# sourceMappingURL=data:application/json;base64,",
|
|
16
16
|
PROCESS_TRANSPILE_FILE = "../process/transpileFile",
|
|
17
17
|
SOURCE_DIRECTORY_WATCH_PATTERN = "/**/*.js";
|
|
18
18
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const path = require("path");
|
|
4
4
|
|
|
5
|
-
const {
|
|
5
|
+
const { encode } = require("js-base64");
|
|
6
6
|
|
|
7
7
|
const { SWC_CORE_PATH, BABEL_CORE_PATH } = require("../paths"),
|
|
8
8
|
{ readFile, writeFile, createParentDirectory } = require("../utilities/fileSystem"),
|
|
@@ -13,8 +13,6 @@ const { SWC_CORE_PATH, BABEL_CORE_PATH } = require("../paths"),
|
|
|
13
13
|
SWC_NOT_INSTALLED_MESSAGE,
|
|
14
14
|
BABEL_NOT_INSTALLED_MESSAGE } = require("../messages");
|
|
15
15
|
|
|
16
|
-
const { BASE64_ENCODING } = encodings;
|
|
17
|
-
|
|
18
16
|
function createTranspileFileFunction(context) {
|
|
19
17
|
const { debug, transpiler } = context,
|
|
20
18
|
transpileFileFunction = (transpiler === BABEL) ?
|
|
@@ -126,7 +124,7 @@ function createSWCTranspileFileFunction(debug) {
|
|
|
126
124
|
});
|
|
127
125
|
|
|
128
126
|
const mapJSONString = JSON.stringify(mapJSON),
|
|
129
|
-
base64EncodedMapJSONString =
|
|
127
|
+
base64EncodedMapJSONString = encode(mapJSONString);
|
|
130
128
|
|
|
131
129
|
targetFileContent = `${code}
|
|
132
130
|
${SOURCE_MAP_PREAMBLE}${base64EncodedMapJSONString}`; ///
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "watchful-cli",
|
|
3
3
|
"author": "James Smith",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.20",
|
|
5
5
|
"license": "MIT, Anti-996",
|
|
6
6
|
"homepage": "https://github.com/djalbat/watchful-cli",
|
|
7
7
|
"description": "Incremental transpilation with bundling.",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"argumentative": "^2.0.14",
|
|
17
17
|
"chokidar": "^3.3.1",
|
|
18
|
+
"js-base64": "^3.7.2",
|
|
18
19
|
"necessary": "^11.0.25"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {},
|