Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kongnet/meeko

zero-dependency Nodejs Personal awesome utilities
https://github.com/kongnet/meeko

javascript json koa2 math meeko mysql nodejs prototype regexp snowflake statistics zero-dependency

Last synced: 7 days ago
JSON representation

zero-dependency Nodejs Personal awesome utilities

Awesome Lists containing this project

README

        

# meeko

## meeko 前端支持

#### rollup 转换

> cnpm i -g rollup
> rollup -c
> rollup.config.js 如下:

```javascript
import commonjs from 'rollup-plugin-commonjs'
import json from 'rollup-plugin-json'
import resolve from 'rollup-plugin-node-resolve'
import polyfills from 'rollup-plugin-node-polyfills'
import builtins from 'rollup-plugin-node-builtins'

export default {
input: 'index.js',
output: {
file: 'out.js',
format: 'iife',
name: 'meeko' //,
// globals: ['perf_hooks', 'crypto', 'fs', 'path']
},
external: ['perf_hooks', 'Buffer', 'process'],
plugins: [
json(),
polyfills(),
resolve({
browser: true
}),
commonjs(),
builtins()
]
}
```

#### html 基本用法,使用 iife 转换

```html






/**
* 去除一些nodejs内部依赖,其他靠rollup处理
*/
var perf_hooks = {}
var process = { platform: '' }
var Buffer = function () {}
Buffer.from = function () {}
Buffer.contact = function () {}


console.log(meeko)

```