This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const esprima = require('esprima'); | |
| const recast = require('recast'); | |
| const fs = require('fs'); | |
| var acorn = require("acorn"); | |
| var escodegen = require("escodegen"); | |
| var babylon = require("babylon"); | |
| var cst = require("cst"); | |
| var browserify = require('browserify'); | |
| var b = browserify(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isWhiteSpace(cp) { | |
| return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) || | |
| (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0); | |
| } | |
| function isLineTerminator(cp) { | |
| return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029); | |
| } | |
| // const globMap = new Uint8Array(256 * 256); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let packer: any; | |
| let ts: any; | |
| let autocss: any; | |
| let autoprefixer: any; | |
| let cssmin: any; | |
| let jsmin: any; | |
| let scss: any; | |
| let cssmodules: any; | |
| let grab: any; | |
| let less: any; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| IGeneratorClass, currentDir, UpperCamelCase, lowerCamelCase, trimLines, | |
| findGenTemplatesRoot | |
| } from 'gen-templates'; | |
| import {relative} from 'path'; | |
| export default class Component implements IGeneratorClass { | |
| help(){ | |
| return ` | |
| Creates something good | |
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface FindParams { | |
| attrs?: string; | |
| sql?: string; | |
| where?: any; | |
| model?: DAO<any>; | |
| include?: (DAO<any> | FindParams)[]; | |
| values?: any[], | |
| orderBy?: string; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Opt<T> = T | undefined | void | null; | |
| type Any = any; | |
| type This = Any; | |
| type Arg = Any; | |
| type PDef = P<Any>; | |
| type Callback<R, T> = Opt<(<R>(val: T, arg: Arg) => R | P<R>)>; | |
| const enum PromiseState{ | |
| PENDING, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Resolve<T> = (value?: T | PromiseLike<T> | undefined) => void; | |
| type Reject = (reason?: any) => void; | |
| type AbortFn = ((onCancel: () => void) => void) | undefined; | |
| type Executor<T> = (resolve: Resolve<T>, reject: Reject, onCancel?: AbortFn) => void | |
| export class CancellablePromise<T> implements Promise<T> { | |
| cancelled = false; | |
| children?: CancellablePromise<{}>[] = undefined; | |
| promise: Promise<T>; | |
| onCancel?: ()=>void; | |
| parent: CancellablePromise<{}>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Resolve<T> = (value?: T | PromiseLike<T> | undefined) => void; | |
| type Reject = (reason?: any) => void; | |
| type AbortFn = ((onCancel: ()=>void)=>void) | undefined; | |
| type OnFullfilled<T, TResult> = (value: T) => TResult | PromiseLike<TResult>; | |
| type OnRejected<T, TResult> = (reason: any) => TResult | PromiseLike<TResult> | void; | |
| type Executor<T> = (resolve: Resolve<T>, reject: Reject, onCancel?: AbortFn) => void | |
| export class CancellablePromise<T>{ | |
| cancelled = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import './AnimatedNumber.scss'; | |
| export class AnimatedNumber extends zx.react.Component { | |
| isAnimation = false; | |
| duration = 1000; | |
| oldValue = this.props.value; | |
| oldRawValue = +this.props.rawValue || +this.props.value; | |
| currentValue = this.props.value; | |
| currentRawValue = +this.props.rawValue || +this.props.value; | |
| nextValue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffprobe -show_frames -of compact=p=0 -f lavfi "movie=chappy.mkv,select=gt(scene\,.4)" > foo.txt |