Easily generate Ju webapps and components using Yo
From zero to nihao world in a few steps.
- Install yo
- Install this generator
npm install -g generator-ju
- Run CLI util and answer all the questions
yo ju
We provide a docker container with nginx webserver, as it is required to load resources (like HTML files) from the browser. To use it:
- Install docker
- Install docker-compose
- In the generated project root, run:
docker-compose up -d
If the installation was fine, you can go to http://localhost:8080 and you should see a message saying "nihao Ju!".
Please note that you can also test your app by opening the index.html
file located at your_project_root/public
, but you won't be able to dynamically load resources.
Refer to the Github repositories of Ju framework for details about app development:
- ju-shared for Object Oriented Javascript and utils
- ju-mvc for dynamic webapps
- ju-components for web components development
- ju-model for progressive data management
Run yo ju:components
and answers all the questions.
You will obtain a basic component that can handle resources and remote data.
Run yo ju:module
and answers all the questions.
You will obtain a class like structure, either using plain prototypes (module), a class with inheritance, singleton and static members or everything plus observer pattern.
Run yo ju:model
and specify the Model Definition name, the file name and path, and the middleware you wish to add (AJAX and WebStorage providers are avilable now, there are more in the way).
You will obtain a Model definition, that you can modify to inject middleware to every API method, to instatiate it later and perform data operations.
Run yo ju:readme
and follow the steps to generate a README markdown file for your library (:
It will include common sections, like getting started, references and all the stuff you may want to make a good documentation