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

Make sure dev deps are always installed during custom build #133

Merged
merged 2 commits into from
Nov 21, 2020
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
$env:Path = $arrPath -join ';'
node -p "const {writeFileSync} = require('fs'); const packageJson = {exifreader: {include: {jpeg: true, exif: true}}, dependencies: {exifreader: '../ExifReader/exifreader-$($PackageVersion).tgz'}}; writeFileSync('package.json', JSON.stringify(packageJson));"
if ($LastExitCode -ne 0) { throw (Get-PSCallStack | Out-String) }
npm install
npm install --production
if ($LastExitCode -ne 0) { throw (Get-PSCallStack | Out-String) }
npm rebuild exifreader
if ($LastExitCode -ne 0) { throw (Get-PSCallStack | Out-String) }
Expand Down
2 changes: 1 addition & 1 deletion bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function checkConfig() {
if (dependentHasExifReaderConfig()) {
if (!isDependenciesInstalled()) {
console.log('Installing ExifReader custom build dependencies...'); // eslint-disable-line no-console
execSync('npm install --loglevel=error --no-optional --no-package-lock --no-save @babel/core @babel/preset-env @babel/register babel-loader cross-env string-replace-loader webpack webpack-cli terser-webpack-plugin', {stdio: 'inherit'});
execSync('npm install --production=false --loglevel=error --no-optional --no-package-lock --no-save @babel/core@7.9.0 @babel/preset-env@7.9.0 @babel/register@7.9.0 babel-loader@8.1.0 cross-env@5.2.0 string-replace-loader@2.2.0 webpack@4.44.1 webpack-cli@3.3.12 terser-webpack-plugin@2.3.8', {stdio: 'inherit'});
console.log('Done.'); // eslint-disable-line no-console
}
return true;
Expand Down
132 changes: 87 additions & 45 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"nyc": "^14.1.1",
"rimraf": "^3.0.2",
"string-replace-loader": "^2.2.0",
"terser-webpack-plugin": "^2.3.5",
"terser-webpack-plugin": "^2.3.8",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
Expand Down