App management for Aurelia
Will likely be integrated with monterey at some point in the future. For our vision, please see the moneterey book
Install the module with: npm install ai-app
const app = require('ai-app');
- layout/skeleton: the folder structure of an app artifact, such as the /src folder (app) or the individualt sub-apps within.
- repo: repository
- pwa: Progressive Web App
create: function(srcLayout)
install: function(name)
uninstall: function(),
bundle: function(name),
unbundle: function(name),
skeleton: {
create: function(name, skeleton) // create app skeleton
install: function(name, repo),
uninstall: function(name),
bundle: function(name),
unbundle: function(name)
},
pwa: {
create: function(skeleton),
install: function(repo),
uninstall: function()
}
Note: pwa
is a Progressive Web App (manifest, service worker etc.) to make it almost function like a native app.
ai-app -h
- index of commands and how to call themai-app create <app|skeleton|pwa> [name] [skeleton]
- create an app artifactai-app install <app|skeleton|pwa> [name]
- install an app artifactai-app uninstall <app|skeleton|pwa> [name]
- uninstall an app artifactai-app list <skeleton>
- list registered skeleton
-
ai-app create app
- create the main src skeleton for the app -
ai-app create app multi
- create the main src skeleton for the app using 'multi' app skeleton -
ai-app create app simple
- ... using 'simple' app skeleton -
ai-app create skeleton
- create an app skeleton -
ai-app create skeleton user
- create an app skeleton named 'user' -
ai-app create skeleton guest simple
- craete an app skeleton named 'guest' using 'simple' skeleton -
ai-app create pwa
- create a pwa -
ai-app create pwa simple
- create a pwa using 'simple' pwa skeleton
ai-app install app kristianmandrup/my-app
- install src skeleton from repoai-app install skeleton user kristianmandrup/my-app
- install app skeleton from repoai-app install pwa kristianmandrup/my-pwa
- install pwa from repo
ai-app uninstall app
- uninstall all sub appsai-app uninstall app user
- uninstall the sub-app userai-app uninstall pwa
- remove the current pwa
The app of an Aurelia CLI generate project lives in /src
.
The app has a src skeleton, which typically consists of resources
, assets
, sub-apps etc.
The app is generated via the app
type, either created from a registered/custom skeleton or downloaded from a repo.
For complex apps, it can make sense with a multi
app skeleton, with at least the following sub-apps:
- guest (not logged in)
- user (logged in)
- admin (logged in with admin role)
- ...
Each of the sub-apps are generated with a specific skeleton. A sub-app can itself be a multi app skeleton for a truly nested application!
Sub-apps are generated via the skeleton
type, either created from a registered/custom skeleton or downloaded from a repo.
An app consists of sub-apps and components (generally referred to as app components
) which can be nested.
When installed, each app component can have an install.json
file for installing its dependencies.
These are traversed depth first to generate the full install.json
higher up in the hierarchy.
Finally, a pwa
can be created, installed from repo or uninstalled. Just like apps,
they can have different registered/custom layouts.
A pwa is also an app component with an (optional) install.json
file.
Ideally we would like a web interface where you can get an overview of registered app layouts and skeletons, pick and choose, then drag into your app to install it which runs the CLI commands underneath, gracefully maintaining and updating all dependencies etc.
Please submit all issues and pull requests to the kristianmandrup/ai-app repository!
If you have any problem or suggestion please open an issue here.
The MIT License
Copyright (c) 2016, Kristian Mandrup
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.