@master/css 2.0.0-rc.10 → 2.0.0-rc.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.
package/README.md CHANGED
@@ -60,49 +60,10 @@
60
60
  </div>
61
61
 
62
62
  ## Documentation
63
- Visit [rc.css.master.co](https://rc.css.master.co) to view the full documentation
63
+ Visit [rc.css.master.co](https://rc.css.master.co) to view the full documentation.
64
64
 
65
65
  ## Getting Started
66
- Check out the [official guides](https://rc.css.master.co/docs) to get started with Master CSS, or walk through the [examples](https://github.com/master-co/css/tree/rc/examples) for a quick overview of integrating with your framework.
67
-
68
- ## Rendering Modes
69
- Master CSS provides various [rendering modes](https://rc.css.master.co/docs/rendering-modes), allowing you to choose according to the characteristics and needs of different projects.
70
-
71
- - [Progressive Rendering](https://rc.css.master.co/docs/rendering-modes/progressive-rendering) - Scan the requested HTML on the server side, generate CSS rules, and enable runtime engine on the browser side
72
- - [Runtime Rendering](https://rc.css.master.co/docs/rendering-modes/runtime-rendering) - Observe the DOM tree, manipulate CSS rules according to the changed class name, and synchronize to the running style sheet at runtime
73
- - [Static Extraction](https://rc.css.master.co/docs/rendering-modes/static-extraction) - Scan source files for class names at build time, extract class names, and generate CSS files/virtual modules, then import them in the entry file
74
-
75
- ## Ecosystem
76
- We've built various Master CSS core functionality/integration packages:
77
-
78
- - [CSS](https://github.com/master-co/css/tree/rc/packages/css) - The core of Master CSS, including the runtime engine
79
-
80
- ##### Frameworks
81
- - [React](https://github.com/master-co/css/tree/rc/packages/react) - Integrate Master CSS the React way
82
- - [Svelte](https://github.com/master-co/css/tree/rc/packages/svelte) - Integrate Master CSS the Svelte way
83
- - [Vue](https://github.com/master-co/css/tree/rc/packages/vue) - Integrate Master CSS the Vue.js way
84
-
85
- ##### Progressive Rendering
86
- - [Server](https://github.com/master-co/css/tree/rc/packages/server) - Generate Master CSS text from markup on the server
87
- - [Renderer](https://github.com/master-co/css/tree/rc/packages/renderer) - Pre-renders and injects HTML-required CSS
88
-
89
- ##### Static Extraction
90
- - [Extractor](https://github.com/master-co/css/tree/rc/packages/extractor) - Master CSS static extractor for various raw text extraction.
91
- - [Vite](https://github.com/master-co/css/tree/rc/packages/extractor.vite) - Integrate Master CSS Static Extraction in Vite way
92
- - [Webpack](https://github.com/master-co/css/tree/rc/packages/extractor.webpack) - Integrate Master CSS Static Extraction in Webpack way
93
-
94
- ##### Validation
95
- - [Validator](https://github.com/master-co/css/tree/rc/packages/validator) for Master CSS class syntax
96
-
97
- ##### Language
98
- - [Server](https://github.com/master-co/css/tree/rc/packages/language-server) - The core of the Master CSS language server
99
- - [Service](https://github.com/master-co/css/tree/rc/packages/language-service) - The core of the Master CSS language service
100
- - [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=masterco.master-css-language-service) - Master CSS Language Service for Visual Studio Code Extension
101
-
102
- ##### Others
103
- - [Normal CSS](https://rc.css.master.co/docs/global-styles) - Normalize the browser's styles
104
- - [Theme Service](https://rc.css.master.co/docs/theme-service) - A CSS theme-switching service for Master CSS
105
- - [Class Variant](https://rc.css.master.co/docs/class-variant) - Create reusable, extensible, and customizable style class variants
66
+ Check out the [official guides](https://rc.css.master.co/docs) to get started with Master CSS.
106
67
 
107
68
  ## Community
108
69
  The Master CSS community can be found here:
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var T=Object.create;var d=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var j=(e,s,t,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of v(s))!_.call(e,o)&&o!==t&&d(e,o,{get:()=>s[o],enumerable:!(r=C(s,o))||r.enumerable});return e};var p=(e,s,t)=>(t=e!=null?T(x(e)):{},j(s||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e));var h=require("commander"),m=p(require("path")),c=p(require("fs"));var g=`/** @type {import('@master/css').Config} */
2
+ "use strict";var C=Object.create;var d=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var j=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of v(o))!_.call(e,s)&&s!==t&&d(e,s,{get:()=>o[s],enumerable:!(r=T(o,s))||r.enumerable});return e};var p=(e,o,t)=>(t=e!=null?C(x(e)):{},j(o||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e));var h=require("commander"),m=p(require("path")),a=p(require("fs"));var y=`/** @type {import('@master/css').Config} */
3
3
  module.exports = {
4
4
  styles: {},
5
5
  rules: {},
@@ -9,7 +9,7 @@ module.exports = {
9
9
  animations: {},
10
10
  selectors: {},
11
11
  functions: {}
12
- }`;var y=`/** @type {import('@master/css').Config} */
12
+ }`;var S=`/** @type {import('@master/css').Config} */
13
13
  export default {
14
14
  styles: {},
15
15
  rules: {},
@@ -19,7 +19,7 @@ export default {
19
19
  animations: {},
20
20
  selectors: {},
21
21
  functions: {}
22
- }`;var S=`import type { Config } from '@master/css'
22
+ }`;var g=`import type { Config } from '@master/css'
23
23
 
24
24
  export default {
25
25
  styles: {},
@@ -30,4 +30,4 @@ export default {
30
30
  animations: {},
31
31
  selectors: {},
32
32
  functions: {}
33
- } as Config`;var n=p(require("@techor/log")),l=require("@techor/fs"),{version:b,name:M,description:F}=(0,l.readJSONFileSync)(m.default.resolve(__dirname,"../../package.json")),a=new h.Command;a.name(M).description(F).version(b||"0.0.0");a.command("init").description("Initialize definition files for Master CSS").option("-o, --override","Override existing definition file").option("--esm","ES Module .mjs").option("--ts","TypeScript .ts").option("--cjs","CommonJS .js").action(async function(e){let{esm:s,ts:t,cjs:r}=e;if(!s&&!t&&!r)if(c.default.existsSync("tsconfig.json"))t=!0;else{let{type:i}=(0,l.readJSONFileSync)("./package.json")||{};i==="module"?s=!0:r=!0}let o=(i,f)=>{let u=c.default.existsSync(m.default.join(process.cwd(),i));u?u&&e.override?(c.default.writeFileSync(i,f),n.default.ok`**${i}** file is overridden`):n.default.x`**${i}** file already exists`:(c.default.writeFileSync(i,f),n.default.ok`**${i}** file is created`)};s&&o("master.css.mjs",y),t&&o("master.css.ts",S),r&&o("master.css.js",g)});a.command("render").description("Scans HTML and injects generated CSS rules").argument("<source paths>","The path in glob patterns of the source of the HTML file").option("-c --config <path>","The source path of the Master CSS configuration","master.css.*").option("-a --analyze","Analyze injected CSS and HTML size ( brotli ) without writing to file").action(async function(e,s){try{await require("@master/css-renderer/actions/main")(e,s)}catch(t){t.code==="ERR_MODULE_NOT_FOUND"?n.default.i`Please run **npm** **install** **@master/css-renderer** first`:console.error(t)}});a.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","Verbose logging 0~N","1").option("--options <path>","Specify your extractor options sources","master.css-extractor.*").action(async function(e,s){try{await require("@master/css-extractor/actions/main")(e,s)}catch(t){t.code==="ERR_MODULE_NOT_FOUND"?n.default.i`Please run **npm** **install** **@master/css-extractor** first`:console.error(t)}});console.log(a.parse);a.parse();
33
+ } as Config`;var n=p(require("@techor/log")),l=require("@techor/fs"),{version:b,name:M,description:F}=(0,l.readJSONFileSync)(m.default.resolve(__dirname,"../../package.json")),c=new h.Command;c.name(M).description(F).version(b||"0.0.0");c.command("init").description("Initialize definition files for Master CSS").option("-o, --override","Override existing definition file").option("--esm","ES Module .mjs").option("--ts","TypeScript .ts").option("--cjs","CommonJS .js").action(async function(e){let{esm:o,ts:t,cjs:r}=e;if(!o&&!t&&!r)if(a.default.existsSync("tsconfig.json"))t=!0;else{let{type:i}=(0,l.readJSONFileSync)("./package.json")||{};i==="module"?o=!0:r=!0}let s=(i,f)=>{let u=a.default.existsSync(m.default.join(process.cwd(),i));u?u&&e.override?(a.default.writeFileSync(i,f),n.default.ok`**${i}** file is overridden`):n.default.x`**${i}** file already exists`:(a.default.writeFileSync(i,f),n.default.ok`**${i}** file is created`)};o&&s("master.css.mjs",S),t&&s("master.css.ts",g),r&&s("master.css.js",y)});c.command("render").description("Scans HTML and injects generated CSS rules").argument("<source paths>","The path in glob patterns of the source of the HTML file").option("-c --config <path>","The source path of the Master CSS configuration","master.css.*").option("-a --analyze","Analyze injected CSS and HTML size ( brotli ) without writing to file").action(async function(e,o){try{await require("@master/css-renderer/actions/main")(e,o)}catch(t){t.code==="ERR_MODULE_NOT_FOUND"?n.default.i`Please run **npm** **install** **@master/css-renderer** first`:console.error(t)}});c.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(e,o){try{await require("@master/css-extractor/actions/main")(e,o)}catch(t){t.code==="ERR_MODULE_NOT_FOUND"?n.default.i`Please run **npm** **install** **@master/css-extractor** first`:console.error(t)}});c.parse();
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@master/css","scripts":{"build":"techor pack --declare --external @master/css-renderer @master/css-extractor","dev":"pnpm run build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","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/css"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.bundle.js","jsnext:main":"./dist/index.bundle.mjs","esnext":"./dist/index.bundle.mjs","module":"./dist/index.bundle.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.bundle.js","import":"./dist/index.bundle.mjs","types":"./dist/index.d.ts"}},"bin":{"@master/css":"./dist/bin/index.bundle.js","mcss":"./dist/bin/index.bundle.js","mastercss":"./dist/bin/index.bundle.js"},"files":["dist"],"publishConfig":{"access":"public"},"dependencies":{"@master/normal.css":"^2.0.0-rc.10","@techor/fs":"^2.5.24","@techor/log":"^2.5.24","commander":"^11.0.0"},"devDependencies":{"@techor/extend":"^2.5.24","@techor/pack":"^2.5.24","@types/jest":"^29.5.11","css-shared":"^2.0.0-rc.10","csstype":"^3.1.2","puppeteer":"^21.0.1","vite":"^4.2.1"},"version":"2.0.0-rc.10"}
1
+ {"name":"@master/css","scripts":{"build":"techor pack --declare --external @master/css-renderer @master/css-extractor","dev":"pnpm run build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","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/css"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.bundle.js","jsnext:main":"./dist/index.bundle.mjs","esnext":"./dist/index.bundle.mjs","module":"./dist/index.bundle.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.bundle.js","import":"./dist/index.bundle.mjs","types":"./dist/index.d.ts"}},"bin":{"@master/css":"./dist/bin/index.bundle.js","mcss":"./dist/bin/index.bundle.js","mastercss":"./dist/bin/index.bundle.js"},"files":["dist"],"publishConfig":{"access":"public"},"dependencies":{"@master/normal.css":"^2.0.0-rc.12","@techor/fs":"^2.5.24","@techor/log":"^2.5.24","commander":"^11.0.0"},"devDependencies":{"@techor/extend":"^2.5.24","@techor/pack":"^2.5.24","@types/jest":"^29.5.11","css-shared":"^2.0.0-rc.12","csstype":"^3.1.2","puppeteer":"^21.0.1","vite":"^4.2.1"},"version":"2.0.0-rc.12"}