@pi-r/postcss 0.7.3 → 0.8.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +6 -5
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ### @pi-r/postcss
2
2
 
3
- https://e-mc.readthedocs.io/en/latest/document/plugins/built-in.html
3
+ https://e-mc.readthedocs.io/en/latest/document/plugins
4
4
 
5
5
  ### LICENSE
6
6
 
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const path = require("path");
3
- const util = require("@e-mc/document/util");
4
- module.exports = async function transform(context, value, options) {
3
+ const util_1 = require("@e-mc/document/util");
4
+ async function transform(context, value, options) {
5
5
  context = options.upgrade(context, __dirname);
6
6
  const { sourceFile, sourceMap, external } = options;
7
7
  const targetFile = !sourceFile && options.pathname ? path.join(options.pathname, options.filename || 'unknown.css') : sourceFile;
@@ -23,7 +23,7 @@ module.exports = async function transform(context, value, options) {
23
23
  sourceMap.reset();
24
24
  }
25
25
  else if (sourceMap.map) {
26
- if (util.isObject(map)) {
26
+ if ((0, util_1.isObject)(map)) {
27
27
  map.prev = sourceMap.map;
28
28
  }
29
29
  else {
@@ -33,7 +33,7 @@ module.exports = async function transform(context, value, options) {
33
33
  if (Array.isArray(plugins)) {
34
34
  delete baseConfig.plugins;
35
35
  Object.assign(baseConfig, { from: targetFile, to: targetFile });
36
- const result = await context(util.loadPlugins(plugins)).process(value, baseConfig);
36
+ const result = await context((0, util_1.loadPlugins)(plugins)).process(value, baseConfig);
37
37
  if (result) {
38
38
  if (result.map) {
39
39
  sourceMap.nextMap('postcss', result.css, result.map.toJSON());
@@ -41,4 +41,5 @@ module.exports = async function transform(context, value, options) {
41
41
  return result.css;
42
42
  }
43
43
  }
44
- };
44
+ }
45
+ module.exports = transform;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-r/postcss",
3
- "version": "0.7.3",
4
- "description": "postcss transform function for E-mc.",
3
+ "version": "0.8.0",
4
+ "description": "PostCSS transform function for E-mc.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -9,7 +9,7 @@
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/anpham6/pi-r.git",
12
- "directory": "src/documemt/postcss"
12
+ "directory": "src/document/postcss"
13
13
  },
14
14
  "keywords": [
15
15
  "squared",
@@ -20,7 +20,7 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
22
  "dependencies": {
23
- "@e-mc/document": "^0.9.6",
24
- "postcss": "^8.4.39"
23
+ "@e-mc/document": "^0.10.0",
24
+ "postcss": "^8.4.41"
25
25
  }
26
26
  }