Skip to content

Commit

Permalink
Merge pull request #385 from weaveworks/js-tooling
Browse files Browse the repository at this point in the history
Update the JS tooling
  • Loading branch information
davkal committed Aug 24, 2015
2 parents 7ca9dd3 + 392f8ce commit bd45b26
Show file tree
Hide file tree
Showing 18 changed files with 268 additions and 1,176 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ client/build/app.js: client/app/scripts/*
mkdir -p client/build
docker run -ti -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/build:/home/weave/build \
$(SCOPE_UI_BUILD_IMAGE) gulp build --release
$(SCOPE_UI_BUILD_IMAGE) npm run build

client-test: client/test/*
docker run -ti -v $(shell pwd)/client/app:/home/weave/app \
Expand All @@ -56,18 +56,18 @@ client-lint:
-v $(shell pwd)/client/test:/home/weave/test \
$(SCOPE_UI_BUILD_IMAGE) npm run lint

client-sync:
client-start:
docker run -ti --net=host -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/build:/home/weave/build \
$(SCOPE_UI_BUILD_IMAGE) gulp sync
$(SCOPE_UI_BUILD_IMAGE) npm start

$(SCOPE_UI_BUILD_EXPORT): client/Dockerfile client/gulpfile.js client/package.json client/webpack.config.js client/.eslintrc
$(SCOPE_UI_BUILD_EXPORT): client/Dockerfile client/package.json client/webpack.local.config.js client/webpack.production.config.js client/server.js client/.eslintrc
docker build -t $(SCOPE_UI_BUILD_IMAGE) client
docker save $(SCOPE_UI_BUILD_IMAGE):latest > $@

clean:
go clean ./...
rm -rf $(SCOPE_EXPORT) $(SCOPE_UI_BUILD_EXPORT) $(APP_EXE) $(PROBE_EXE) client/build
rm -rf $(SCOPE_EXPORT) $(SCOPE_UI_BUILD_EXPORT) $(APP_EXE) $(PROBE_EXE) client/build/app.js

deps:
go get \
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies:
- make deps
- mkdir -p $(dirname $SRCDIR)
- cp -r $(pwd)/ $SRCDIR
- cd $SRCDIR/client; $TOOLS/rebuild-image weaveworks/scope-ui-build . Dockerfile gulpfile.js package.json webpack.config.js .eslintrc
- cd $SRCDIR/client; $TOOLS/rebuild-image weaveworks/scope-ui-build . Dockerfile package.json webpack.production.config.js .eslintrc

test:
override:
Expand Down
3 changes: 2 additions & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
build
build/app.js
build/*[woff2?|ttf|eot|svg]
3 changes: 1 addition & 2 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM node:0.10
WORKDIR /home/weave
RUN npm install -g gulp
COPY package.json /home/weave/
RUN npm install
COPY gulpfile.js webpack.config.js .eslintrc /home/weave/
COPY webpack.local.config.js webpack.production.config.js server.js .eslintrc /home/weave/
6 changes: 3 additions & 3 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
## Getting Started

- Setup: `npm install`
- Build: `gulp build --release`, output will be in `build/`
- Develop: `gulp sync` and then open `http://localhost:4042/`
- Build: `npm run build`, output will be in `build/`
- Develop: `npm start` and then open `http://localhost:4042/`

To see a topology, `../app/app` needs to be running, as well as a probe.

## Coding

This directory has a `.eslintrc`, make sure your editor supports linter hints.
To run a linter, you also run `gulp lint`.
To run a linter, you also run `npm run lint`.

## Logging

Expand Down
Loading

0 comments on commit bd45b26

Please sign in to comment.