Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CI platforms to build Linux, Windows and OS X releases #63

Merged
merged 104 commits into from
Apr 13, 2018
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
5f4b5c6
Seeing what happens if I commit these three rough CI configs
JamesCropcho Mar 1, 2018
4f81b44
Trigger build
JamesCropcho Mar 1, 2018
d4a3457
Created a `yarn.lock`
JamesCropcho Mar 1, 2018
06fd74b
added `yarn-error.log` to .gitignore
JamesCropcho Mar 3, 2018
2997004
added `cross-env`; added `pack` script
JamesCropcho Mar 3, 2018
aedf597
attempting to move release files on Circle to a new directory
JamesCropcho Mar 3, 2018
b895334
Attempting pack on CircleCI
JamesCropcho Mar 3, 2018
0e5d8dd
Making .travis.yml more like Falcon's
JamesCropcho Mar 3, 2018
5dec6c4
Using Yarn instead of NPM in `package.json`
JamesCropcho Mar 3, 2018
5d6da67
making Electron-Builder a 'dev' dependency
JamesCropcho Mar 3, 2018
3827fb2
Appeasing Yarn with a new Node.js v6x.
JamesCropcho Mar 3, 2018
eb57c14
storing (hopefully) /dist artifacts
JamesCropcho Mar 3, 2018
2d0e1f9
Really this time, using node v6.13 and not v6.10
JamesCropcho Mar 3, 2018
e2fe196
Minor-upgrade Node.js images; only `pack` on v8.x, and once
JamesCropcho Mar 3, 2018
83afcc3
fixing a typo?
JamesCropcho Mar 3, 2018
7d2267d
Fixed typo?
JamesCropcho Mar 3, 2018
29c0c4a
Moving `steps` more smartly
JamesCropcho Mar 3, 2018
0ac0e72
using proper Workflow (CircleCI)
JamesCropcho Mar 3, 2018
23abdeb
I can't really work effectively with nondeterminstic timeout failures…
JamesCropcho Mar 3, 2018
5c856f2
Need to `checkout`?
JamesCropcho Mar 3, 2018
87e571e
I'm restoring the Worflow for CircleCI since I'm not working on it fo…
JamesCropcho Mar 3, 2018
a011055
Wrong place for CircleCI configuration
JamesCropcho Mar 3, 2018
2c27132
Trigger build
JamesCropcho Mar 3, 2018
bee2f94
Fixes for Travic CI configuration
JamesCropcho Mar 3, 2018
2b83e69
Commenting out Falcon-esque AppVeyor stuff
JamesCropcho Mar 3, 2018
1a16385
Hoping AppVeyor keeps the dist files
JamesCropcho Mar 3, 2018
0563675
better caching?
JamesCropcho Mar 3, 2018
e41a435
Yarn, we need not force you, yes, I hope?
JamesCropcho Mar 3, 2018
1dd78b5
Even more caching maybe?
JamesCropcho Mar 3, 2018
8c05123
Trigger build
JamesCropcho Mar 3, 2018
e132f65
Attempting restoration of the 7zip thing at @n-riesco's suggestion
JamesCropcho Mar 3, 2018
8fad4d7
Made my `package.json` more like Falcon's
JamesCropcho Mar 5, 2018
2bfbf5d
Fixed CI-specific config to match the new `package.json`
JamesCropcho Mar 5, 2018
51e7ebd
Trigger build
JamesCropcho Mar 5, 2018
be2e085
Trigger build
JamesCropcho Mar 5, 2018
3405a96
Trigger build
JamesCropcho Mar 5, 2018
e4287dd
Attempting "pro-ASAR" and "pro-compile"
JamesCropcho Mar 6, 2018
f99625d
Seeing what happens if I commit these three rough CI configs
JamesCropcho Mar 1, 2018
f4222f6
Created a `yarn.lock`
JamesCropcho Mar 1, 2018
131c35e
added `yarn-error.log` to .gitignore
JamesCropcho Mar 3, 2018
814b121
added `cross-env`; added `pack` script
JamesCropcho Mar 3, 2018
12b1663
attempting to move release files on Circle to a new directory
JamesCropcho Mar 3, 2018
60f9023
Attempting pack on CircleCI
JamesCropcho Mar 3, 2018
c38f288
Making .travis.yml more like Falcon's
JamesCropcho Mar 3, 2018
153c08a
Using Yarn instead of NPM in `package.json`
JamesCropcho Mar 3, 2018
a06bebf
making Electron-Builder a 'dev' dependency
JamesCropcho Mar 3, 2018
353b032
Appeasing Yarn with a new Node.js v6x.
JamesCropcho Mar 3, 2018
98ec707
storing (hopefully) /dist artifacts
JamesCropcho Mar 3, 2018
a3ff530
Really this time, using node v6.13 and not v6.10
JamesCropcho Mar 3, 2018
6bff159
Minor-upgrade Node.js images; only `pack` on v8.x, and once
JamesCropcho Mar 3, 2018
476d690
fixing a typo?
JamesCropcho Mar 3, 2018
2a3183c
Fixed typo?
JamesCropcho Mar 3, 2018
21a1071
Moving `steps` more smartly
JamesCropcho Mar 3, 2018
475c082
using proper Workflow (CircleCI)
JamesCropcho Mar 3, 2018
5e74260
I can't really work effectively with nondeterminstic timeout failures…
JamesCropcho Mar 3, 2018
38b65e0
Need to `checkout`?
JamesCropcho Mar 3, 2018
9cbb9cd
I'm restoring the Worflow for CircleCI since I'm not working on it fo…
JamesCropcho Mar 3, 2018
dcd04aa
Wrong place for CircleCI configuration
JamesCropcho Mar 3, 2018
5bc57e3
Fixes for Travic CI configuration
JamesCropcho Mar 3, 2018
56837e3
Commenting out Falcon-esque AppVeyor stuff
JamesCropcho Mar 3, 2018
beeeec1
Hoping AppVeyor keeps the dist files
JamesCropcho Mar 3, 2018
f161a07
better caching?
JamesCropcho Mar 3, 2018
4ec838a
Yarn, we need not force you, yes, I hope?
JamesCropcho Mar 3, 2018
a24d7fa
Even more caching maybe?
JamesCropcho Mar 3, 2018
0161fda
Attempting restoration of the 7zip thing at @n-riesco's suggestion
JamesCropcho Mar 3, 2018
e416deb
Made my `package.json` more like Falcon's
JamesCropcho Mar 5, 2018
63056cc
Fixed CI-specific config to match the new `package.json`
JamesCropcho Mar 5, 2018
d3ec2e0
Attempting "pro-ASAR" and "pro-compile"
JamesCropcho Mar 6, 2018
a6cef24
Merge branch 'test-builds-across-travis-circle-appveyor' of github.co…
JamesCropcho Mar 26, 2018
cf49276
Making .travis.yml look (even more?) like Falcon's w/r/t artifacts
JamesCropcho Mar 26, 2018
068399f
Hopefully fixing Travis CI build via paths issue resolving
JamesCropcho Mar 30, 2018
b7781fe
A typo, perhaps?
JamesCropcho Mar 30, 2018
cc257b7
No `release*.yml`
JamesCropcho Mar 30, 2018
5846500
"We don't really want to include release/linux-unpacked (131MB)."
JamesCropcho Apr 6, 2018
d0ddfca
Trigger build
JamesCropcho Apr 6, 2018
7bca355
"In Falcon, we also keep a cache for .git."
JamesCropcho Apr 6, 2018
a8c0007
"If I'm not mistaken using {{ .Environment.CIRCLE_JOB }} defeats the …
JamesCropcho Apr 6, 2018
416727d
Trigger build
JamesCropcho Apr 6, 2018
5565f69
Trigger build
JamesCropcho Apr 6, 2018
c8366be
"I'd add the same steps to save and restore caches for .git and node_…
JamesCropcho Apr 6, 2018
16074a8
Trigger build
JamesCropcho Apr 6, 2018
0ab9188
"I don't know why these paths are listed in the cache. Have you found…
JamesCropcho Apr 6, 2018
8afaf50
"we need to disable asar"
JamesCropcho Apr 6, 2018
fea522b
"getExportedArgs should use slice(1) instead of slice(2) when the exe…
JamesCropcho Apr 6, 2018
50c728b
Trigger build
JamesCropcho Apr 6, 2018
7b7a265
Trigger build
JamesCropcho Apr 7, 2018
e61bddf
Trigger build
JamesCropcho Apr 7, 2018
a8c5a89
Revert ""getExportedArgs should use slice(1) instead of slice(2) when…
JamesCropcho Apr 7, 2018
b308e9f
"@JamesCropcho solving the issue with getExportedArgs requires a bit …
JamesCropcho Apr 7, 2018
1b85311
"The upside being a package lock file? In that case, that's not an up…
JamesCropcho Apr 7, 2018
0868830
Committing package-lock.json
JamesCropcho Apr 7, 2018
cb7b0a2
`npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.1.0`
JamesCropcho Apr 7, 2018
324f7bf
"If we include cross-env in dependecies, then cross-env will be inclu…
JamesCropcho Apr 7, 2018
7e66d21
`npm ERR! missing: ajv@^5.1.0, required by har-validator@5.0.3`
JamesCropcho Apr 7, 2018
a5b0e51
Use a Plotly e-mail address for 'maintainer'
JamesCropcho Apr 7, 2018
1d0b175
"We still need to include AppImage in build.linux.target."
JamesCropcho Apr 7, 2018
4d7fd09
Optimized CircleCi workflow
JamesCropcho Apr 7, 2018
4625de9
"In Falcon we use 2 caches: one for .git, and another for node_modules"
JamesCropcho Apr 7, 2018
2225b5a
Trigger build
JamesCropcho Apr 7, 2018
0880a4e
`ERR! missing script: rebuild:modules:electron`
JamesCropcho Apr 7, 2018
582bb93
Trigger build
JamesCropcho Apr 7, 2018
890ac78
"I prefer locking down the image versions."
JamesCropcho Apr 11, 2018
4a2c81c
"I forgot about Étienne's comment: we should remove `ajv` from the de…
JamesCropcho Apr 11, 2018
1b78585
"How about merging docker-push and docker-build into one job? Then, t…
JamesCropcho Apr 11, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 27 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ workflows:
- test-node-v6
- test-node-v8
- docker-build
- electron-pack-and-release:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job didn't run:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n-riesco It appears to me that "electron-pack-and-release" is running: https://circleci.com/gh/plotly/image-exporter/tree/test-builds-across-travis-circle-appveyor

