@nuxt/un
Once upon a time, one server was all needed to have a website
Last updated a month ago by pi0 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nuxt/un 
SYNC missed versions from official npm registry.

un

Once upon a time, one server was all needed to have a website

And then SPAs1 moved server code to browser

And then SSR2 moved browser code to server

And then Workers3 moved browser/server code to workers

Workers are neither NodeJS with process or Browser with window

Yet expected to run code that had to work both of them :}

[1] Single Page Applications [2] Server Side Rendering [3] https://workers.cloudflare.com

What is un?

un is a collection of modules, polyfills and presets that work perfectly with any Javascript environemnt including Browsers, Workers, NodeJS or pure JavaScript.

You still need a bundler like rollup.js and un will disapear as soon as is bundled.

The goal is that final bundle works consistent regardless of running context yet not adding excessive polyfills.

Install

Install un as devDependency:

yarn add --dev @nuxt/un
# or
npm i -D @nuxt/un

You can import modules from @nuxt/un/runtime/

Env

import { env, nodeless } from '@nuxt/un'

const { alias, inject } = env(nodeless, {
  alias: {
    // custom aliases
  }
})

Presets

polyfills

NodeJS

http

net

stream

Mocks

Packages

License

MIT

Current Tags

  • 0.0.11                                ...           latest (a month ago)

11 Versions

  • 0.0.11                                ...           a month ago
  • 0.0.10                                ...           a month ago
  • 0.0.9                                ...           2 months ago
  • 0.0.8                                ...           2 months ago
  • 0.0.7                                ...           2 months ago
  • 0.0.6                                ...           2 months ago
  • 0.0.5                                ...           2 months ago
  • 0.0.4                                ...           2 months ago
  • 0.0.3                                ...           2 months ago
  • 0.0.2                                ...           2 months ago
  • 0.0.1                                ...           2 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 29
Dependencies (9)
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |