Skip to content

Commit 3c58297

Browse files
committed
docker
1 parent 73ba743 commit 3c58297

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

.babelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"plugins": [
3-
"check-es2015-constants",
43
"transform-es2015-arrow-functions",
54
"transform-es2015-block-scoped-functions",
65
"transform-es2015-block-scoping",

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:4-alpine
2+
RUN apk --no-cache add perl
3+
4+
ADD package.json /app/package.json
5+
RUN cd /app && npm install
6+
7+
ADD . /app
8+
WORKDIR /app
9+
RUN npm install
10+
11+
# ENV NODE_ENV production
12+
CMD ["npm", "run", "build"]

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,17 @@ context.globalExiftoolConstructor = exiftool.ExiftoolProcess
718718
Otherwise, the context will use a stable version which it installs
719719
independently.
720720

721+
## Building
722+
723+
The project is written with ES2017 (`async/await`) and built to be compatible
724+
with lower Node.js versions using `Babel`. `npm run build` will build source
725+
and test files. `npm run test-build` will run transpiled tests against
726+
transpiled sources, whereas `npm t` will run raw tests against raw source files.
727+
728+
The preset used for transpiling is `es2015`, but without
729+
`transform-es2015-classes`, and with `transform-async-to-generator` and
730+
`source-map-support`.
731+
721732
## Metadata
722733

723734
Metadata is awesome and although it can increase the file size, it preserves

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"bench": "node benchmark/run",
1515
"build-src": "babel src --out-dir dist/src",
1616
"build-test": "babel test --out-dir dist/test",
17-
"build": "run-p build-src build-test",
17+
"build": "run-s build-src build-test",
1818
"build-and-test": "run-s build test-build",
1919
"callback-example": "LOCAL=1 node examples/callback examples/28.jpg",
2020
"write-example": "node examples/write_metadata/index",

0 commit comments

Comments
 (0)