@form8ion/javascript 5.4.0 → 5.7.0-alpha.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.cjs.js +13 -8
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.es.js +14 -9
- package/lib/index.es.js.map +1 -1
- package/package.json +6 -5
package/lib/index.es.js
CHANGED
|
@@ -6,12 +6,12 @@ import { Separator } from 'inquirer';
|
|
|
6
6
|
import { prompt as prompt$1 } from '@form8ion/overridable-prompts';
|
|
7
7
|
import { scaffold, lift as lift$3 } from '@form8ion/codecov';
|
|
8
8
|
import { promises } from 'fs';
|
|
9
|
-
import { fileExists, applyEnhancers } from '@form8ion/core';
|
|
9
|
+
import { fileExists, applyEnhancers, fileTypes } from '@form8ion/core';
|
|
10
10
|
import { info, error, warn } from '@travi/cli-messages';
|
|
11
11
|
import * as commitConventionPlugin from '@form8ion/commit-convention';
|
|
12
12
|
import { scaffold as scaffold$4 } from '@form8ion/commit-convention';
|
|
13
13
|
import hoek from '@hapi/hoek';
|
|
14
|
-
import execa from 'execa';
|
|
14
|
+
import execa from '@form8ion/execa-wrapper';
|
|
15
15
|
import { stringify } from 'ini';
|
|
16
16
|
import { EOL } from 'os';
|
|
17
17
|
import validatePackageName from 'validate-npm-package-name';
|
|
@@ -24,6 +24,7 @@ import { resolve } from 'path';
|
|
|
24
24
|
import * as huskyPlugin from '@form8ion/husky';
|
|
25
25
|
import { scaffold as scaffold$3 } from '@form8ion/husky';
|
|
26
26
|
import { lift as lift$4, scaffold as scaffold$2 } from '@form8ion/eslint';
|
|
27
|
+
import { write } from '@form8ion/config-file';
|
|
27
28
|
|
|
28
29
|
function ownKeys(object, enumerableOnly) {
|
|
29
30
|
var keys = Object.keys(object);
|
|
@@ -663,10 +664,15 @@ async function scaffoldBabel ({
|
|
|
663
664
|
throw new Error('No babel preset provided. Cannot configure babel transpilation');
|
|
664
665
|
}
|
|
665
666
|
|
|
666
|
-
await
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
667
|
+
await write({
|
|
668
|
+
path: projectRoot,
|
|
669
|
+
name: 'babel',
|
|
670
|
+
format: fileTypes.JSON,
|
|
671
|
+
config: {
|
|
672
|
+
presets: [preset.name],
|
|
673
|
+
ignore: [`./${buildDirectory}/`]
|
|
674
|
+
}
|
|
675
|
+
});
|
|
670
676
|
return {
|
|
671
677
|
devDependencies: ['@babel/register', preset.packageName],
|
|
672
678
|
eslint: {}
|
|
@@ -700,9 +706,6 @@ async function scaffoldTypescript ({
|
|
|
700
706
|
},
|
|
701
707
|
eslintConfigs,
|
|
702
708
|
devDependencies: ['typescript', shareableTsConfigPackage],
|
|
703
|
-
packageProperties: {
|
|
704
|
-
types: 'lib/index.d.ts'
|
|
705
|
-
},
|
|
706
709
|
vcsIgnore: {
|
|
707
710
|
files: ['tsconfig.tsbuildinfo']
|
|
708
711
|
}
|
|
@@ -1129,7 +1132,9 @@ async function scaffoldPackageType ({
|
|
|
1129
1132
|
packageProperties: {
|
|
1130
1133
|
main: './lib/index.cjs.js',
|
|
1131
1134
|
module: './lib/index.es.js',
|
|
1135
|
+
types: './lib/index.d.ts',
|
|
1132
1136
|
exports: {
|
|
1137
|
+
types: './lib/index.d.ts',
|
|
1133
1138
|
require: './lib/index.cjs.js',
|
|
1134
1139
|
import: './lib/index.es.js'
|
|
1135
1140
|
},
|