Skip to content

Commit b33bbef

Browse files
committed
refactor: support hello-worl publish
1 parent 7e2c948 commit b33bbef

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

scripts/publish-packages.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ const packages = [
2828
name: '@fecommunity/reactpress-toolkit',
2929
path: 'toolkit',
3030
description: 'API client and utilities toolkit'
31+
},
32+
{
33+
name: '@fecommunity/reactpress-template-hello-world',
34+
path: 'templates/hello-world',
35+
description: 'Hello World template for ReactPress'
3136
}
3237
];
3338

@@ -271,6 +276,9 @@ function buildPackage(packagePath, packageName) {
271276
execSync('pnpm run prebuild && pnpm run build', { cwd: path.join(process.cwd(), packagePath), stdio: 'inherit' });
272277
} else if (packagePath === 'toolkit') {
273278
execSync('pnpm run build', { cwd: path.join(process.cwd(), packagePath), stdio: 'inherit' });
279+
} else if (packagePath === 'templates/hello-world') {
280+
// Templates don't need to be built, just validate package.json
281+
console.log(chalk.gray(' Templates do not require building, skipping...'));
274282
}
275283
console.log(chalk.green(`✅ ${packageName} built successfully`));
276284
} catch (error) {
@@ -722,7 +730,10 @@ async function main() {
722730
// Create GitHub release if on master and we actually published something
723731
if (isMasterBranch && packagesToPublish.length > 0) {
724732
const tagName = `v${baseVersion}`;
725-
const releaseNotes = `Release ${baseVersion}\n\nPackages released:\n${Object.entries(packageVersions).map(([name, version]) => `- ${name}@${version}`).join('\n')}`;
733+
const releaseNotes = `Release ${baseVersion}
734+
735+
Packages released:
736+
${Object.entries(packageVersions).map(([name, version]) => `- ${name}@${version}`).join('\n')}`;
726737
createGitHubRelease(tagName, releaseNotes);
727738
}
728739

@@ -736,4 +747,4 @@ async function main() {
736747
main().catch(error => {
737748
console.error(chalk.red('❌ Publishing failed:'), error);
738749
process.exit(1);
739-
});
750+
});

templates/hello-world/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fecommunity/reactpress-template-hello-world",
3-
"version": "1.0.0",
3+
"version": "1.0.0-beta.1",
44
"description": "A minimal hello-world template for ReactPress using Next.js Pages Router",
55
"main": "index.js",
66
"bin": {

0 commit comments

Comments
 (0)