Skip to content

Commit

Permalink
Remove unused commonjs output file
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Jun 20, 2023
1 parent 734faba commit 978fc74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 46 deletions.
37 changes: 0 additions & 37 deletions dist/img-src-placeholder.umd.cjs

This file was deleted.

11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
"license": "MIT",
"type": "module",
"module": "dist/img-src-placeholder.js",
"main": "dist/img-src-placeholder.umd.cjs",
"main": "dist/img-src-placeholder.js",
"types": "dist/img-src-placeholder.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"import": "./dist/img-src-placeholder.js",
"require": "./dist/img-src-placeholder.umd.cjs"
"import": "./dist/img-src-placeholder.js"
},
"./": "./dist/"
},
Expand Down Expand Up @@ -73,8 +72,6 @@
],
"build": [
"tsc",
"tsc --module UMD --outDir build/umd",
"copy-file build/umd/img-src-placeholder.js build/img-src-placeholder.umd.cjs",
"add-dist-header build dist"
]
},
Expand All @@ -94,8 +91,8 @@
"devDependencies": {
"@types/fancy-log": "~2.0",
"@types/node": "~20.3",
"@typescript-eslint/eslint-plugin": "~5.59",
"@typescript-eslint/parser": "~5.59",
"@typescript-eslint/eslint-plugin": "~5.60",
"@typescript-eslint/parser": "~5.60",
"add-dist-header": "~1.0",
"assert-deep-strict-equal": "~1.0",
"copy-file-util": "~1.0",
Expand Down
3 changes: 1 addition & 2 deletions spec/mocha.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('The "dist" folder', () => {
const expected = [
'img-src-placeholder.d.ts',
'img-src-placeholder.js',
'img-src-placeholder.umd.cjs',
];
assertDeepStrictEqual(actual, expected);
});
Expand Down Expand Up @@ -82,7 +81,7 @@ describe('Executing the CLI', () => {
const run = (posix) => {
const name = Object.keys(pkg.bin).sort()[0];
const command = process.platform === 'win32' ? posix.replaceAll('\\ ', '" "') : posix;
execSync(command.replace(name, 'node bin/cli.js'), { stdio: 'inherit' });
return execSync(command.replace(name, 'node bin/cli.js'), { stdio: 'inherit' });
};

it('creates the expected file with the correct <img> placeholder', () => {
Expand Down

0 comments on commit 978fc74

Please sign in to comment.