Giter Site home page Giter Site logo

mjancarik / merkur Goto Github PK

View Code? Open in Web Editor NEW
48.0 9.0 6.0 11.46 MB

tiny extensible javascript library for front-end microservices

Home Page: https://merkur.js.org/

License: MIT License

JavaScript 93.79% CSS 0.22% Shell 0.63% EJS 0.64% Svelte 0.69% TypeScript 4.02%
microservices microservices-architecture microfrontends javascript nodejs react preact hyperhtml merkur svelte

merkur's Introduction

Merkur illustration

Merkur

Build Status NPM package version npm bundle size (scoped version) code style: prettier

The Merkur is tiny extensible javascript library for front-end microservices(micro frontends). It allows by default server side rendering for loading performance boost. You can connect it with other frameworks or languages because merkur defines easy API. You can use one of six predefined template's library Preact, µhtml, Svelte and vanilla but you can easily extend for others.

Features

  • Flexible templating engine
  • Usable with all tech stacks
  • SSR-ready by default
  • Easy extensible with plugins
  • Tiny - 1 KB minified + gzipped

Getting started

npx @merkur/create-widget <name>

cd name

npm run dev // Point your browser at http://localhost:4444/

alt text

Documentation

To check out live demo and docs, visit https://merkur.js.org.

Contribution

Contribute to this project via Pull-Requests.

We are following Conventional Commits Specification. To simplify the commit process, you can use npm run commit command. It opens an interactive interface, which should help you with commit message composition.

Thank you to all the people who already contributed to Merkur!

merkur's People

Contributors

corvidism avatar dependabot[bot] avatar filipoliko avatar greld avatar hartja avatar jsimck avatar lastuvka avatar matej-marcisovsky avatar michalonderko avatar mildah avatar mjancarik avatar mrazekd avatar ondrejbase avatar svo404 avatar vojtasim avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

merkur's Issues

create-widget script should reflect view option to ESLint config

Default .eslintrc.js configuration contains:

const config = require('@merkur/tools/eslint.config.js');

module.exports = {
  ...config,
};

But when I choose preact as my view framework the ESLint config should be changed to contain preact specific pragma: 'h'.

Solution 1. - Altter .eslintrc.js contents when creating widget with create-widget script
Solution 2. - Provide multiple ESLint configs in @merkur/tools for each view framework

Error

Hi,

I try use merkur with nodejs v18.x, I have an error:

cross-env NODE_CONFIG_DIR='./server/config' NODE_ENV=development nodemon server/server.js --config nodemon.json

[nodemon] 2.0.19
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): server//* build//*
[nodemon] watching extensions: cjs,ejs,json,mjs,js,jsx
[nodemon] starting node server/server.js
node:internal/modules/cjs/loader:489
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server/' is not defined by "exports" in ..../node_modules/@merkur/integration/package.json


In the module widgetAPI.js:
const { createAssets, memo } = require('@merkur/integration/server/')
It should be replaced by (remove backslash)
const { createAssets, memo } = require('@merkur/integration/server')

Thanks

Feature request: shared, extendable lifecycle methods

With @merkur/plugin-router, the lifecycle methods defined on widgetProperties are ignored in favor of the ones defined for the specific route. It would be neat if they were still executed - especially useful for setting state values that are needed widget-wide, or any other shared lifecycle logic.

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.