-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
42 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ jobs: | |
strategy: | ||
matrix: | ||
node-version: | ||
- 16 | ||
- 14 | ||
- 12 | ||
- 10 | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
'use strict'; | ||
module.exports = require('./lib').path(); | ||
import lib from './lib/index.js'; | ||
|
||
export default lib.path(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
'use strict'; | ||
const path = require('path'); | ||
const BinWrapper = require('bin-wrapper'); | ||
const pkg = require('../package.json'); | ||
import fs from 'node:fs'; | ||
import process from 'node:process'; | ||
import {fileURLToPath} from 'node:url'; | ||
import BinWrapper from 'bin-wrapper'; | ||
|
||
const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url))); | ||
const url = `https://raw.github.com/imagemin/pngout-bin/v${pkg.version}/vendor/`; | ||
|
||
module.exports = new BinWrapper() | ||
const binWrapper = new BinWrapper() | ||
.src(`${url}osx/pngout`, 'darwin') | ||
.src(`${url}linux/x86/pngout`, 'linux', 'x86') | ||
.src(`${url}linux/x64/pngout`, 'linux', 'x64') | ||
.src(`${url}freebsd/x86/pngout`, 'freebsd', 'x86') | ||
.src(`${url}freebsd/x64/pngout`, 'freebsd', 'x64') | ||
.src(`${url}win32/pngout.exe`, 'win32') | ||
.dest(path.resolve(__dirname, '../vendor')) | ||
.dest(fileURLToPath(new URL('../vendor', import.meta.url))) | ||
.use(process.platform === 'win32' ? 'pngout.exe' : 'pngout'); | ||
|
||
export default binWrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters