GithubHelp home page GithubHelp logo

caviarjs / caviar Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 4.0 617 KB

The skeleton of frameworks for micro frontends

License: Other

JavaScript 100.00%
micro-frontends framework backend-for-frontend skeleton

caviar's People

Contributors

kaelzhang avatar reallinfo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

caviar's Issues

crash when refresh page before server ready

  TypeError: Cannot read property 'hasErrors' of null
      at HotReloader.getCompilationErrors (/Users/zhangzeqing/Develop/binance/future-ui/node_modules/next/dist/server/hot-reloader.js:306:24)
      at processTicksAndRejections (internal/process/task_queues.js:82:5)
      at async DevServer.getCompilationError (/Users/zhangzeqing/Develop/binance/future-ui/node_modules/next/dist/server/next-dev-server.js:171:24)
      at async DevServer.renderToHTML (/Users/zhangzeqing/Develop/binance/future-ui/node_modules/next/dist/server/next-dev-server.js:120:32)

2.0.0

Tasks

  • BREAKING config chain: extend caviar into a business customized dev tool
  • completes tests

Unfinished tasks of 1.0.0

  • Custom loader

    • to load extra middlewares or plugins
    • how to extend roe-scripts into a business customized dev tool
  • Dependencies

    • why next build requires that client side should have next-server as a dependency?
    • is it possible to disable @babel/runtime-corejs2

better error handling

Error {
    code: 'MODULE_NOT_FOUND',
    message: 'Cannot find module \'/Users/kael/Codes/node/roe-mock/test/fixtures/roe.config\'',
}
/Users/kael/Codes/node/roe-mock/node_modules/dotenv/lib/main.js:41

Rejected promise returned by test. Reason:

TypeError {
  message: 'Cannot read property \'toString\' of undefined',
}

Think of 3.0.0: make caviar fully pluggable

  • provide abstract config chain reducer which is similar to config.prop(key)
  • support serverless
  • support babel hook which integrates with webpack
  • env for client and server should be treated differently

Thinking:

  • how to get the best use of docker cache layers, so that caviar also has layers

  • how to allow users to define their custom lifecycle flow

  • how a plugin to create sub hooks

ParentPlugin.getHooks(lifecycle).someHook.tap('SubPlugin', () => {
  // do something
})

And provide some util tools for plugins to create sub hooks

  • how a block to define context variables which can be used by another block

  • the execution sequence for chained config and config hooks in different layers

Debugging

logo

Hi, i am a logo designer. I contribute to open source projects that do not have logo. I deisgned a logo for caviar. Please let me know what you think.

caviar

1.0.0

Checklist

  • Configurations
    • sanitize and sandbox process.env
      • legacy-next-config for publicRuntimeConfig of next/config
    • ctrip-apollo client to fetch env variables other than dev
    • abandon next.config.js
    • remove all configurations other than dev
    • auto inject webpack EnvironmentPlugin based on .env
      • insulate env for server and env for webpack
  • egg
    • migrate all controllers to egg
    • ioredis as egg plugin
    • write egg config to temp file supports custom config now
    • page cachable as middleware
    • egg dev/prod mode invalid
  • Refactor ssrPageCacheRedis.js.
    • use ioredis instead of cacheman and cacheman-redis
    • remove redis.json
  • next
    • Refractor server/global.js (ssrRoutes) -> middleware or cache plugin
    • make nextHandler as a builtin
      • next.renderToHTML: egg controller -> config
      • next renderer with caches
    • why next build requires that client side should have next-server as a dependency?
    • is it possible to disable @babel/runtime-corejs2
    • next static server
    • how to manage server-side requests -> resolve.alias
    • the mechanism to inject into client and server with different context
  • next injection
    • mechanism to inject different items into server/client runtime -> webpack.resolve.alias
  • Custom loader
    • to load extra middlewares or plugins
    • how to extend roe-scripts into a business customized dev tool
  • roe.config
    • roe plugin design, and lifecycle
      • roe env plugin
    • serve static
    • bnc-scripts cli
      • start option: --dev,
      • [ ] start options: --build
    • tests
    • generator-roe
  • roe init
    • scaffolding template use yo for now
  • others
    • new README.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.