-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from djthorpe/dev
Web Components v2
- Loading branch information
Showing
100 changed files
with
2,879 additions
and
10,407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,5 @@ dist | |
.tern-port | ||
.DS_Store | ||
.apdisk | ||
._* | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.