(See #1124 for example.)

Please pardon, am I missing something simple?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesCropcho For some reason, github doesn't show the build (as seen on the above screenshot). Since circleCI runs the job, then this isn't an issue.

requires:
- test-node-v6
- test-node-v8

version: 2
jobs:
Expand All @@ -29,7 +33,7 @@ jobs:
- run:
name: List versions
command: |
echo "npm: $(npm --version)"
echo "yarn: $(yarn --version)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer sticking to npm unless yarn has clear upsides.

Copy link
Contributor

@etpinard etpinard Mar 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... though adding a packing-lock.json file to this project should help us trigger consistent builts on CI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesCropcho BTW, Dockerfile and deployment/Dockerfile are still using npm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @etpinard, I switched to Yarn because Falcon uses Yarn. (You will notice this is a recurring pattern.) So, you would only want Yarn if there are clear upsides, but you also list one clear upside to Yarn. So, would you the program to use Yarn or NPM? I am happy to do it either way; let me know!

@n-riesco

BTW, Dockerfile and deployment/Dockerfile are still using npm.

On the off chance it's not just a tiny oversight, ./Dockerfile does not exist:

$ find . -name Dockerfile
./deployment/Dockerfile
$

However, I would be happy to amend the existing Dockerfile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you also list one clear upside to Yarn.

The upside being a package lock file? In that case, that's not an upside, npm has one now. Voting for npm here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no preference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard @n-riesco I have reverted to NPM.

echo "node: $(node --version)"
- checkout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- restore_cache:
Expand All @@ -39,40 +43,39 @@ jobs:
- run:
name: Install deps
command: |
npm install
yarn install
sudo apt-get install poppler-utils
- run:
name: List deps
command: |
npm ls
yarn list
pdftops -v
- save_cache:
paths:
- node_modules
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken using {{ .Environment.CIRCLE_JOB }} defeats the purpose of having a cache.
Falcon uses key: v2-yarn-{{ checksum "yarn.lock" }}.
key: v2-yarn-{{ checksum "package-lock.json" }} should work with npm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye @n-riesco !

We use this in plotly.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n-riesco @etpinard Oh my, I am embarrassed at such a silly mistake!

Okay, I have updated config.yml to use the recommended key for Yarn (if/when we revert to NPM, I'll use the NPM key instead).

What do you think?

- run:
name: Test
command: npm test
command: yarn run test
- run:
name: Coverage
command: npm run coverage
command: yarn run coverage
- store_artifacts:
path: build

test-node-v6:
<<: *base
docker:
- image: circleci/node:6.10.3-browsers
- image: circleci/node:6-browsers

test-node-v8:
<<: *base
docker:
- image: circleci/node:8.4.0-browsers
- image: circleci/node:8-browsers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard My rationale, is that this software is made to run on many people's personal computers, with diverse versioning profiles, rather than servers for which Plotly has complete control to use only one very precise version.

I am happy to revert this change if Plotly wishes me to do so, otherwise I vote to keep this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer locking down the image versions. I don't think this project is likely to break from one minor release of node.js to another.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I have made this change. How's it look?


docker-build:
docker:
- image: circleci/node:6.10.3-browsers

- image: circleci/node:8-browsers
steps:
- setup_remote_docker:
reusable: true
Expand All @@ -90,10 +93,9 @@ jobs:
docker run -d -p 9091:9091/tcp --name imageserver quay.io/plotly/image-exporter:$CIRCLE_SHA1
docker run --network container:imageserver quay.io/plotly/wget wget --retry-connrefused --waitretry=1 -t 60 -O /dev/null --progress=dot http://localhost:9091/ping


docker-push:
docker:
- image: circleci/node:6.10.3-browsers
- image: circleci/node:8-browsers

steps:
- setup_remote_docker:
Expand All @@ -106,3 +108,17 @@ jobs:
docker tag quay.io/plotly/image-exporter:$CIRCLE_SHA1 quay.io/plotly/image-exporter:$CIRCLE_BRANCH
docker push quay.io/plotly/image-exporter:$CIRCLE_SHA1
docker push quay.io/plotly/image-exporter:$CIRCLE_BRANCH

electron-pack-and-release:
docker:
- image: circleci/node:8-browsers
steps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add the same steps to save and restore caches for .git and node_modules as those in the job test-node-v8.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n-riesco good call. Okay, I have added these caches: https://circleci.com/gh/plotly/image-exporter/1201#config/containers/0. I ran the builds twice after this change, to ensure it worked with and without a primed cache—all good. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesCropcho {{ checksum "yarn.lock" }} is only good for node_modules. I'd remove .git from paths.

In Falcon we use 2 caches:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, @n-riesco . I have changed the CircleCI caching strategy as per your recommendations, and tested with fresh and primed caches.

- checkout
- run:
name: Install deps
command: yarn install
- run:
name: Electron-Builder pack
command: yarn run pack
- store_artifacts:
path: release
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really want to include release/linux-unpacked (131MB).
See how Falcon does it:
https://github.com/plotly/falcon-sql-client/blob/3ebfd4d20a14973f6023990fabfff0cc285e0b21/circle.yml#L37-L41

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay @n-riesco, I believe you'll like it now: https://circleci.com/gh/plotly/image-exporter/1172#artifacts/containers/0. What do you think?

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ coverage
.nyc_output

/build
dist/
/release

deployment/*.retry

/yarn-error.log
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
matrix:
include:
- os: osx
osx_image: xcode9.0
language: node_js
node_js: "8"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
yarn: true

install:
- yarn install

script:
- yarn run pack
- zip mac-release.zip release/Plotly\ Graph\ Exporter*

before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

addons:
artifacts:
s3_region: us-east-1
paths: mac-release.zip
debug: true
34 changes: 34 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 0.1.{build}

environment:
matrix:
- nodejs_version: 8

platform:
- x64

#services:

cache:
- '%USERPROFILE%\.electron'
- C:\Users\appveyor\AppData\Local\electron-builder\cache
- C:\projects\image-exporter-vm18n\node_modules
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesCropcho I don't know why these paths are listed in the cache. Have you found any documentation about this?

I've noticed electron-builder uses these paths

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n-riesco I am unsure why I chose those paths, however I feel most confident copying from Electron-Builder, so I have replaced my cache entries with theirs.

AppVeyor has not been running builds for the past fifteen minutes, so I am unable to verify a lack of errors at present.


init:
- git config --global core.autocrlf input

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- yarn install

build_script:
- yarn run pack

after_build:
- 7z a release.zip release/latest.yml release/*.exe

artifacts:
- path: release.zip
name: release

test: off
44 changes: 31 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,43 @@
"test:lint": "standard | snazzy",
"test:unit": "tap test/unit/*_test.js",
"test:integration": "tap test/integration/*_test.js",
"test": "npm run test:lint && npm run test:unit && npm run test:integration",
"coverage": "npm run test:unit -- --cov",
"lint": "standard --fix"
"test": "yarn run test:lint && yarn run test:unit && yarn run test:integration",
"coverage": "yarn run test:unit -- --cov",
"lint": "standard --fix",
"pack": "cross-env NODE_ENV=production electron-builder --publish=never"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this works? Nice!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It certainly seems to, both locally and across all three CI environments.

},
"build": {
"appId": "com.plotly.image-exporter.graph-exporter",
"electronCompile": false,
"productName": "Plotly Graph Exporter",
"copyright": "Copyright © 2018 ${author}",
"files": [
"bin",
"src"
],
"appImage": {
"systemIntegration": "doNotAsk",
"category": "Utility"
"systemIntegration": "doNotAsk"
},
"linux": {
"category": "Utility",
"executableName": "plotly-graph-exporter",
"maintainer": "enquiries@nicolasriesco.net",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard I guess that here should go your email.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n-riesco Please excuse this error or mine! I am sure I copied this from Falcon.

@etpinard @jackparmer @chriddyp Would you like me to put one of my email address in here? I suspect you'd prefer something which looks like support@plotly.com, and I probably would, too, but let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can put chris@plot.ly if you want

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done so.

"target": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesCropcho I guess you want to add "AppImage", here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n-riesco I'm probably missing something silly here, but isn't AppImage on line 28?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesCropcho https://github.com/plotly/image-exporter/blob/cc257b7cc36b8d3c4353c177efb1d4c8cc34fd2b/package.json#L28-L30 only configures the builder. We still need to include AppImage in build.linux.target.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done this.

"tar.gz"
]
},
"win": {
"target": [{
"target": "nsis"
}]},
"target": [
"nsis"
]
},
"mac": {
"target": [{
"target": "default"
}]}
"category": "public.app-category.tools",
"target": [
"dmg"
]
},
"directories": {
"output": "release"
}
},
"author": "Plotly, Inc.",
"keywords": [
Expand All @@ -44,6 +60,7 @@
],
"dependencies": {
"body": "^5.1.0",
"cross-env": "^5.1.3",
Copy link
Contributor

@n-riesco n-riesco Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, cross-env should go devDependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n-riesco I am inclined to keep cross-env in dependencies{} but I could easily move it to devDependencies{} if you'd like.

The thing is, this software is going to be executed by end-users in the command line (if only as a subprocess in a Pip package, or maybe more directly) on Windows and OS X environments. I worry about consistency across all environments with regards to environment variables.

@n-riesco et al, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesCropcho That's not my understanding. We want to distribute image-exporter as an electron app, so that end-users don't have to install node.

If we include cross-env in dependecies, then cross-env will be included in the electron app (and the electron app doesn't use it).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have moved cross-env to devDependencies.

"fast-isnumeric": "^1.1.1",
"file-type": "^7.2.0",
"get-stdin": "^5.0.1",
Expand All @@ -63,6 +80,7 @@
"devDependencies": {
"devtron": "^1.4.0",
"electron": "^1.7.9",
"electron-builder": "^20.2.0",
"electron-debug": "^1.4.0",
"image-size": "^0.6.1",
"sinon": "^3.2.0",
Expand Down