0.3.1 • Published 2 years ago

@blackglory/static-js v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

static-js

Install

npm install --save @blackglory/static-js
# or
yarn add @blackglory/static-js

API

StaticURLFactory

interface IStaticURLFactoryOptions {
  server: string
  secret: string
}

interface IDerivedImageMetadata {
  format: 'jpeg' | 'webp'
  quality: number
  maxWidth?: number
  maxHeight?: number
  multiple?: number
}

interface IDerivedFontMetadata {
  format: 'woff' | 'woff2'
  subset: string
}

class StaticURLFactory {
  constructor(options: IStaticURLFactoryOptions)

  createFileURL(filename: string, contentType?: string): string

  createDerivedImageURL(
    filename: string
  , metadata: IDerivedImageMetadata
  , contentType?: string
  ): Promise<string>

  createDerivedFontURL(
    filename: string
  , metadata: IDerivedFontMetadata
  , contentType?: string
  ): Promise<string>
}
0.3.1

2 years ago

0.3.0

2 years ago

0.2.6

3 years ago

0.2.8

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.1

3 years ago

0.2.2

3 years ago

0.2.0

3 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago