0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00
penpot/README.md

103 lines
2.5 KiB
Markdown
Raw Normal View History

2015-06-18 12:35:50 -05:00
# UXBox #
2016-02-04 16:04:38 -05:00
[![Travis Badge](https://img.shields.io/travis/uxbox/uxbox/master.svg)](https://travis-ci.org/uxbox/uxbox "Travis Badge")
2016-03-01 12:50:30 -05:00
## Development Environment ##
2016-02-04 16:04:38 -05:00
2016-03-01 12:50:30 -05:00
### Introduction ###
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
The development environment consists in a docker container that mounts your local
copy of the uxbox souce code directory tree and executes a tmux inside the container
in order to facilitate execute multiple processes inside.
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
### System requirements ###
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
You should have `docker` installed in your system in order to set up properly
the uxbox development enviroment.
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
In debian like linux distributions you can install it executing:
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
```bash
sudo apt-get install docker
2015-06-18 12:35:50 -05:00
```
2016-03-01 12:50:30 -05:00
### Build the docker image ###
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
In order to build the docker image, you should clone **uxbox-docker** repository:
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
```bash
git clone git@github.com:uxbox/uxbox-docker.git
2015-06-18 12:35:50 -05:00
```
2016-03-01 12:50:30 -05:00
And build the image executing that:
```bash
cd uxbox-docker
sudo docker build --rm=true -t uxbox .
2015-06-18 12:35:50 -05:00
```
2016-03-01 12:50:30 -05:00
### Start the docker image ###
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
The docker development environment consists in a tmux executed inside the docker
container giving you the ability to execute multiple processes like one virtual
machine.
2016-01-20 11:48:23 -05:00
2016-03-01 12:50:30 -05:00
**Requires a minimum knowledge of tmux usage in order to use that development
environment.**
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
For start it, staying in this repository, execte:
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
```bash
./scripts/docker
2015-06-18 12:35:50 -05:00
```
2016-03-01 12:50:30 -05:00
This command will start a new named container, if you stops it and starts again
the data is conserved because the same container will be resumed again.
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
### First steps inside ###
Now having the the container running and tmux open inside the container, you are
free to execute any commands and open many shells as you want. The basic frontend
development requires at least *two shells*.
In the first shell (the defaul one) execute:
```bash
2015-06-18 12:35:50 -05:00
npm run watch
```
2016-03-01 12:50:30 -05:00
That command will launch the gulp process that compiles sass and template file
and will keep watching for recomplie the sass files when they are changed.
2015-06-18 12:35:50 -05:00
2016-03-01 12:50:30 -05:00
For create a new shell just press the following key shortcut: **Ctr+b c**.
Once the new shell is created, execute the clojurescript compiler process:
```bash
npm run figwheel
2015-06-18 12:35:50 -05:00
```
2016-03-01 12:50:30 -05:00
You can use **Ctrl+b w** for switch between the existing shells and **Ctrl+b &** for
kill the current shell.
## Other topics ##
2015-06-18 12:35:50 -05:00
2016-01-20 11:48:23 -05:00
### Transformation from HTML to hiccup ###
2015-06-18 12:35:50 -05:00
For transforming the generated HTMLs to hiccup form, execute the following command:
```
$ lein with-profile +front hicv 2clj resources/public/templates/*.html
```
The `.clj` files in the `hicv` directory will contain the hiccup versions of the HTML templates.
## License ##
TODO