Skip to content

Commit

Permalink
Merge pull request #9 from djthorpe/dev
Browse files Browse the repository at this point in the history
Web Components v2
  • Loading branch information
djthorpe authored Apr 13, 2024
2 parents e3a831b + ad15e4a commit 53f3391
Show file tree
Hide file tree
Showing 100 changed files with 2,879 additions and 10,407 deletions.
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

0 comments on commit 53f3391

Please sign in to comment.