Skip to content

Commit

Permalink
chore(ci): add tagging script and update inner readme
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Nov 28, 2024
1 parent 7d463c2 commit 401bd9e
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ packages/*/src/playground.ts
version.output.txt
*.tsbuildinfo
.rollup.cache

packages/core/LICENSE
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
"typecheck": "pnpm tsc --noEmit --project ./tsconfig.json --skipLibCheck",
"docs:dev": "cd ./docs && pnpm dev && cd -",
"postinstall": "husky install",
"release": "./scripts/release.sh",
"prepublishOnly": "pnpm test && pnpm build",
"playground:dev": "cd ./packages/playground && pnpm dev && cd -",
"build:watch": "tsx scripts/watch.ts",
"dev": "concurrently \"pnpm build:watch\" \"pnpm playground:dev\"",
"prepare": "husky",
"copy-mds": "tsx scripts/copy-mds.ts",
"ci:publish": "pnpm build && pnpm publish --provenance --access public -r",
"ci:version": "pnpm changeset version && cp ./packages/core/CHANGELOG.md ./CHANGELOG.md",
"get-tag": "tsx ./scripts/get-tag.ts",
"tag": "pnpm get-tag && git tag \"$(<./version.output.txt)\""
"ci:version": "pnpm changeset version && pnpm copy-mds",
"ci:tag": "tsx ./scripts/tag-release.ts"
},
"devDependencies": {
"@changesets/cli": "^2.27.10",
Expand Down
25 changes: 24 additions & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
SOON
# Formwerk

Formwerk is a Vue.js framework that simplifies forms by providing a comprehensive suite of composables for building accessible, high-quality, and scalable form components.

Unlike other libraries, Formwerk deliberately excludes UI components, recognizing that design needs vary across projects. Instead, it provides a rock-solid foundation of accessibility, validation, state management, and interaction patterns that just work with your custom styling. This separation allows you to maintain complete creative control while ensuring your forms meet the highest standards of functionality and user experience.

With Formwerk as your foundation, you get high-quality form capabilities without compromising on flexibility. Whether you're creating a design system or standalone application, Formwerk handles the intricate details of forms, empowering you to create forms that are delightful to use.

## Contributing

You can contribute to Formwerk by reporting bugs, suggesting features, or submitting code changes. If you wish to submit code changes, please first discuss the change you wish to make via [GitHub issues](https://github.com/formwerkjs/formwerk/issues), [Discord](https://discord.gg/gQ7wqpvT5X), or other method.

You can visit the [contributing guide](./CONTRIBUTING.md) for more information on how to contribute to Formwerk and how to get started.

## Credits

Formwerk takes great inspiration from multiple projects in the ecosystem, most notably:

- [React Aria](https://react-spectrum.adobe.com/)
- [VeeValidate](https://vee-validate.logaretm.com/)

## License

Formwerk is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
16 changes: 16 additions & 0 deletions scripts/copy-mds.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import fs from 'fs-extra';
import path, { dirname } from 'path';
import { fileURLToPath } from 'url';
import { consola } from 'consola';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

fs.copyFileSync(path.resolve(__dirname, '../README.md'), path.resolve(__dirname, '../packages/core/README.md'));
consola.success('📄 README.md copied to packages/core');

fs.copyFileSync(path.resolve(__dirname, '../LICENSE'), path.resolve(__dirname, '../packages/core/LICENSE'));
consola.success('📄 LICENSE copied to packages/core');

fs.copyFileSync(path.resolve(__dirname, '../packages/core/CHANGELOG.md'), path.resolve(__dirname, '../CHANGELOG.md'));
consola.success('📄 CHANGELOG.md copied to root');
13 changes: 13 additions & 0 deletions scripts/tag-release.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { version } from '../packages/core/package.json';
import { execSync } from 'node:child_process';
import { consola } from 'consola';

try {
consola.info(`🔖 Tagging release v${version}`);
execSync(`git tag v${version}`);
consola.success(`✅ Tagged release v${version}`);
} catch (error) {
consola.error(`❌ Failed to tag release v${version}`);
consola.error(error);
process.exit(1);
}

0 comments on commit 401bd9e

Please sign in to comment.