Browse Source

Transpile the programmatic API

master
Leo Lamprecht 8 years ago
parent
commit
364a9b020f
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 19
      lib/load.js
  2. 2
      package.json

19
lib/load.js

@ -0,0 +1,19 @@
// Native
const {resolve} = require('path')
// Packages
const isAsyncSupported = require('is-async-supported')
const asyncToGen = require('async-to-gen/register')
// Support for keywords "async" and "await"
if (!isAsyncSupported()) {
const path = resolve('./load')
asyncToGen({
includes: new RegExp(`.*${path}.*`),
excludes: null,
sourceMaps: false
})
}
module.exports = require('./server')

2
package.json

@ -2,7 +2,7 @@
"name": "micro",
"version": "6.2.1",
"description": "Asynchronous HTTP microservices",
"main": "./lib/server.js",
"main": "./lib/load.js",
"files": [
"bin",
"lib"

Loading…
Cancel
Save