@form8ion/javascript 6.0.6 → 6.0.9

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.mjs CHANGED
@@ -11,6 +11,7 @@ import * as commitConventionPlugin from '@form8ion/commit-convention';
11
11
  import { scaffold as scaffold$4 } from '@form8ion/commit-convention';
12
12
  import hoek from '@hapi/hoek';
13
13
  import execa from '@form8ion/execa-wrapper';
14
+ import npmConf from 'npm-conf';
14
15
  import { stringify } from 'ini';
15
16
  import { EOL } from 'os';
16
17
  import validatePackageName from 'validate-npm-package-name';
@@ -20,6 +21,7 @@ import camelcase from 'camelcase';
20
21
  import makeDir from 'make-dir';
21
22
  import touch from 'touch';
22
23
  import { resolve } from 'path';
24
+ import filedirname from 'filedirname';
23
25
  import * as huskyPlugin from '@form8ion/husky';
24
26
  import { scaffold as scaffold$2 } from '@form8ion/husky';
25
27
  import { write } from '@form8ion/config-file';
@@ -553,10 +555,6 @@ function validate(options) {
553
555
  return value;
554
556
  }
555
557
 
556
- const npmConf = require('npm-conf');
557
-
558
- var npmConfFactory = npmConf;
559
-
560
558
  function buildDialectChoices ({
561
559
  babelPreset,
562
560
  typescript
@@ -647,7 +645,7 @@ async function prompt({
647
645
  npmAccount,
648
646
  author
649
647
  }, ciServices, hosts, visibility, vcs, decisions, configs, pathWithinParent) {
650
- const npmConf = npmConfFactory();
648
+ const npmConf$1 = npmConf();
651
649
  let maybeLoggedInNpmUsername;
652
650
 
653
651
  try {
@@ -709,9 +707,9 @@ async function prompt({
709
707
  validate: scope(visibility),
710
708
  default: npmAccount || maybeLoggedInNpmUsername
711
709
  }, ...authorQuestions(author || {
712
- name: npmConf.get('init.author.name'),
713
- email: npmConf.get('init.author.email'),
714
- url: npmConf.get('init.author.url')
710
+ name: npmConf$1.get('init.author.name'),
711
+ email: npmConf$1.get('init.author.email'),
712
+ url: npmConf$1.get('init.author.url')
715
713
  }), ...questions({
716
714
  vcs,
717
715
  ciServices,
@@ -1018,6 +1016,7 @@ async function chooseBundler ({
1018
1016
  }
1019
1017
 
1020
1018
  function determinePathToTemplateFile (fileName) {
1019
+ const [, __dirname] = filedirname();
1021
1020
  return resolve(__dirname, '..', 'templates', fileName);
1022
1021
  }
1023
1022