mage-obsidian 1.0.2 → 1.0.4

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": "mage-obsidian",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Mage Obsidian Ultis",
5
5
  "main": "./src/scripts/buildThemes.js",
6
6
  "keywords": [
@@ -48,6 +48,6 @@
48
48
  "MODULE_CSS_EXTEND_FILE": "module.extend.css",
49
49
  "MODULE_CONFIG_FILE": "module.config.cjs",
50
50
  "THEME_CONFIG_FILE": "theme.config.cjs",
51
- "THEME_TAILWIND_SOURCE_FILE": "theme.source.css",
51
+ "THEME_CSS_SOURCE_FILE": "theme.source.css",
52
52
  "LIB_PATH": "lib"
53
53
  }
@@ -45,6 +45,6 @@
45
45
  "MODULE_CSS_EXTEND_FILE": "module.extend.css",
46
46
  "MODULE_CONFIG_FILE": "module.config.cjs",
47
47
  "THEME_CONFIG_FILE": "theme.config.cjs",
48
- "THEME_TAILWIND_SOURCE_FILE": "theme.source.css",
48
+ "THEME_CSS_SOURCE_FILE": "theme.source.css",
49
49
  "LIB_PATH": "lib"
50
50
  }
@@ -14,10 +14,10 @@ let scenarios = [
14
14
  expected: {
15
15
  tailwind: {
16
16
  content: [
17
- 'magento_scenarios/app/code/Vendor/ModuleNameA/templates/**/*.phtml',
18
- 'magento_scenarios/app/code/Vendor/ModuleNameA/web/from_theme',
19
- 'magento_scenarios/app/code/Vendor/ModuleNameB/templates/**/*.phtml',
20
- 'magento_scenarios/app/code/Vendor/ModuleNameC/templates/**/*.phtml'
17
+ 'magento_scenarios/app/code/Vendor/ModuleNameA/view/frontend/templates/**/*.phtml',
18
+ 'magento_scenarios/app/code/Vendor/ModuleNameA/view/frontend/web/from_theme',
19
+ 'magento_scenarios/app/code/Vendor/ModuleNameB/view/frontend/templates/**/*.phtml',
20
+ 'magento_scenarios/app/code/Vendor/ModuleNameC/view/frontend/templates/**/*.phtml'
21
21
  ]
22
22
  }
23
23
  }
@@ -27,10 +27,10 @@ let scenarios = [
27
27
  expected: {
28
28
  tailwind: {
29
29
  content: [
30
- 'magento_scenarios/app/code/Vendor/ModuleNameA/templates/**/*.phtml',
31
- 'magento_scenarios/app/code/Vendor/ModuleNameA/web/from_theme',
32
- 'magento_scenarios/app/code/Vendor/ModuleNameB/templates/**/*.phtml',
33
- 'magento_scenarios/app/code/Vendor/ModuleNameC/templates/**/*.phtml'
30
+ 'magento_scenarios/app/code/Vendor/ModuleNameA/view/frontend/templates/**/*.phtml',
31
+ 'magento_scenarios/app/code/Vendor/ModuleNameA/view/frontend/web/from_theme',
32
+ 'magento_scenarios/app/code/Vendor/ModuleNameB/view/frontend/templates/**/*.phtml',
33
+ 'magento_scenarios/app/code/Vendor/ModuleNameC/view/frontend/templates/**/*.phtml'
34
34
  ]
35
35
  }
36
36
  }
@@ -48,8 +48,8 @@ let scenarios = [
48
48
  theme: { extend: {} },
49
49
  plugins: [],
50
50
  content: [
51
- 'magento_scenarios/app/code/Vendor/ModuleNameA/templates/**/*.phtml',
52
- 'magento_scenarios/app/code/Vendor/ModuleNameB/templates/**/*.phtml'
51
+ 'magento_scenarios/app/code/Vendor/ModuleNameA/view/frontend/templates/**/*.phtml',
52
+ 'magento_scenarios/app/code/Vendor/ModuleNameB/view/frontend/templates/**/*.phtml'
53
53
  ]
54
54
  }
55
55
  }
@@ -7,7 +7,7 @@ import fs from "fs/promises";
7
7
 
8
8
  const { getMagentoConfig, getModuleDefinition, getThemeDefinition } = configResolver;
9
9
  const MODULE_CSS_EXTEND_FILE = getMagentoConfig().MODULE_CSS_EXTEND_FILE;
10
- const THEME_TAILWIND_SOURCE_FILE = getMagentoConfig().THEME_TAILWIND_SOURCE_FILE;
10
+ const THEME_CSS_SOURCE_FILE = getMagentoConfig().THEME_CSS_SOURCE_FILE;
11
11
  async function getThemeImports(themeName, themeConfig) {
12
12
  if (!themeConfig) {
13
13
  themeConfig = themeResolver.getThemeConfig(themeName);
@@ -19,7 +19,7 @@ async function getThemeImports(themeName, themeConfig) {
19
19
  if (themeConfig.includeCssSourceFromParentThemes && themeDefinition.parent) {
20
20
  imports += await getThemeImports(themeDefinition.parent, themeConfig);
21
21
  }
22
- imports += `@import "${path.join(themePath, THEME_MODULE_WEB_PATH, THEME_CSS_FOLDER, THEME_TAILWIND_SOURCE_FILE)}";\n`;
22
+ imports += `@import "${path.join(themePath, THEME_MODULE_WEB_PATH, THEME_CSS_FOLDER, THEME_CSS_SOURCE_FILE)}";\n`;
23
23
  return imports;
24
24
  }
25
25
 
@@ -70,7 +70,7 @@ function getModuleConfigByThemeConfig(themeName, themeConfig) {
70
70
  } else if (moduleConfig.tailwind && moduleConfig.tailwind.content) {
71
71
  const moduleSrc = configResolver.getMagentoConfig().modules[moduleName].src;
72
72
  moduleConfig.tailwind.content = moduleConfig.tailwind.content.map((content) =>
73
- path.join(moduleSrc, 'web', content)
73
+ path.join(moduleSrc, 'view/frontend/web', content)
74
74
  );
75
75
  }
76
76
  modulesConfig = deepmerge(modulesConfig, moduleConfig);