@form8ion/javascript 11.10.3 → 12.0.0-beta.1
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 +26 -10
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +29 -13
- package/lib/index.mjs.map +1 -1
- package/package.json +8 -9
package/lib/index.js
CHANGED
|
@@ -16,7 +16,6 @@ var execa = require('@form8ion/execa-wrapper');
|
|
|
16
16
|
var npmConf = require('npm-conf');
|
|
17
17
|
var os = require('os');
|
|
18
18
|
var validatePackageName = require('validate-npm-package-name');
|
|
19
|
-
var rollup = require('@form8ion/rollup');
|
|
20
19
|
var fs = require('fs');
|
|
21
20
|
var mustache = require('mustache');
|
|
22
21
|
var mkdir = require('make-dir');
|
|
@@ -27,7 +26,7 @@ var filedirname = require('filedirname');
|
|
|
27
26
|
var huskyPlugin = require('@form8ion/husky');
|
|
28
27
|
var ini = require('ini');
|
|
29
28
|
var prettier = require('@form8ion/prettier');
|
|
30
|
-
var
|
|
29
|
+
var eslintPlugin = require('@form8ion/eslint');
|
|
31
30
|
var node_fs = require('node:fs');
|
|
32
31
|
var sortProperties = require('sort-object-keys');
|
|
33
32
|
|
|
@@ -63,6 +62,7 @@ var touch__default = /*#__PURE__*/_interopDefaultLegacy(touch);
|
|
|
63
62
|
var camelcase__default = /*#__PURE__*/_interopDefaultLegacy(camelcase);
|
|
64
63
|
var filedirname__default = /*#__PURE__*/_interopDefaultLegacy(filedirname);
|
|
65
64
|
var huskyPlugin__namespace = /*#__PURE__*/_interopNamespace(huskyPlugin);
|
|
65
|
+
var eslintPlugin__namespace = /*#__PURE__*/_interopNamespace(eslintPlugin);
|
|
66
66
|
var sortProperties__default = /*#__PURE__*/_interopDefaultLegacy(sortProperties);
|
|
67
67
|
|
|
68
68
|
const questionNames$1 = {
|
|
@@ -239,7 +239,7 @@ async function scaffoldCodeStyle ({
|
|
|
239
239
|
return deepmerge__default["default"].all(await Promise.all([
|
|
240
240
|
configs.eslint
|
|
241
241
|
&& configureLinting
|
|
242
|
-
&&
|
|
242
|
+
&& eslintPlugin.scaffold({projectRoot, config: configs.eslint}),
|
|
243
243
|
scaffoldRemark({
|
|
244
244
|
projectRoot,
|
|
245
245
|
projectType,
|
|
@@ -251,11 +251,11 @@ async function scaffoldCodeStyle ({
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
function lifter$3 (options) {
|
|
254
|
-
return
|
|
254
|
+
return core.applyEnhancers({options, enhancers: [eslintPlugin__namespace]});
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
function tester$3 (options) {
|
|
258
|
-
return
|
|
258
|
+
return eslintPlugin.test(options);
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
var codeStylePlugin = /*#__PURE__*/Object.freeze({
|
|
@@ -666,10 +666,18 @@ async function scaffoldMonorepoType ({projectRoot}) {
|
|
|
666
666
|
|
|
667
667
|
const defaultBuildDirectory = 'bin';
|
|
668
668
|
|
|
669
|
-
async function scaffoldCliType ({
|
|
669
|
+
async function scaffoldCliType ({
|
|
670
|
+
packageName,
|
|
671
|
+
visibility,
|
|
672
|
+
projectRoot,
|
|
673
|
+
dialect,
|
|
674
|
+
publishRegistry,
|
|
675
|
+
decisions,
|
|
676
|
+
packageBundlers
|
|
677
|
+
}) {
|
|
670
678
|
const packageAccessLevel = determinePackageAccessLevelFromProjectVisibility({projectVisibility: visibility});
|
|
671
|
-
const [
|
|
672
|
-
|
|
679
|
+
const [bundlerResults, publishableResults] = await Promise.all([
|
|
680
|
+
scaffoldBundler({bundlers: packageBundlers, projectRoot, dialect, decisions, projectType: javascriptCore.projectTypes.CLI}),
|
|
673
681
|
scaffoldPublishable({packageName, packageAccessLevel}),
|
|
674
682
|
javascriptCore.mergeIntoExistingPackageJson({
|
|
675
683
|
projectRoot,
|
|
@@ -686,7 +694,7 @@ async function scaffoldCliType ({packageName, visibility, projectRoot, dialect,
|
|
|
686
694
|
|
|
687
695
|
return deepmerge__default["default"].all([
|
|
688
696
|
publishableResults,
|
|
689
|
-
|
|
697
|
+
bundlerResults,
|
|
690
698
|
{
|
|
691
699
|
scripts: {
|
|
692
700
|
clean: `rimraf ./${defaultBuildDirectory}`,
|
|
@@ -745,7 +753,15 @@ async function scaffoldProjectType ({
|
|
|
745
753
|
case javascriptCore.projectTypes.APPLICATION:
|
|
746
754
|
return scaffoldApplicationType({projectRoot});
|
|
747
755
|
case javascriptCore.projectTypes.CLI:
|
|
748
|
-
return scaffoldCliType({
|
|
756
|
+
return scaffoldCliType({
|
|
757
|
+
packageName,
|
|
758
|
+
visibility,
|
|
759
|
+
projectRoot,
|
|
760
|
+
dialect,
|
|
761
|
+
publishRegistry,
|
|
762
|
+
decisions,
|
|
763
|
+
packageBundlers
|
|
764
|
+
});
|
|
749
765
|
case javascriptCore.projectTypes.MONOREPO:
|
|
750
766
|
return scaffoldMonorepoType({projectRoot});
|
|
751
767
|
case 'Other':
|