@form8ion/javascript 12.5.0 → 12.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.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +3 -3
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -3
- package/templates/example.mustache +1 -1
package/lib/index.mjs
CHANGED
|
@@ -441,12 +441,12 @@ function determinePathToTemplateFile (fileName) {
|
|
|
441
441
|
|
|
442
442
|
const defaultBuildDirectory$2 = 'lib';
|
|
443
443
|
|
|
444
|
-
async function createExample(projectRoot, projectName) {
|
|
444
|
+
async function createExample(projectRoot, projectName, dialect) {
|
|
445
445
|
return promises.writeFile(
|
|
446
446
|
`${projectRoot}/example.js`,
|
|
447
447
|
mustache.render(
|
|
448
448
|
await promises.readFile(determinePathToTemplateFile('example.mustache'), 'utf8'),
|
|
449
|
-
{projectName: camelcase(projectName)}
|
|
449
|
+
{projectName: camelcase(projectName), esm: dialect === dialects$1.ESM}
|
|
450
450
|
)
|
|
451
451
|
);
|
|
452
452
|
}
|
|
@@ -477,7 +477,7 @@ async function buildDetails ({
|
|
|
477
477
|
const pathToCreatedSrcDirectory = await mkdir(`${projectRoot}/src`);
|
|
478
478
|
const [bundlerResults] = await Promise.all([
|
|
479
479
|
scaffoldBundler({bundlers: packageBundlers, projectRoot, dialect, decisions, projectType: projectTypes$1.PACKAGE}),
|
|
480
|
-
provideExample ? await createExample(projectRoot, projectName) : Promise.resolve,
|
|
480
|
+
provideExample ? await createExample(projectRoot, projectName, dialect) : Promise.resolve,
|
|
481
481
|
touch(`${pathToCreatedSrcDirectory}/index.js`)
|
|
482
482
|
]);
|
|
483
483
|
|