Skip to content

Commit

Permalink
Add Babel Docker service
Browse files Browse the repository at this point in the history
Want to edit .es6 files and have them automatically transpile on save from edit editor? Run `docker-compose up`
  • Loading branch information
kevincupp committed Aug 22, 2018
1 parent 47ad4ea commit ca0bb9a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node

WORKDIR /opt/app
COPY package.json /opt/app

RUN npm install
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.1'

services:
babel:
image: ee_node_tools
build:
context: .
command: node_modules/.bin/babel themes/ee/asset/javascript/src/ --watch -x ".es6" --out-dir themes/ee/asset/javascript/src/
volumes:
- .:/opt/app:delegated
- /opt/app/node_modules # Prevent local node_modules from being mounted

0 comments on commit ca0bb9a

Please sign in to comment.