Skip to content

Commit

Permalink
Provide legacy dependencies as dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Feb 2, 2025
1 parent 58bdc76 commit f422f5d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
23 changes: 12 additions & 11 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"devDependencies": {
"@types/geojson": "^7946.0.10",
"color-name": "^2.0.0",
"color-parse": "^2.0.2",
"color-rgba": "^3.0.0",
"color-space": "^2.3.1",
Expand Down
12 changes: 3 additions & 9 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,15 @@ const addNodeModulesToDist = () => {
['./cases/create-importmap.js', './dist/cases/create-importmap.js'],
];
await Promise.all(
toCopy.map(([src, dest]) => {
if (!existsSync(src)) {
return;
}
toCopy.map(([src, dest]) =>
fs.cp(src, dest, {
recursive: true,
});
})
})
)
);

// tweak color-name default export
const colorNamePath = './dist/node_modules/color-name/index.js';
if (!existsSync(colorNamePath)) {
return;
}
const colorName = await fs.readFile(
'./dist/node_modules/color-name/index.js',
'utf-8'
Expand Down

0 comments on commit f422f5d

Please sign in to comment.