@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.
- package/dist/setup.js +6 -1
- 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:
|
|
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