@live-codes/browser-compilers 0.5.11 → 0.5.13

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": "@live-codes/browser-compilers",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "description": "Compilers that run in the browser, for use in livecodes.io",
5
5
  "author": "Hatem Hosny",
6
6
  "license": "MIT",
@@ -27,11 +27,13 @@
27
27
  "dependencies": {
28
28
  "@esbuild-plugins/node-globals-polyfill": "0.1.1",
29
29
  "@esbuild-plugins/node-modules-polyfill": "0.1.4",
30
+ "@fullhuman/postcss-purgecss": "5.0.0",
30
31
  "@mdx-js/mdx": "2.0.0",
31
32
  "@prettier/plugin-pug": "1.19.2",
32
33
  "@testing-library/dom": "8.12.0",
33
34
  "@testing-library/jest-dom": "5.16.3",
34
35
  "@testing-library/react": "12.1.4",
36
+ "@tokencss/core": "0.1.0",
35
37
  "@tokencss/postcss": "0.0.5",
36
38
  "@unocss/core": "0.45.21",
37
39
  "@unocss/preset-attributify": "0.45.21",
@@ -48,6 +50,7 @@
48
50
  "@unocss/transformer-variant-group": "0.45.21",
49
51
  "@webassemblyjs/wast-refmt": "1.11.1",
50
52
  "babel-preset-solid": "1.3.5",
53
+ "cssnano-preset-default": "5.2.12",
51
54
  "dts-bundle": "0.7.3",
52
55
  "elkjs-svg": "0.2.1",
53
56
  "esbuild-plugin-cache": "0.2.9",
@@ -0,0 +1,24 @@
1
+ diff --git a/node_modules/rollup-plugin-node-polyfills/polyfills/util.js b/node_modules/rollup-plugin-node-polyfills/polyfills/util.js
2
+ index 2194380..4ef385e 100644
3
+ --- a/node_modules/rollup-plugin-node-polyfills/polyfills/util.js
4
+ +++ b/node_modules/rollup-plugin-node-polyfills/polyfills/util.js
5
+ @@ -572,6 +572,19 @@ function hasOwnProperty(obj, prop) {
6
+ return Object.prototype.hasOwnProperty.call(obj, prop);
7
+ }
8
+
9
+ +export function promisify(fn) {
10
+ + return function() {
11
+ + return new Promise((resolve, reject) => {
12
+ + fn(...arguments, function(err, data) {
13
+ + if (err !== null) {
14
+ + return reject(err);
15
+ + }
16
+ + return resolve(data);
17
+ + })
18
+ + })
19
+ + };
20
+ +};
21
+ +
22
+ export default {
23
+ inherits: inherits,
24
+ _extend: _extend,
@@ -31,6 +31,7 @@ const baseOptions = {
31
31
  minify: true,
32
32
  format: 'iife',
33
33
  define: { global: 'window', 'process.env.NODE_ENV': '"production"' },
34
+ logLevel: 'error',
34
35
  };
35
36
 
36
37
  // sass
@@ -327,3 +328,22 @@ esbuild.build({
327
328
  globalName: 'tokencss',
328
329
  plugins: nodePolyfills,
329
330
  });
331
+
332
+ // cssnano
333
+ esbuild.build({
334
+ ...baseOptions,
335
+ entryPoints: ['vendor_modules/imports/cssnano.js'],
336
+ outfile: 'dist/cssnano/cssnano.js',
337
+ globalName: 'cssnano',
338
+ plugins: nodePolyfills,
339
+ define: { __dirname: '""' },
340
+ });
341
+
342
+ // purgecss
343
+ esbuild.build({
344
+ ...baseOptions,
345
+ entryPoints: ['vendor_modules/imports/purgecss.js'],
346
+ outfile: 'dist/purgecss/purgecss.js',
347
+ globalName: 'purgecss',
348
+ plugins: nodePolyfills,
349
+ });
@@ -0,0 +1,3 @@
1
+ import cssnanoPresetDefault from 'cssnano-preset-default';
2
+
3
+ export { cssnanoPresetDefault };
@@ -0,0 +1,3 @@
1
+ import purgecss from '@fullhuman/postcss-purgecss';
2
+
3
+ export { purgecss };
@@ -1,4 +1,5 @@
1
- // @ts-ignore
1
+ // @ts-nocheck
2
2
  import tokencss from '@tokencss/postcss';
3
+ import preset from '@tokencss/core/preset';
3
4
 
4
- export { tokencss };
5
+ export { tokencss, preset };