Skip to content
Open
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
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
"es2015"
],
"plugins": [
"transform-async-to-generator",
"source-map-support"
],
"sourceMaps": "inline"
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
benchmark
14 changes: 11 additions & 3 deletions .eslintrc.js → .eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
module.exports = {
{
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
"sourceType": "module",
"ecmaVersion": 2017
},
"rules": {
"prefer-destructuring": ["error", {
"array": true,
"object": true
}, {
"enforceForRenamedProperties": false
}
],
"indent": [
"error",
4
Expand All @@ -33,4 +41,4 @@ module.exports = {
"as-needed"
]
}
};
}
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ os:
- linux
- osx
osx_image: xcode8
script: 'npm test'
cache:
directories:
- node_modules
install:
- npm install
- npm run lint
- npm run build
script:
- npm run test-build
# cache:
# directories:
# - node_modules
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:4-alpine
RUN apk --no-cache add perl

ADD package.json /app/package.json
RUN cd /app && npm install

ADD . /app
WORKDIR /app
RUN npm install

# ENV NODE_ENV production
CMD ["npm", "run", "build"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,17 @@ context.globalExiftoolConstructor = exiftool.ExiftoolProcess
Otherwise, the context will use a stable version which it installs
independently.

## Building

The project is written with ES2017 (`async/await`) and built to be compatible
with lower Node.js versions using `Babel`. `npm run build` will build source
and test files. `npm run test-build` will run transpiled tests against
transpiled sources, whereas `npm t` will run raw tests against raw source files.

The preset used for transpiling is `es2015`, but without
`transform-es2015-classes`, and with `transform-async-to-generator` and
`source-map-support`.

## Metadata

Metadata is awesome and although it can increase the file size, it preserves
Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ install:
- ps: Install-Product node $env:nodejs_version
# install modules
- npm install
- npm run lint
# transpile
- npm run build

# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
# run tests
- npm test
- npm run test-build

# Don't actually build.
build: off
91 changes: 91 additions & 0 deletions dist/src/begin-ready.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions dist/src/execute-with-rs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading