Skip to content

Commit c24b8fe

Browse files
authored
Merge pull request #1 from grammarly/gh-actions
add GitHub actions
2 parents 8840de6 + 5ec93c5 commit c24b8fe

File tree

5 files changed

+60
-4
lines changed

5 files changed

+60
-4
lines changed

.github/workflows/release.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Branch name
13+
id: branch_name
14+
run: echo ::set-output name=TARBALL::grammarly-embrace-${GITHUB_REF#refs/tags/}.tgz
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
- run: yarn install
18+
- run: yarn build
19+
- run: yarn test
20+
- run: yarn pack
21+
- name: Upload binaries to release
22+
uses: svenstaro/upload-release-action@v2
23+
with:
24+
repo_token: ${{ secrets.GITHUB_TOKEN }}
25+
file: ./${{ steps.branch_name.outputs.TARBALL }}
26+
asset_name: ${{ steps.branch_name.outputs.TARBALL }}
27+
tag: ${{ github.ref }}

.github/workflows/tests.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Tests
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
tests:
7+
name: Run tests
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [12.x]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- run: yarn install
21+
- run: yarn build
22+
- run: yarn test
23+
env:
24+
CI: true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
.idea
23
*.log
34
*.lock

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Embrace
22

3-
Typesafe, declarative, and composable UI engine on top of [React](https://reactjs.org/).
3+
Typesafe, declarative, and composable UI engine on top of [React](https://reactjs.org/) and [Focal](https://github.com/grammarly/focal).
44

55
- Detect breaking changes in components with the static type system.
66
- Clear separation between UI and the logic.
@@ -25,7 +25,7 @@ import { Flow, UI } from '@grammarly/embrace'
2525
* <Body>
2626
* </Grid>
2727
*/
28-
const mainGrid = UI.Grid.make<'header' | 'body', never, never>(({ slots }) => (
28+
const mainGrid = UI.Grid.make<'header' | 'body'>(({ slots }) => (
2929
<div className="main">
3030
{slots.header}
3131
{slots.body}
@@ -41,7 +41,7 @@ const Body = UI.Node.make<{ readonly content: string }, never>(({ state }) => (
4141
export const bodyFlow: Flow.For<typeof Body> = Rx.startWith({ content: 'Hello, World!' })
4242

4343
// Header component. Neither consumes state or emits events
44-
const Header = UI.Node.make<never, never>(() => <header className="header">Welcome</header>)
44+
const Header = UI.Node.make(() => <header className="header">Welcome</header>)
4545

4646
// Produce a component by composing `mainGrid` with `Header` and `Body`
4747
export const Main = UI.Knot.make(mainGrid, { header: Header, body: Body })
@@ -101,6 +101,10 @@ const App: React.FC = () => UI.mount(NewMain, newMainFlow)
101101
ReactDOM.render(<App />, document.getElementById('root'))
102102
```
103103
104+
## Project Status
105+
106+
Embrace is an experimental prototype. Breaking changes may occur up to 1.0.0 is released.
107+
104108
## WHY?
105109
106110
With the applications growing with features and code-base, more and more developers are looking for ways to re-use the code between them.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@grammarly/embrace",
33
"version": "0.1.0",
4-
"description": "Typesafe, declarative, and composable UI engine on top of React",
4+
"description": "Typesafe, declarative, and composable UI engine on top of React and Focal",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",
77
"es2015": "esm2015/index.js",

0 commit comments

Comments
 (0)