objectmodel 4.2.3 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- const fs = require('fs');
2
- const pkg = require('../package.json');
1
+ import fs from 'fs';
2
+ import pkg from '../package.json' assert { type: 'json' };
3
3
 
4
4
  const banner = `// ObjectModel v${pkg.version} - ${pkg.homepage}
5
5
  // ${pkg.license} License - ${pkg.author}`;
@@ -1,12 +1,14 @@
1
- const fs = require('fs');
2
- const filesize = require('filesize')
3
- const getGzipSize = require('gzip-size').sync;
1
+ import fs from 'fs';
2
+ import filesize from 'pretty-bytes';
3
+ import { gzipSizeSync } from 'gzip-size';
4
4
 
5
- const pkg = require('../package.json');
5
+ import pkg from '../package.json' assert { type: 'json' };
6
6
 
7
7
  function updateIndex(html){
8
8
  const libPath = "./dist/object-model.min.js"
9
- const gzipSize = getGzipSize(fs.readFileSync(libPath, 'utf8'));
9
+ //const gzipSize = gzipSizeFromFileSync(libPath);
10
+ const gzipSize = gzipSizeSync(fs.readFileSync(libPath, 'utf8'));
11
+ console.info(`gzip size: ${gzipSize}`)
10
12
 
11
13
  console.info(`${pkg.name} v${pkg.version}: ${filesize(gzipSize)} minified and gzipped`)
12
14