Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RUN apt-get update && \
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

CMD [ "/bin/bash" ]
CMD bash provision.sh && cd tools && node_modules/.bin/gulp watch
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# stratos-ui

## Pre-requisite
If running on OSX and VirtualBox, you will likely need to create a docker machine with the `--virtualbox-cpu-count=2`.
If running on OSX and VirtualBox, you will likely need to create a Docker machine with the `--virtualbox-cpu-count=2` flag.
```
docker-machine create --driver virtualbox --virtualbox-cpu-count=2 default
```

## Build docker image
## Build Docker image
```
docker build -t stratos-ui .
```

## Create and start docker container
## Create and start Docker container
```
docker run -it --rm --name stratos-ui -v $(pwd):/usr/src/app -v $(pwd)/../helion-ui-framework:/usr/src/helion-ui-framework -v $(pwd)/../helion-ui-theme:/usr/src/helion-ui-theme stratos-ui /bin/bash

$ bash provision.sh
```

## Create and start Docker container with Gulp watch
```
docker run -d --name stratos-ui -v $(pwd):/usr/src/app -v $(pwd)/../helion-ui-framework:/usr/src/helion-ui-framework -v $(pwd)/../helion-ui-theme:/usr/src/helion-ui-theme stratos-ui
```

## Provision container
```
docker exec -d stratos-ui /bin/bash provision.sh
Expand All @@ -42,7 +47,7 @@ $ ./node_modules/protractor/bin/webdriver-manager update
$ ./node_modules/protractor/bin/webdriver-manager start
```

Open another terminal and run Protractor. You'll need to run 'eval' again for your docker machine (replace 'default' with your machine name).
Open another terminal and run Protractor. You'll need to run 'eval' again for your Docker machine (replace 'default' with your machine name).
```
eval "$(docker-machine env default)"
docker exec -it stratos-ui /bin/bash
Expand Down
14 changes: 13 additions & 1 deletion tools/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ var scssSourceFiles = [
];


var scssFiles = [
paths.src + '**/*.scss'
]


var cssFiles = [
paths.dist + 'index.css'
];
Expand Down Expand Up @@ -72,7 +77,7 @@ gulp.task('css', function () {
gulp.task('html', function () {
return gulp
.src(partials, { base: paths.src })
.pipe(gulp.dest(paths.dist)) ;
.pipe(gulp.dest(paths.dist));
});


Expand Down Expand Up @@ -106,6 +111,13 @@ gulp.task('index:inject', function () {
});


gulp.task('watch', function () {
gulp.watch(jsFiles, [ 'js' ]);
gulp.watch(scssFiles, [ 'css' ]);
gulp.watch(partials, [ 'html' ]);
});


gulp.task('clean', function (next) {
del(paths.dist, { force: true }, next);
});
Expand Down