2.2.2 • Published 4 years ago
@ginpei/rad-extract-webfont-kit v2.2.2
extract-webfont-kit
Usage
Install
$ npm install @ginpei/rad-extract-webfont-kitInvoke
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-assetsTest
npm run testTry in production development
Use npm link to use this directory from your project.
Step 1/2: In this directory, create a link:
$ npm linkStep 2/2: In the directory of your project where you use this lib:
$ npm link @ginpei/rad-extract-webfont-kitNow require('@ginpei/rad-extract-webfont-kit') imports this working directory instead of the things downloaded from npm.