123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- const header = `
- ;(function(global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined'
- ? module.exports = factory()
- : typeof define === 'function' && define.amd
- ? define(factory) :
-
- (function() {
-
- const _Base64 = global.Base64;
- const gBase64 = factory();
- gBase64.noConflict = () => {
- global.Base64 = _Base64;
- return gBase64;
- };
- if (global.Meteor) {
- Base64 = gBase64;
- }
- global.Base64 = gBase64;
- })();
- }((typeof self !== 'undefined' ? self
- : typeof window !== 'undefined' ? window
- : typeof global !== 'undefined' ? global
- : this
- ), function() {
- 'use strict';
- `;
- const footer = `
-
-
-
-
-
- gBase64.Base64 = {};
- Object.keys(gBase64).forEach(k => gBase64.Base64[k] = gBase64[k]);
- return gBase64;
- }));
- `;
- require('fs').readFile(process.argv[2], 'utf8', (err, data) => {
- if (err) {
- return console.log(err);
- }
- const body = data.replace(/\n\/\/ makecjs:CUT \/\/.+$/s, '');
- console.log(`
- ${header}
- ${body}
- ${footer}
- `);
- });
|