Skip to content

Web Components v2 #9

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

Merged
merged 22 commits into from
Apr 13, 2024
Merged
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
27 changes: 19 additions & 8 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
name: Publish Docs
on:
push:
branches:
- main
release:
types: [created]
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '12.x'
node-version: 'latest'
registry-url: 'https://npm.pkg.github.com'
scope: '@djthorpe'
- run: npm install
- run: npm run docs
- uses: LuisEnMarroquin/[email protected]

- name: Generate Documentatin
run: |
npm install
npm run docs

- name: Deploy Documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
FOLDER: dist/doc
SSHKEY: ${{ secrets.SSH }}
folder: dist/doc
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ dist
.tern-port
.DS_Store
.apdisk
._*
.DS_Store
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

41 changes: 0 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,2 @@
# js-framework

This Javascript framework is a pretty traditional Model, View and Controller
implementation which provides the following classes:

* __Controller class__: Subclass this and hook your views and provider events together;
* __Provider class__: To be used to request JSON objects and arrays of objects from an external source;
* __Model class__: subclass this for your JSON models, and separately define the members of your class;
* __View classes__: classes are provided for form, list, button, etc.

It uses [Bootstrap](https://getbootstrap.com/) to implement the underlying user
interface, adding a few components.

## Use

Add the framework as a dependency in your project:

```bash
[bash] echo "@djthorpe:registry=https://npm.pkg.github.com" >> .npmrc
[bash] npm install @djthorpe/js-framework
```

Import assets and create a controller in your JavaScript:

```javascript
const jsframework = require('@djthorpe/js-framework');

// Run application
window.addEventListener('DOMContentLoaded', () => {
const app = jsframework.Controller.New(Controller);
app.main();
});
```

In reality, you would subclass the `Controller` class, and create models, views
and providers within the controller, then use `addEventListener` for each view
and provider to react to events. More informaton is provided in the documentation.

## Reference

The reference is provided in the `dist/doc` folder in the published package, or at
https://djthorpe.github.io/js-framework/

7 changes: 2 additions & 5 deletions config/jsdoc.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"source": {
"include": [
"js"
"src"
],
"exclude": [
"node_modules"
Expand All @@ -12,8 +12,5 @@
"readme": "./README.md",
"destination": "./dist/doc",
"recurse": true
},
"plugins": [
"./node_modules/@ckeditor/jsdoc-plugins/lib/export-fixer/export-fixer.js"
]
}
}
103 changes: 0 additions & 103 deletions css/style.css

This file was deleted.

12 changes: 0 additions & 12 deletions etc/example.json

This file was deleted.

8 changes: 0 additions & 8 deletions etc/server.yaml

This file was deleted.

139 changes: 0 additions & 139 deletions html/index.html

This file was deleted.

Loading