@master/css-cli 2.0.0-rc.63 → 2.0.0-rc.65
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { options } from '@master/css-extractor';
|
|
1
2
|
import log from '@techor/log';
|
|
2
3
|
|
|
3
|
-
var commandExtract = ((program)=>program.command('extract').argument('[source paths]', 'The glob pattern path to extract sources').option('-w, --watch', 'Watch file changed and generate CSS rules.').option('-o, --output <path>', 'Specify your CSS file output path').option('-v, --verbose <level>', 'Verbose logging 0~N', '1').option('--no-export', 'Print only CSS results.').option('--options <path>', 'Specify your extractor options sources', 'master.css-extractor').action(async function(specifiedSourcePaths, options) {
|
|
4
|
-
const
|
|
4
|
+
var commandExtract = ((program)=>program.command('extract').argument('[source paths]', 'The glob pattern path to extract sources').option('-w, --watch', 'Watch file changed and generate CSS rules.').option('-o, --output <path>', 'Specify your CSS file output path', options.output).option('-v, --verbose <level>', 'Verbose logging 0~N', '1').option('--no-export', 'Print only CSS results.').option('--options <path>', 'Specify your extractor options sources', 'master.css-extractor').action(async function(specifiedSourcePaths, options) {
|
|
5
|
+
const CSSExtractor = (await import('@master/css-extractor')).default;
|
|
5
6
|
const { watch, output, verbose, cwd, options: customOptions } = options || {};
|
|
6
7
|
const extractor = new CSSExtractor(customOptions, cwd);
|
|
7
8
|
extractor.on('init', (options)=>{
|
|
@@ -20,7 +21,6 @@ var commandExtract = ((program)=>program.command('extract').argument('[source pa
|
|
|
20
21
|
options.verbose = verbose ? +verbose : options.verbose;
|
|
21
22
|
});
|
|
22
23
|
extractor.init();
|
|
23
|
-
console.log(extractor.allowedSourcePaths);
|
|
24
24
|
if (watch) {
|
|
25
25
|
extractor.on('watchStart', async ()=>{
|
|
26
26
|
await extractor.prepare();
|
package/dist/commands/render.mjs
CHANGED
|
@@ -39,10 +39,8 @@ var commandRender = ((program)=>program.command('render').description('Scans HTM
|
|
|
39
39
|
writeFileSync(filename, html);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
const prettifiedCSSSize = bytes(renderedCSSSize
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
log.ok`**${filename}**${' '.repeat(col1Width - filename.length - 2)}${prettifiedCSSSize.padStart(col2Width)}`;
|
|
42
|
+
const prettifiedCSSSize = bytes(renderedCSSSize);
|
|
43
|
+
log.ok`**${filename}**${' '.repeat(col1Width - filename.length - 2)}${prettifiedCSSSize?.padStart(col2Width)}`;
|
|
46
44
|
resolve();
|
|
47
45
|
});
|
|
48
46
|
})));
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@master/css-cli","scripts":{"build":"techor build \"src/**/*.ts\" --formats esm","dev":"pnpm build --watch","lint":"eslint","type-check":"tsc --noEmit","test":"vitest"},"type":"module","license":"MIT","description":"Master CSS CLI","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/cli"},"keywords":["cli","css","mastercss"],"bin":{"mcss":"./dist/bin/index.mjs","mastercss":"./dist/bin/index.mjs"},"files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/css":"^2.0.0-rc.
|
|
1
|
+
{"name":"@master/css-cli","scripts":{"build":"techor build \"src/**/*.ts\" --formats esm","dev":"pnpm build --watch","lint":"eslint","type-check":"tsc --noEmit","test":"vitest"},"type":"module","license":"MIT","description":"Master CSS CLI","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/cli"},"keywords":["cli","css","mastercss"],"bin":{"mcss":"./dist/bin/index.mjs","mastercss":"./dist/bin/index.mjs"},"files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/css":"^2.0.0-rc.65","@master/css-explore-config":"^2.0.0-rc.65","@master/css-extractor":"^2.0.0-rc.65","@master/css-server":"^2.0.0-rc.65","@techor/extend":"^3.2.0","@techor/fs":"^3.2.0","@techor/glob":"^3.2.0","@techor/log":"^3.2.0","bytes":"^3.1.2","commander":"^12.0.0","minimatch":"^9.0.3","pretty-hrtime":"^1.0.3"},"devDependencies":{"@types/pretty-hrtime":"^1.0.3","fast-glob":"^3.3.2","shared":"^2.0.0-rc.65"},"version":"2.0.0-rc.65"}
|