@mekari/pixel3-postcss 1.0.11 → 1.0.12

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/dist/index.js CHANGED
@@ -85,16 +85,14 @@ function mergeConfig(obj1, obj2) {
85
85
  });
86
86
  return { ...obj1, ...tempObj };
87
87
  }
88
- var createConfigFile = (filePath, options, packageManager) => {
88
+ var createConfigFile = (filePath, options) => {
89
89
  const _defaultConfig = { ...defaultConfig };
90
- if (packageManager) {
91
- const realPath = findRealModulePath("@mekari/pixel3");
92
- if (realPath) {
93
- const pixelDir = import_path.default.dirname(realPath);
94
- const extend = `${pixelDir}/**/dist/**/*.{js,mjs}`;
95
- const finalInclude = [..._defaultConfig.include || [], extend];
96
- _defaultConfig.include = finalInclude;
97
- }
90
+ const realPath = findRealModulePath("@mekari/pixel3");
91
+ if (realPath) {
92
+ const pixelDir = import_path.default.dirname(realPath);
93
+ const extend = `${pixelDir}/**/dist/**/*.{js,mjs}`;
94
+ const finalInclude = [..._defaultConfig.include || [], extend];
95
+ _defaultConfig.include = finalInclude;
98
96
  }
99
97
  const configs = mergeConfig(_defaultConfig, options);
100
98
  const data = "export default" + JSON.stringify(configs, null, 2);
@@ -132,25 +130,9 @@ var shouldSkip = (fileName) => {
132
130
  return false;
133
131
  return nodeModulesRegex.test(fileName);
134
132
  };
135
- function getPackageManager() {
136
- const userAgent = process.env.npm_config_user_agent;
137
- let result = "";
138
- if (userAgent) {
139
- if (userAgent.includes("pnpm")) {
140
- result = "pnpm";
141
- } else if (userAgent.includes("npm")) {
142
- result = "npm";
143
- } else {
144
- result = "yarn";
145
- }
146
- }
147
- return result;
148
- }
149
133
  var pixelcss = (options = {}) => {
150
134
  const { cwd } = options;
151
- const packageManager = getPackageManager();
152
- createConfigFile(configPath, options, packageManager);
153
- console.log("Using package manager: ", packageManager);
135
+ createConfigFile(configPath, options);
154
136
  console.log("Pixel Config (auto-generated) :", configPath);
155
137
  return {
156
138
  postcssPlugin: PLUGIN_NAME,
package/dist/index.mjs CHANGED
@@ -79,16 +79,14 @@ var init_create_config = __esm({
79
79
  "use strict";
80
80
  init_esm_shims();
81
81
  init_default_config();
82
- createConfigFile = (filePath, options, packageManager) => {
82
+ createConfigFile = (filePath, options) => {
83
83
  const _defaultConfig = { ...defaultConfig };
84
- if (packageManager) {
85
- const realPath = findRealModulePath("@mekari/pixel3");
86
- if (realPath) {
87
- const pixelDir = path.dirname(realPath);
88
- const extend = `${pixelDir}/**/dist/**/*.{js,mjs}`;
89
- const finalInclude = [..._defaultConfig.include || [], extend];
90
- _defaultConfig.include = finalInclude;
91
- }
84
+ const realPath = findRealModulePath("@mekari/pixel3");
85
+ if (realPath) {
86
+ const pixelDir = path.dirname(realPath);
87
+ const extend = `${pixelDir}/**/dist/**/*.{js,mjs}`;
88
+ const finalInclude = [..._defaultConfig.include || [], extend];
89
+ _defaultConfig.include = finalInclude;
92
90
  }
93
91
  const configs = mergeConfig(_defaultConfig, options);
94
92
  const data = "export default" + JSON.stringify(configs, null, 2);
@@ -113,20 +111,6 @@ function isValidCss(file) {
113
111
  const [filePath] = file.split("?");
114
112
  return path2.extname(filePath) === ".css";
115
113
  }
116
- function getPackageManager() {
117
- const userAgent = process.env.npm_config_user_agent;
118
- let result = "";
119
- if (userAgent) {
120
- if (userAgent.includes("pnpm")) {
121
- result = "pnpm";
122
- } else if (userAgent.includes("npm")) {
123
- result = "npm";
124
- } else {
125
- result = "yarn";
126
- }
127
- }
128
- return result;
129
- }
130
114
  var require2, tmp, PLUGIN_NAME, tmpobj, configPath, builder, nodeModulesRegex, shouldSkip, pixelcss, src_default;
131
115
  var init_src = __esm({
132
116
  "src/index.ts"() {
@@ -152,9 +136,7 @@ var init_src = __esm({
152
136
  };
153
137
  pixelcss = (options = {}) => {
154
138
  const { cwd } = options;
155
- const packageManager = getPackageManager();
156
- createConfigFile(configPath, options, packageManager);
157
- console.log("Using package manager: ", packageManager);
139
+ createConfigFile(configPath, options);
158
140
  console.log("Pixel Config (auto-generated) :", configPath);
159
141
  return {
160
142
  postcssPlugin: PLUGIN_NAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mekari/pixel3-postcss",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "PostCSS integration for Pixel 3",
5
5
  "main": "./dist/index.js",
6
6
  "author": "Sastra Nababan",