Skip to content

Commit

Permalink
feat: 🎸 create new module tool-webpack (#99)
Browse files Browse the repository at this point in the history
* feat: 🎸 create new module tool-webpack

BREAKING CHANGE: 🧨 Extract webpack to alone module merkur/tool-webpack from merkur/tools
module

* ci: 🎡 add lock file for new module

* feat: 🎸 add new module merkur/tool-webpack to dev dependencies
  • Loading branch information
mjancarik authored Aug 26, 2021
1 parent 6b0a4a1 commit 111fda7
Show file tree
Hide file tree
Showing 14 changed files with 2,295 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/create-widget/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"devDependencies": {
"@merkur/tools": "0.25.0",
"@merkur/tool-webpack": "0.25.0",
"nodemon": "^2.0.12",
"webpack": "^5.51.1",
"webpack-cli": "^4.8.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
applyES5Transformation,
applyES9Transformation,
pipe,
} = require('@merkur/tools/webpack.cjs');
} = require('@merkur/tool-webpack');

createLiveReloadServer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
applyES5Transformation,
applyES9Transformation,
pipe,
} = require('@merkur/tools/webpack.cjs');
} = require('@merkur/tool-webpack');

createLiveReloadServer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
applyES5Transformation,
applyES9Transformation,
pipe,
} = require('@merkur/tools/webpack.cjs');
} = require('@merkur/tool-webpack');

createLiveReloadServer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
applyES9Transformation,
pipe,
webpackMode,
} = require('@merkur/tools/webpack.cjs');
} = require('@merkur/tool-webpack');

createLiveReloadServer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
applyES5Transformation,
applyES9Transformation,
pipe,
} = require('@merkur/tools/webpack.cjs');
} = require('@merkur/tool-webpack');

createLiveReloadServer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
applyES5Transformation,
applyES9Transformation,
pipe,
} = require('@merkur/tools/webpack.cjs');
} = require('@merkur/tool-webpack');

createLiveReloadServer();

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions packages/tool-webpack/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2020 Miroslav Jancarik [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
47 changes: 47 additions & 0 deletions packages/tool-webpack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<p align="center">
<a href="https://merkur.js.org/docs/getting-started" title="Getting started">
<img src="https://raw.githubusercontent.com/mjancarik/merkur/master/images/merkur-illustration.png" width="100px" height="100px" alt="Merkur illustration"/>
</a>
</p>

# Merkur

[![Build Status](https://github.com/mjancarik/merkur/workflows/CI/badge.svg)](https://github.com/mjancarik/merkur/actions/workflows/ci.yml)
[![NPM package version](https://img.shields.io/npm/v/@merkur/core/latest.svg)](https://www.npmjs.com/package/@merkur/core)
![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@merkur/core/latest)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

The [Merkur](https://merkur.js.org/) 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 [React](https://reactjs.org/), [Preact](https://preactjs.com/), [hyperHTML](https://viperhtml.js.org/hyper.html), [µhtml](https://github.com/WebReflection/uhtml#readme), [Svelte](https://svelte.dev/) and [vanilla](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) 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

```bash
npx @merkur/create-widget <name>

cd name

npm run dev // Point your browser at http://localhost:4444/
```
![alt text](https://raw.githubusercontent.com/mjancarik/merkur/master/images/hello-widget.png "Merkur example, hello widget")
## Documentation

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

## Contribution

Contribute to this project via [Pull-Requests](https://github.com/mjancarik/merkur/pulls).

We are following [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0/#summary). 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!

<a href="https://github.com/mjancarik/merkur/graphs/contributors">
<img src="https://contrib.rocks/image?repo=mjancarik/merkur" />
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CompressionPlugin = require('compression-webpack-plugin');

const WebSocket = require('./websocket.cjs');
const WebSocket = require('@merkur/tools/websocket.cjs');

const DIR = process.cwd();
const DEVELOPMENT = 'development';
Expand Down
Loading

0 comments on commit 111fda7

Please sign in to comment.