Skip to content

Fix issue with missing types when importing no-styles #665

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Fix issue with missing types when importing no-styles
  • Loading branch information
ejsmith authored Jan 13, 2024
commit 72323954089dca691a540d79ba731f0dc2ab7429
4 changes: 3 additions & 1 deletion src/remove-styles.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { writeFile, mkdir } = require('fs/promises');
const { writeFile, copyFile, mkdir } = require('fs/promises');
const path = require("path");
const { find } = require("find-in-files");

@@ -17,6 +17,8 @@ const SOURCE_FOLDER = path.join(__dirname, 'lib');
}
promises.push(writeFile(path.join(__dirname, '/lib/no-styles', fileName), searchResults[key].matches[0]));
});
promises.push(copyFile(path.join(__dirname, '/lib/index.js'), path.join(__dirname, '/lib/no-styles/index.js')));
promises.push(copyFile(path.join(__dirname, '/lib/index.d.ts'), path.join(__dirname, '/lib/no-styles/index.d.ts')));

const all = await Promise.all(promises);
})();