Skip to content
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
32 changes: 32 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test
on:
pull_request:
branches:
- '**'
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'
- 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language:
node_js
node_js:
- 16.15.0
- 16.17.1
cache:
yarn: true
script:
Expand Down
13 changes: 13 additions & 0 deletions assets/bundles/browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>@fabric/http</title>
<!-- <link rel="manifest" href="/manifest.json"> -->
<link rel="stylesheet" type="text/css" href="/styles/semantic.css" />
<link rel="stylesheet" type="text/css" href="/styles/screen.css" />
<script src="/scripts/jquery-3.4.1.js"></script>
<script src="/scripts/semantic.js"></script>
<script src="/bundles/browser.js"></script>
</head>
<body data-bind="2863a506eaa69a4a15bb863c2fdca53c8dfe51fdd5a24b5ca8d951ceebf8b369" data-hash="2863a506eaa69a4a15bb863c2fdca53c8dfe51fdd5a24b5ca8d951ceebf8b369">
<doorman-interface>
<fabric-header>
<h1><code>@fabric/doorman</code></h1>
</fabric-header>
<fabric-card class="ui card">
<fabric-card-content class="content">
<p>Waiting...</p>
</fabric-card-content>
</fabric-card>
</doorman-interface>
</body>
</html>
38 changes: 38 additions & 0 deletions components/interface.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
'use strict';

const Component = require('@fabric/http/types/component');
const Site = require('@fabric/http/types/site');

class Interface extends Site {
constructor (settings = {}) {
super(settings);

this.settings = Object.assign({
handle: 'doorman-interface',
state: {}
}, settings);

this._state = {
content: this.settings.state
};

return this;
}

_getHTML () {
return `
<${this.settings.handle}>
<fabric-header>
<h1><code>@fabric/doorman</code></h1>
</fabric-header>
<fabric-card class="ui card">
<fabric-card-content class="content">
<p>Waiting...</p>
</fabric-card-content>
</fabric-card>
</${this.settings.handle}>
`;
}
}

module.exports = Interface;
Loading