Skip to content
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

feature(CacheModules): all bundles js, ts compiled via @gapi/cli #5

Open
Stradivario opened this issue Aug 13, 2019 · 0 comments
Open
Assignees

Comments

@Stradivario
Copy link
Member

  1. We need to create cache for all loaded files
  2. Cache should look the following way:
  • 45242342423423
  • 45224342342432
  • 31321312312312
  1. Inside of every cache file we will have Timestamp
  2. If this file timestamp is different when loading than this registered inside cache we transpile this single module.
  3. Now we load and transpile configuration on RUN aka Traverse inside object if Symbol 💉 present Load file and then load again new file.
  4. Concept is that we can Transpile all files before that and create appropriate timestamp without interupting current flow of loading files accept one IF case
if (await promisify(exist)(cacheFile)) {
   loadedModule = require('esm')(module)(cachedFilePath)
} else {
   loadedModule = await TranspileModuleAndLoad(filePath)
}
@Stradivario Stradivario self-assigned this Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant