Skip to content

Commit

Permalink
General Cleanup (HTTP Edition) (#40)
Browse files Browse the repository at this point in the history
* Switch to feature/cleanup

* Update package-lock.json

* Update install report, package-lock.json

* Update to JSDoc 4

* Prepare Builder process, general updates from @fabric/core

* Re-sync with latest Fabric, add BUILD genesis

* Update to latest Fabric, update install report

* Add test workflow, switch to feature/v0.1.0-RC1 branch

* Update install.log

* Add .nvmrc

* Import latest Fabric

* Add codecov

* Add codecov action in "uses" for install step

* Add Codecov to dev dependencies

* Update d3-graphviz

* Restore test workflow

* Inherit Remote from Fabric Remote

* Begin sandbox work

* Revert module work

* Add Sandbox tests

* Refresh web tests

* Import fomantic distributables, update various types

* Regenerate bundle

* Extend browser tests to 60s

* Extend sandbox tests to 30s

* Update site asset

* Remove webpack.config.js

* Enable hasRole middleware helper
  • Loading branch information
martindale authored Apr 1, 2023
1 parent 457539d commit 01826db
Show file tree
Hide file tree
Showing 192 changed files with 353,284 additions and 2,154 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
"presets": ["@babel/preset-env"]
}
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Install Node.js on ${{ matrix.os }}
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Generate coverage report
run: npm run report:coverage
- name: Send coverage report
uses: codecov/codecov-action@v3.1.1
with:
directory: ./reports/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.17.1
22 changes: 22 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Build `@fabric/http`
The Fabric HTTP library exists to serve Fabric applications to the legacy web.

We generate `assets/bundles/browser.js` from `scripts/browser.js` using the Fabric HTTP Compiler.

## Quick Start
`npm run build` will run the build. This will generate `assets/bundles/browser.js` — the primary browser bundle for using `@fabric/http` in downstream applications.

## The Fabric Compiler
Importing `@fabric/http/types/compiler` will enable generation of HTML-encoded single-page applications:
```js
const Compiler = require('@fabric/http/types/compiler');
const compiler = new Compiler();

compiler.compileTo('example.html');
```

## Maintenance
Use `npm run reports` to generate a full pre-production build. This will update any dependencies allowed by `package.json` but should ideally be none as all versions are pinned.

## Notes
Currently, a small number of packages seem to occasionally update sub-packages in `package-lock.json` but we are seeking to prune them out. Consider submitting a Pull Request!
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `@fabric/http`
# `@fabric/http` — HTTP support for Fabric applications
![Project Status](https://img.shields.io/badge/status-experimental-rainbow.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/FabricLabs/web.svg?branch=master&style=flat-square)](https://travis-ci.org/FabricLabs/web)
[![Coverage Status](https://img.shields.io/codecov/c/github/FabricLabs/web.svg?style=flat-square)](https://codecov.io/gh/FabricLabs/web)
Expand Down
Loading

0 comments on commit 01826db

Please sign in to comment.