@plumeria/init 21.1.4 → 21.1.5

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.
Files changed (2) hide show
  1. package/dist/setup.js +6 -1
  2. package/package.json +1 -1
package/dist/setup.js CHANGED
@@ -264,7 +264,7 @@ const plan = (detected, answers) => {
264
264
  kind: 'write',
265
265
  label: 'write',
266
266
  note: answers.styleProp,
267
- file: 'plumeria.d.ts',
267
+ file: declarationFile(detected),
268
268
  contents: (0, exports.declarationSource)(answers),
269
269
  });
270
270
  }
@@ -277,6 +277,11 @@ const plan = (detected, answers) => {
277
277
  return actions;
278
278
  };
279
279
  exports.plan = plan;
280
+ const declarationFile = (detected) => node_fs_1.default
281
+ .statSync(node_path_1.default.join(detected.root, 'src'), { throwIfNoEntry: false })
282
+ ?.isDirectory()
283
+ ? 'src/plumeria.d.ts'
284
+ : 'plumeria.d.ts';
280
285
  const read = (detected, file) => node_fs_1.default.readFileSync(node_path_1.default.join(detected.root, file), 'utf8');
281
286
  const bundlerAction = (detected, answers) => {
282
287
  const { bundler, bundlerConfig, typescript } = detected;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/init",
3
- "version": "21.1.4",
3
+ "version": "21.1.5",
4
4
  "description": "One command that sets up Plumeria: detects the bundler, installs the packages, writes the configs",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",