@form8ion/javascript 12.6.0 → 12.6.2
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/lib/index.js +9 -5
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +14 -10
- package/lib/index.mjs.map +1 -1
- package/package.json +23 -23
package/lib/index.js
CHANGED
|
@@ -265,6 +265,10 @@ var codeStylePlugin = /*#__PURE__*/Object.freeze({
|
|
|
265
265
|
test: tester$3
|
|
266
266
|
});
|
|
267
267
|
|
|
268
|
+
async function write$1 ({projectRoot, config}) {
|
|
269
|
+
await node_fs.promises.writeFile(`${projectRoot}/.npmrc`, ini.stringify(config));
|
|
270
|
+
}
|
|
271
|
+
|
|
268
272
|
function projectWillNotBeConsumed(projectType) {
|
|
269
273
|
return javascriptCore.projectTypes.APPLICATION === projectType || javascriptCore.projectTypes.CLI === projectType;
|
|
270
274
|
}
|
|
@@ -274,9 +278,9 @@ async function scaffoldNpmConfig ({
|
|
|
274
278
|
projectType,
|
|
275
279
|
registries
|
|
276
280
|
}) {
|
|
277
|
-
await
|
|
278
|
-
|
|
279
|
-
|
|
281
|
+
await write$1({
|
|
282
|
+
projectRoot,
|
|
283
|
+
config: {
|
|
280
284
|
'update-notifier': false,
|
|
281
285
|
...projectWillNotBeConsumed(projectType) && {'save-exact': true},
|
|
282
286
|
...Object.fromEntries(Object.entries(registries)
|
|
@@ -286,8 +290,8 @@ async function scaffoldNpmConfig ({
|
|
|
286
290
|
|
|
287
291
|
return [`@${scope}:registry`, url];
|
|
288
292
|
}))
|
|
289
|
-
}
|
|
290
|
-
);
|
|
293
|
+
}
|
|
294
|
+
});
|
|
291
295
|
|
|
292
296
|
return {scripts: {'lint:peer': 'npm ls >/dev/null'}};
|
|
293
297
|
}
|