Simple seed project for component(1) based apps.
- Clone or download the repo
- Change the project name, description, version etc. in
component.json
- Run
make
and open your browser toindex.html
. You should see "works!" in red.
A few assumptions:
index.html
is your landing page andlib/boot/
is your app's entry point component.- All local components will be created under
lib/
- Each local component will define it's own dependencies
To create a new local component:
$ component create -l lib/<component-name>
To require it from another local component, add <component-name>
to the local
array in component.json
of the requiring component.
Search for components:
$ component search <component-name>
Add the component <github-username>/<component-name>
to the local component's dependencies
object with the value being the version number or *
for latest.
Note that all dependencies will be installed in the root directory's component/
Build for development:
$ make
For a nicer workflow install watch(1) to build everytime a source file changes:
$ watch make
Install dependencies:
$ make components
To create a production build you need to install component-minify and run:
$ make minify
To clean the working directory from build files (useful for updating components):
$ make clean