aliascss 1.1.11 → 1.1.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.
@@ -3,13 +3,13 @@ import { compilers } from './custom-compilers.js';
3
3
  const config={
4
4
  input:['demo/**/*.html'],
5
5
  output:{
6
- location:'demo/acss.css',
6
+ location:'demo/css/css/style/acss.css',
7
7
  "--file":true
8
8
  },
9
9
  '--module':true,
10
10
  prefix:'',
11
11
  importModuleAs:'x',
12
- // minify:true,
12
+ minify:true,
13
13
  extractorFunction:"x|@",
14
14
  //reg:new RegExp('x' + "(`|\\(["+`"'])`+ "(.+)" + "(`|" + `["']` + "\\))") ,
15
15
  media:{
@@ -50,6 +50,14 @@ const config={
50
50
  compiler:getCompiler('padding').compiler,
51
51
  values:[...getCompiler('padding').values,'var(--padding-xs,4px):xs','8px:sm','12px:md','14px:lg','16px:xl','20px:xxl']
52
52
  },
53
+ 'px':{
54
+ type:'group',
55
+ compiler:(value)=>{
56
+ // const value=
57
+
58
+ }
59
+ },
60
+ 'py':{},
53
61
  'shadows':{
54
62
  property:'box-shadow',
55
63
  //alias:'sdo',
@@ -80,7 +88,8 @@ const config={
80
88
  }
81
89
  },
82
90
  prebuild:{
83
- 'bg-dark':'background:#0f0f0f',
91
+ 'colorize-dark':'background:#0f0f0f;color:#e3e3e3',
92
+ 'colorize-light':'background:#e3e3e3;color:rgba(0,0,0,0.8)',
84
93
  'flex-center':'display:flex;align-items:center;justify-content:center',
85
94
  },
86
95
  group:{
package/bin/aliascss.js CHANGED
@@ -2,14 +2,14 @@
2
2
  import path from 'path';
3
3
  import fs from 'fs'
4
4
  import main,{watch} from "../lib/node/compileFile.js";
5
- import pkg from '../package.json' assert { type: "json" };
5
+ // import pkg from '../package.json' assert { type: "json" };
6
6
 
7
7
 
8
8
  const argSupplied=process.argv;
9
9
 
10
10
  //Version
11
11
  if(argSupplied.indexOf('--version')!=-1){
12
- console.log( 'version' ,pkg.version);
12
+ console.log( 'version' ,'@1.x.x');
13
13
  process.exit();
14
14
  }
15
15
  //Initialize args
@@ -37,17 +37,17 @@ if(isModule){
37
37
 
38
38
  if(isConfigFile && fs.existsSync(path.resolve(configFileName))){
39
39
  let configFile=await import(path.resolve(configFileName));
40
- //check if it has input and out file
40
+ // check if it has input and out file
41
+
42
+ // create output file if not exist
41
43
  if(configFile.default.hasOwnProperty('output') && configFile.default.output.location ){
44
+ const output=configFile.default.output.location;
45
+ if(!fs.existsSync(path.resolve(output))){
46
+ fs.mkdirSync(path.dirname(output),{recursive:true});
47
+ fs.closeSync(fs.openSync(output,'w'));
48
+ }
42
49
 
43
- // fs.closeSync(fs.openSync(configFile.default.output.location, 'w'));
44
-
45
- // if(!fs.existsSync(path.resolve(configFile.default.output.location))){
46
- // console.error('Please check if output property in aliascss.config.js has location to the output file');
47
- // process.exit();
48
- // }
49
-
50
- //check for input in config file
50
+ // check for input in config file
51
51
  if(!configFile.default.input){
52
52
  console.error('No Input to Process : Provide input (glob-pattern) in input property of aliascss.config.js');
53
53
  process.exit();
@@ -59,7 +59,7 @@ if(isConfigFile && fs.existsSync(path.resolve(configFileName))){
59
59
  }
60
60
 
61
61
  }else{
62
- console.error('Please check if there is output property in aliascss.config.js and it has valid path to the output file');
62
+ console.error('Please check input/output property in aliascss.config.js ');
63
63
  process.exit();
64
64
  }
65
65
 
@@ -70,6 +70,12 @@ if(isConfigFile && fs.existsSync(path.resolve(configFileName))){
70
70
  let input=argSupplied[2];
71
71
  // console.log(argSupplied[2]);
72
72
  let output=argSupplied[3];
73
+
74
+ if(!fs.existsSync(path.resolve(output))){
75
+ fs.mkdirSync(path.dirname(output),{recursive:true});
76
+ fs.openSync(output,'w');
77
+ }
78
+
73
79
  if(fs.existsSync(path.resolve(output)) && input){
74
80
 
75
81
  let config={