-
Notifications
You must be signed in to change notification settings - Fork 2
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
Process to clean up unused framework files #65
Comments
Hi @alexkn1 No, there is no such mechanism. There are plans for it, but it's a huge feature (e.g. determining which components have been used in the app is a non-obvious task). |
Here is described how plugins work. Example of the plugin code, that removes Roku roChannelStore mocks and TrackerTask.xml from the package build. const fs = require('fs').promises;
const glob = require('glob-promise');
const RALE_TRACKER_PATH_PATTERN = '/components/**/TrackerTask.xml';
const ROKU_STORE_FAKES_DIR = '/csfake';
module.exports = async function removeDevelopmentCode(rootDir) {
const raleTrackerPath = await glob(`${rootDir}${RALE_TRACKER_PATH_PATTERN}`);
await Promise.all([...raleTrackerPath].map(filePath => fs.unlink(filePath)));
await fs.rm(`${rootDir}${ROKU_STORE_FAKES_DIR}`, { recursive: true, force: true });
}; |
Yes, using something like that. That helps. Thought
Just to add if there was also a way to combine/minify all the common functions that would be good too. This is how all JS libraries work. Thanks |
Hi,
I am trying to optimize the size of the app. Is there a built in process to only import kopytko modules that are being used or delete ones that are not being used during build process?
Thanks!
The text was updated successfully, but these errors were encountered: