PHP Classes

File: toastui/tsBannerGenerator.js

Recommend this page to a friend!
  Classes of Mark de Leon   PHP Document Scanner using SANE or eSCL AirPrint   toastui/tsBannerGenerator.js   Download  
File: toastui/tsBannerGenerator.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Document Scanner using SANE or eSCL AirPrint
Web interface to scan printed documents
Author: By
Last change:
Date: 4 years ago
Size: 819 bytes
 

Contents

Class file image Download
/*eslint-disable*/ var fs = require('fs'); var path = require('path'); var pkg = require('./package.json'); var tsVersion = (/[0-9.]+/).exec(pkg.devDependencies.typescript)[0]; var declareFilePath = path.join(__dirname, 'index.d.ts'); var declareRows = []; var TS_BANNER = [ '// Type definitions for TOAST UI Image Editor v' + pkg.version, '// TypeScript Version: ' + tsVersion ].join('\n'); fs.readFile(declareFilePath, 'utf8', function(error, data) { if (error) { throw error; } declareRows = data.toString().split('\n'); declareRows.splice(0, 2, TS_BANNER); fs.writeFile(declareFilePath, declareRows.join('\n'), 'utf8', function(error, data) { if (error) { throw error; } console.log('Completed Write Banner for Typescript!'); }); });