Skip to content

Commit

Permalink
moved electron packages to optionalDependencies and added flag to omi…
Browse files Browse the repository at this point in the history
…t them from general builds
  • Loading branch information
Awhiteweb committed Jan 21, 2023
1 parent 195057c commit adf780f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm install --omit=optional
- name: Preparation
id: prep
run: node export-docs -l=_site -r=Superalgos
Expand Down
2 changes: 1 addition & 1 deletion Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WORKDIR /app
COPY . .
RUN apk add --no-cache --virtual .build-deps make g++ unzip bash curl \
&& apk add --no-cache python3 \
&& npm ci \
&& npm ci --omit=optional \
&& ./Docker/download-plugins.sh \
&& mkdir -p ./Platform/My-Data-Storage ./Platform/My-Log-Files ./Platform/My-Workspaces ./Platform/My-Network-Nodes-Data ./Platform/My-Social-Trading-Data \
&& addgroup superalgos \
Expand Down
6 changes: 3 additions & 3 deletions Launch-Scripts/runSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ const runSetup = async (tfjs=false) => {

async function runInstallCommands() {
try {
await executeCommand('echo Results of install at ' + process.cwd() + ' & npm ci')
await executeCommand('echo Results of install at ' + process.cwd() + ' & npm ci --omit=optional')
}
catch(err) {
if(err.message.indexOf('package.json and package-lock.json') > -1) {
console.error('npm ci failed package.json and package-lock.json are not in sync')
console.log('running npm install')
await executeCommand('npm install')
console.log('running npm install --omit=optional')
await executeCommand('npm install --omit=optional')
}
else {
throw err
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ If you are having difficulty running the node setup command here are a few commo

3. For Windows it is important that you have C:\Windows\System32 added to your global PATH. For instructions on how to do this google "add to the path on Windows 10."

4. If you are getting a lot of 'unexpected' errors during node setup, try resetting npm using the command `npm ci` before running `node setup` again.
4. If you are getting a lot of 'unexpected' errors during node setup, try resetting npm using the command `npm ci --omit=optional` before running `node setup` again.

## Enabling Desktop Shortcut in Ubuntu

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"discord.js": "^14.6.0",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"electron-updater": "^4.6.1",
"ethereumjs-common": "^1.5.2",
"ethereumjs-tx": "^2.1.2",
"ethers": "^5.5.3",
Expand Down Expand Up @@ -72,12 +71,13 @@
"yargs": "^17.6.2"
},
"optionalDependencies": {
"electron-updater": "^4.6.1",
"electron": "^21.3.1",
"electron-builder": "^23.6.0",
"@tensorflow/tfjs-node": "^2.8.6"
},
"devDependencies": {
"css-loader": "^6.7.1",
"electron": "^21.3.1",
"electron-builder": "^23.6.0",
"eslint": "^8.10.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
Expand Down

0 comments on commit adf780f

Please sign in to comment.