Skip to content

initial work #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflows will upload a Javscript Package using NPM to npmjs.org when a release is created
# For more information see: https://docs.github.com/en/actions/guides/publishing-nodejs-packages

name: publish

on:
release:
types: [published]

jobs:
publish-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install dependencies
run: pip install hatch
- name: Publish
env:
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
run: hatch publish
39 changes: 39 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Latest Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install Python Dependencies
run: pip install hatch
- name: Run Tests
run: hatch run test-cov

environments:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python Dependencies
run: pip install hatch
- name: Run Tests
run: hatch run test
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
reactpy_mkdocs/static
tests/site

# standard
node_modules
venv
__pycache__
22 changes: 22 additions & 0 deletions js/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"node": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"react/prop-types": "off"
},
"settings": {
"react": {
"version": "detect"
}
}
}
22 changes: 22 additions & 0 deletions js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# reactpy-router

A URL router for ReactPy

# Package Installation

Requires [Node](https://nodejs.org/en/) to be installed:

```bash
npm install --save reactpy-router
```

For a developer installation, `cd` into this directory and run:

```bash
npm install
npm run build
```

This will install required dependencies and generate a Javascript bundle that is saved
to `reactpy-router/bundle.js`` and is distributed with the
associated Python package.
Loading