2.2.2 • Published 3 years ago

@ginpei/rad-extract-webfont-kit v2.2.2

Weekly downloads
11
License
-
Repository
-
Last release
3 years ago

extract-webfont-kit

NPM Package Build Status Maintainability

Usage

Install

$ npm install @ginpei/rad-extract-webfont-kit

Invoke

const extractKit = require('@ginpei/rad-extract-webfont-kit');

extractKit({
  outDir: 'path/to/out-dir/',
  zipPath: 'path/to/zip-file',
}, (error, result) => {
  if (error) {
    console.error(error);
    return;
  }

  process.stdout.write('Done:', result);
});

For developer

Tests require test asset zip files, which require a key to download.

Get key

You have to get the key to download files. The key is defined in the AWS S3 bucket policy as referrer URL.

Find it in S3 bucket → Permissions → Bucket Policy.

"aws:Referer": "https://responsiveads.com/rad-extract-webfont-kit/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Download test assets

DOWNLOAD_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx npm run download-test-assets

Test

npm run test

Try in production development

Use npm link to use this directory from your project.

Step 1/2: In this directory, create a link:

$ npm link

Step 2/2: In the directory of your project where you use this lib:

$ npm link @ginpei/rad-extract-webfont-kit

Now require('@ginpei/rad-extract-webfont-kit') imports this working directory instead of the things downloaded from npm.