neo.mjs 4.0.23 → 4.0.26
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.
|
@@ -192,7 +192,7 @@ if (programOpts.info) {
|
|
|
192
192
|
} else {
|
|
193
193
|
fileInfo = path.parse(file);
|
|
194
194
|
|
|
195
|
-
if (!fileInfo.name.startsWith('_')) {
|
|
195
|
+
if (!fileInfo.name.startsWith('_') && fileInfo.ext === '.scss') {
|
|
196
196
|
className = relativePath === '' ? fileInfo.name : `${relativePath.substring(1)}/${fileInfo.name}`;
|
|
197
197
|
className = className.split('/').join('.');
|
|
198
198
|
|
package/package.json
CHANGED
|
@@ -60,11 +60,12 @@ class Stylesheet extends Base {
|
|
|
60
60
|
*
|
|
61
61
|
*/
|
|
62
62
|
addGlobalCss() {
|
|
63
|
-
let config
|
|
64
|
-
themes
|
|
65
|
-
folders
|
|
66
|
-
env
|
|
67
|
-
path
|
|
63
|
+
let config = Neo.config,
|
|
64
|
+
themes = config.themes,
|
|
65
|
+
folders = config.useCssVars ? ['src', ...themes] : [themes[0]],
|
|
66
|
+
env = config.environment,
|
|
67
|
+
path = env.startsWith('dist/') ? '' : `../../dist/${env}/`,
|
|
68
|
+
rootPath = config.basePath.substr(6);
|
|
68
69
|
|
|
69
70
|
document.body.classList.add(themes[0]);
|
|
70
71
|
|
|
@@ -76,7 +77,7 @@ class Stylesheet extends Base {
|
|
|
76
77
|
this.createStyleSheet(
|
|
77
78
|
null,
|
|
78
79
|
null,
|
|
79
|
-
`${
|
|
80
|
+
`${rootPath}${path}css${config.useCssVars ? '' : '-no-vars'}/${folder}/Global.css`
|
|
80
81
|
);
|
|
81
82
|
});
|
|
82
83
|
}
|
|
@@ -90,7 +91,8 @@ class Stylesheet extends Base {
|
|
|
90
91
|
let className = data.className,
|
|
91
92
|
config = Neo.config,
|
|
92
93
|
env = config.environment,
|
|
93
|
-
path = env.startsWith('dist/') ? '' :
|
|
94
|
+
path = env.startsWith('dist/') ? '' : `../../dist/${env}/`,
|
|
95
|
+
rootPath = config.basePath.substr(6);
|
|
94
96
|
|
|
95
97
|
if (className.startsWith('Neo.')) {
|
|
96
98
|
className = className.substring(4);
|
|
@@ -108,7 +110,7 @@ class Stylesheet extends Base {
|
|
|
108
110
|
this.createStyleSheet(
|
|
109
111
|
null,
|
|
110
112
|
null,
|
|
111
|
-
|
|
113
|
+
`${rootPath}${path}css${config.useCssVars ? '' : '-no-vars'}/${folder}/${className}.css`
|
|
112
114
|
);
|
|
113
115
|
}
|
|
114
116
|
});
|