Skip to content

Commit

Permalink
Add wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
jho406 committed Nov 19, 2024
1 parent 56be00b commit c6aa635
Show file tree
Hide file tree
Showing 42 changed files with 1,048 additions and 764 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build_js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test
on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
name: Test Wrapper
strategy:
fail-fast: false

runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup project
run: npm install
- name: Lint
run: npm run lint
- name: Test
run: npm run test
19 changes: 19 additions & 0 deletions .github/workflows/dynamic-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: update-security

on:
push:
paths:
- SECURITY.md
branches:
- main
workflow_dispatch:

jobs:
update-security:
permissions:
contents: write
pull-requests: write
pages: write
uses: thoughtbot/templates/.github/workflows/dynamic-security.yaml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ dist/
package-lock.json

coverage/
todo.txt
todo.txt

temp/
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"printWidth": 80,
"useTabs": false,
"tabWidth": 2
}
15 changes: 15 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# More details are here: https://help.github.com/articles/about-codeowners/

# The '*' pattern is global owners.

# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:

# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.

# Global rule:
* @jho406
6 changes: 6 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Code of conduct

By participating in this project, you agree to abide by the
[thoughtbot code of conduct][1].

[1]: https://thoughtbot.com/open-source-code-of-conduct
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Johny Ho

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- START /templates/security.md -->
# Security Policy

## Supported Versions

Only the the latest version of this project is supported at a given time. If
you find a security issue with an older version, please try updating to the
latest version first.

If for some reason you can't update to the latest version, please let us know
your reasons so that we can have a better understanding of your situation.

## Reporting a Vulnerability

For security inquiries or vulnerability reports, visit
<https://thoughtbot.com/security>.

If you have any suggestions to improve this policy, visit <https://thoughtbot.com/security>.

<!-- END /templates/security.md -->
38 changes: 14 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "@thoughtbot/candywrappa",
"name": "@thoughtbot/candy_wrapper",
"version": "0.0.1",
"description": "bare forms",
"description": "Use rails forms with popular react UI libraries",
"scripts": {
"build": "tsup",
"build:wrappers": "tsc --project ./wrappers/tsconfig.json && rm -r wrappers/js/* && mv -v temp/wrappers/ts/* wrappers/js",
"dev": "tsup --watch",
"clean": "rm -rf dist",
"lint": "run-p lint:eslint lint:types lint:prettier",
"lint:eslint": "eslint --max-warnings=0 --ext js,jsx,ts,tsx ./candywrappa",
"lint:eslint": "eslint --max-warnings=0 --ext js,jsx,ts,tsx ./candy_wrapper",
"lint:prettier": "prettier --check '**/*' --ignore-unknown",
"lint:types": "tsc",
"fix:prettier": "prettier --write '**/*' --ignore-unknown",
Expand All @@ -20,25 +21,20 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/thoughtbot/form_props.git"
"url": "git+https://github.com/thoughtbot/candy_wrapper.git"
},
"author": "Johny Ho",
"main": "dist/cjs/form_props.cjs",
"module": "dist/form_props.mjs",
"types": "dist/form_props.d.mts",
"main": "dist/cjs/candy_wrapper.cjs",
"module": "dist/candy_wrapper.mjs",
"types": "dist/candy_wrapper.d.mts",
"exports": {
"./package.json": "./package.json",
"./components": {
"types": "./dist/form_props.d.mts",
"import": "./dist/form_props.mjs",
"default": "./dist/cjs/form_props.cjs"
}
"./package.json": "./package.json"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/thoughtbot/form_props/issues"
"url": "https://github.com/thoughtbot/candy_wrapper/issues"
},
"homepage": "https://github.com/thoughtbot/form_props#readme",
"homepage": "https://github.com/thoughtbot/candy_wrapper#readme",
"devDependencies": {
"@nextui-org/react": "^2.4.8",
"@react-aria/test-utils": "^1.0.0-alpha.2",
Expand All @@ -63,16 +59,10 @@
"typedoc-plugin-markdown": "^4.2.3",
"typedoc-plugin-missing-exports": "^3.0.0",
"typescript": "^5.5.3",
"vitest": "^2.0.2"
"vitest": "^2.0.2",
"@types/react": "^18.3.12"
},
"peerDependencies": {
"react": "^18.3.1"
},
"dependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"react-aria-components": "^1.4.1",
"react-stately": "^3.33.0",
"yarn": "^1.22.22"
"react": "^18 || ^19"
}
}
25 changes: 0 additions & 25 deletions rails/CheckBox.js

This file was deleted.

30 changes: 0 additions & 30 deletions rails/CollectionCheckBoxes.js

This file was deleted.

30 changes: 0 additions & 30 deletions rails/CollectionRadioButtons.js

This file was deleted.

53 changes: 0 additions & 53 deletions rails/Select.js

This file was deleted.

Loading

0 comments on commit c6aa635

Please sign in to comment.