aliascss 1.1.17 → 1.1.18

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.
@@ -230,6 +230,22 @@ export function initialize(configFile) {
230
230
  init["--file"] = true;
231
231
  }
232
232
  }
233
+ // Adding Custom color, length etc
234
+ if (configFile.hasOwnProperty('custom') && typeof configFile.custom === 'object') {
235
+ Object.keys(configFile.custom).forEach((key) => {
236
+ init.statementMaker.addCustom(key, configFile.custom[key]);
237
+ });
238
+ }
239
+ // Extend custom class name define {'border-color-native":'border-color: skyBlue',}
240
+ if (configFile.hasOwnProperty('prebuild')) {
241
+ init.statementMaker.prebuild(configFile.prebuild);
242
+ }
243
+ // Ignore these class name
244
+ if (configFile.hasOwnProperty('ignore')) {
245
+ if (Array.isArray(configFile.ignore)) {
246
+ configFile.ignore.forEach((each) => init.config.ignore.push(each.trim()));
247
+ }
248
+ }
233
249
  // --module
234
250
  if (configFile.hasOwnProperty('--module') && configFile.hasOwnProperty('importModuleAs')) {
235
251
  init["--module"] = true;
@@ -286,22 +302,6 @@ export function initialize(configFile) {
286
302
  if (init.customGroupStatement)
287
303
  writeStatementToFile(init.output, init.customGroupStatement, 'config.group');
288
304
  }
289
- // Adding Custom color, length etc
290
- if (configFile.hasOwnProperty('custom') && typeof configFile.custom === 'object') {
291
- Object.keys(configFile.custom).forEach((key) => {
292
- init.statementMaker.addCustom(key, configFile.custom[key]);
293
- });
294
- }
295
- // Extend custom class name define {'border-color-native":'border-color: skyBlue',}
296
- if (configFile.hasOwnProperty('prebuild')) {
297
- init.statementMaker.prebuild(configFile.prebuild);
298
- }
299
- // Ignore these class name
300
- if (configFile.hasOwnProperty('ignore')) {
301
- if (Array.isArray(configFile.ignore)) {
302
- configFile.ignore.forEach((each) => init.config.ignore.push(each.trim()));
303
- }
304
- }
305
305
  }
306
306
  // ----------------WATCH-------------------------------
307
307
  export function watch(config) {
@@ -51,8 +51,9 @@ export const compiler = {
51
51
  .split(',')
52
52
  .map(e => (className.replace(matchGroupCSS[0], '') + "-").replace(/--$/, '-') + e.replace(/^--/, '-'))
53
53
  .join(' ');
54
- return this.group(asString, className);
54
+ return this.group(asString, as ? as : className);
55
55
  }
56
+ //
56
57
  let beforeClassNameSelector = '';
57
58
  if (this.prefix && !className.match(new RegExp('^' + this.prefix + "[-]"))) {
58
59
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aliascss",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "description": "AliasCSS is a CSS post processor.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",