Skip to content

Instantly share code, notes, and snippets.

View zavr-1's full-sized avatar
🍁
Depack: Front-End Code and Node.JS Package Bundler With Google Closure Compiler.

zavr-1

🍁
Depack: Front-End Code and Node.JS Package Bundler With Google Closure Compiler.
View GitHub Profile
{
"flex-shrink|-ms-flex-negative": [
"0"
],
"transform-origin": [
"0 50%"
]
}
import { join } from 'path'
import { ok, deepEqual } from '@zoroaster/assert'
import TempContext from 'temp-context'
import Context from '../../context'
/** @type {Object.<string, (c: Context, t: TempContext)>} */
const T = {
context: [Context, TempContext],
async'handles any file upload'({ createApp, startApp, staticDir }, { TEMP, snapshot }) {
const s = join(staticDir, 'small.txt')
@zavr-1
zavr-1 / idio.js
Last active January 9, 2020 22:06
const { app, url, middleware, router } = await idio({
cors: {
use: true,
origin: PROD && [FRONT_END, HOST],
credentials: true,
},
compress: { use: true },
form: {
dest: 'upload',
},
/Users/zavr/a-la/jsx/test/fixture/Component.jsx:2
<div className={className}>
^
SyntaxError: Unexpected token <
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at bootstrap_node.js:625:3
/Users/zavr/a-la/jsx/test/fixture/Component.jsx:2
<div className={className}>
^
SyntaxError: Unexpected token <
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at bootstrap_node.js:625:3
/Users/zavr/a-la/jsx/test/fixture/Component.jsx:2
<div className={className}>
^
SyntaxError: Unexpected token <
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at bootstrap_node.js:625:3
// was
import X from 'package-name'
// becomes
import X from '/node_modules/package-name/src/index.mjs'
// stdlib.js - to be compiled
import { c, b } from 'erte'
import Pedantry from 'pedantry'
import compare from '@depack/cache'
import whichStream from 'which-stream'
module.exports = {
'c': c,
'b': b,
'Pedantry': Pedantry,
/* original */
// threshold
if (threshold && ctx.response.length < threshold) return
/* fork */
// threshold
if (threshold) {
if (ctx.body instanceof Readable) {
const st = /** @type {!stream.Readable} */ (ctx.body)
let totalLength = 0
/* typal types/api.xml namespace */
/**
* @typedef {import('@typedefs/goa').Middleware} _goa.Middleware
* @typedef {_idio.session} session Initialize the session middleware with `opts`.
* @typedef {(opts?: !_idio.SessionConfig) => !_goa.Middleware} _idio.session Initialize the session middleware with `opts`.
*/