@form8ion/javascript 5.3.0 → 5.6.0
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 +12 -17
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.es.js +13 -18
- package/lib/index.es.js.map +1 -1
- package/package.json +3 -2
package/lib/index.cjs.js
CHANGED
|
@@ -26,6 +26,7 @@ var touch = require('touch');
|
|
|
26
26
|
var path = require('path');
|
|
27
27
|
var huskyPlugin = require('@form8ion/husky');
|
|
28
28
|
var eslint = require('@form8ion/eslint');
|
|
29
|
+
var configFile = require('@form8ion/config-file');
|
|
29
30
|
|
|
30
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
31
32
|
|
|
@@ -691,25 +692,23 @@ async function prompt({
|
|
|
691
692
|
async function scaffoldBabel ({
|
|
692
693
|
projectRoot,
|
|
693
694
|
preset,
|
|
694
|
-
tests,
|
|
695
695
|
buildDirectory
|
|
696
696
|
}) {
|
|
697
697
|
if (!preset) {
|
|
698
698
|
throw new Error('No babel preset provided. Cannot configure babel transpilation');
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
-
await
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
}
|
|
701
|
+
await configFile.write({
|
|
702
|
+
path: projectRoot,
|
|
703
|
+
name: 'babel',
|
|
704
|
+
format: core.fileTypes.JSON,
|
|
705
|
+
config: {
|
|
706
|
+
presets: [preset.name],
|
|
707
|
+
ignore: [`./${buildDirectory}/`]
|
|
709
708
|
}
|
|
710
|
-
})
|
|
709
|
+
});
|
|
711
710
|
return {
|
|
712
|
-
devDependencies: ['@babel/register', preset.packageName
|
|
711
|
+
devDependencies: ['@babel/register', preset.packageName],
|
|
713
712
|
eslint: {}
|
|
714
713
|
};
|
|
715
714
|
}
|
|
@@ -741,9 +740,6 @@ async function scaffoldTypescript ({
|
|
|
741
740
|
},
|
|
742
741
|
eslintConfigs,
|
|
743
742
|
devDependencies: ['typescript', shareableTsConfigPackage],
|
|
744
|
-
packageProperties: {
|
|
745
|
-
types: 'lib/index.d.ts'
|
|
746
|
-
},
|
|
747
743
|
vcsIgnore: {
|
|
748
744
|
files: ['tsconfig.tsbuildinfo']
|
|
749
745
|
}
|
|
@@ -765,7 +761,6 @@ function scaffoldDialect ({
|
|
|
765
761
|
projectType,
|
|
766
762
|
projectRoot,
|
|
767
763
|
configs,
|
|
768
|
-
tests,
|
|
769
764
|
buildDirectory,
|
|
770
765
|
testFilenamePattern
|
|
771
766
|
}) {
|
|
@@ -774,7 +769,6 @@ function scaffoldDialect ({
|
|
|
774
769
|
return scaffoldBabel({
|
|
775
770
|
preset: configs.babelPreset,
|
|
776
771
|
projectRoot,
|
|
777
|
-
tests,
|
|
778
772
|
buildDirectory
|
|
779
773
|
});
|
|
780
774
|
|
|
@@ -1172,7 +1166,9 @@ async function scaffoldPackageType ({
|
|
|
1172
1166
|
packageProperties: {
|
|
1173
1167
|
main: './lib/index.cjs.js',
|
|
1174
1168
|
module: './lib/index.es.js',
|
|
1169
|
+
types: './lib/index.d.ts',
|
|
1175
1170
|
exports: {
|
|
1171
|
+
types: './lib/index.d.ts',
|
|
1176
1172
|
require: './lib/index.cjs.js',
|
|
1177
1173
|
import: './lib/index.es.js'
|
|
1178
1174
|
},
|
|
@@ -1734,7 +1730,6 @@ async function scaffolder (options) {
|
|
|
1734
1730
|
configs,
|
|
1735
1731
|
projectRoot,
|
|
1736
1732
|
projectType,
|
|
1737
|
-
tests,
|
|
1738
1733
|
buildDirectory: projectTypeResults.buildDirectory,
|
|
1739
1734
|
testFilenamePattern: verificationResults.testFilenamePattern
|
|
1740
1735
|
})]);
|