@form8ion/javascript 7.2.6 → 8.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 +15 -33
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +16 -34
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -8,13 +8,14 @@ var javascriptCore = require('@form8ion/javascript-core');
|
|
|
8
8
|
var joi = require('joi');
|
|
9
9
|
var overridablePrompts = require('@form8ion/overridable-prompts');
|
|
10
10
|
var codecov = require('@form8ion/codecov');
|
|
11
|
-
var
|
|
11
|
+
var configFile = require('@form8ion/config-file');
|
|
12
12
|
var core = require('@form8ion/core');
|
|
13
13
|
var cliMessages = require('@travi/cli-messages');
|
|
14
14
|
var commitConventionPlugin = require('@form8ion/commit-convention');
|
|
15
15
|
var hoek = require('@hapi/hoek');
|
|
16
16
|
var execa = require('@form8ion/execa-wrapper');
|
|
17
17
|
var npmConf = require('npm-conf');
|
|
18
|
+
var fs = require('fs');
|
|
18
19
|
var ini = require('ini');
|
|
19
20
|
var os = require('os');
|
|
20
21
|
var validatePackageName = require('validate-npm-package-name');
|
|
@@ -26,7 +27,6 @@ var touch = require('touch');
|
|
|
26
27
|
var path = require('path');
|
|
27
28
|
var filedirname = require('filedirname');
|
|
28
29
|
var huskyPlugin = require('@form8ion/husky');
|
|
29
|
-
var configFile = require('@form8ion/config-file');
|
|
30
30
|
var prettier = require('@form8ion/prettier');
|
|
31
31
|
var eslint = require('@form8ion/eslint');
|
|
32
32
|
|
|
@@ -82,13 +82,15 @@ const questionNames$1 = {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
async function scaffoldC8 ({projectRoot}) {
|
|
85
|
-
await
|
|
86
|
-
|
|
87
|
-
JSON
|
|
85
|
+
await configFile.write({
|
|
86
|
+
name: 'c8',
|
|
87
|
+
format: core.fileTypes.JSON,
|
|
88
|
+
path: projectRoot,
|
|
89
|
+
config: {
|
|
88
90
|
reporter: ['lcov', 'text-summary', 'html'],
|
|
89
91
|
exclude: ['src/**/*-test.js', 'test/', 'thirdparty-wrappers/', 'vendor/']
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
92
94
|
|
|
93
95
|
return {
|
|
94
96
|
devDependencies: ['cross-env', 'c8'],
|
|
@@ -191,17 +193,6 @@ async function scaffoldUnitTesting ({projectRoot, frameworks, decisions, visibil
|
|
|
191
193
|
]);
|
|
192
194
|
}
|
|
193
195
|
|
|
194
|
-
async function scaffoldEslint ({config, projectRoot, additionalConfiguration}) {
|
|
195
|
-
const {scope} = config;
|
|
196
|
-
const {ignore} = additionalConfiguration;
|
|
197
|
-
|
|
198
|
-
return eslint.scaffold({scope, projectRoot, ignore});
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function lifter$1 ({results: {buildDirectory, eslintConfigs, eslint: eslint$1}, projectRoot}) {
|
|
202
|
-
return eslint.lift({projectRoot, configs: [...eslintConfigs || [], ...eslint$1?.configs || []], buildDirectory});
|
|
203
|
-
}
|
|
204
|
-
|
|
205
196
|
async function scaffoldRemark ({config, projectRoot, projectType, vcs, dialect}) {
|
|
206
197
|
await configFile.write({
|
|
207
198
|
format: core.fileTypes.JSON,
|
|
@@ -247,13 +238,12 @@ async function scaffoldCodeStyle ({
|
|
|
247
238
|
dialect,
|
|
248
239
|
configs,
|
|
249
240
|
vcs,
|
|
250
|
-
configureLinting
|
|
251
|
-
eslint
|
|
241
|
+
configureLinting
|
|
252
242
|
}) {
|
|
253
243
|
return deepmerge__default["default"].all(await Promise.all([
|
|
254
244
|
configs.eslint
|
|
255
245
|
&& configureLinting
|
|
256
|
-
&&
|
|
246
|
+
&& eslint.scaffold({projectRoot, config: configs.eslint}),
|
|
257
247
|
scaffoldRemark({
|
|
258
248
|
projectRoot,
|
|
259
249
|
projectType,
|
|
@@ -267,9 +257,9 @@ async function scaffoldCodeStyle ({
|
|
|
267
257
|
|
|
268
258
|
var codeStylePlugin = /*#__PURE__*/Object.freeze({
|
|
269
259
|
__proto__: null,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
260
|
+
lift: eslint.lift,
|
|
261
|
+
test: eslint.test,
|
|
262
|
+
scaffold: scaffoldCodeStyle
|
|
273
263
|
});
|
|
274
264
|
|
|
275
265
|
async function test$1({projectRoot}) {
|
|
@@ -1549,15 +1539,7 @@ async function scaffolder (options) {
|
|
|
1549
1539
|
projectType,
|
|
1550
1540
|
testFilenamePattern: verificationResults.testFilenamePattern
|
|
1551
1541
|
}),
|
|
1552
|
-
scaffoldCodeStyle({
|
|
1553
|
-
projectRoot,
|
|
1554
|
-
projectType,
|
|
1555
|
-
dialect,
|
|
1556
|
-
configs,
|
|
1557
|
-
vcs,
|
|
1558
|
-
configureLinting,
|
|
1559
|
-
eslint: verificationResults.eslint
|
|
1560
|
-
}),
|
|
1542
|
+
scaffoldCodeStyle({projectRoot, projectType, dialect, configs, vcs, configureLinting}),
|
|
1561
1543
|
scaffoldProjectTypePlugin({
|
|
1562
1544
|
projectRoot,
|
|
1563
1545
|
projectType,
|