├── .DS_Store ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── src ├── add-styles.ts ├── expose.ts ├── index.ts ├── jsx.ts ├── renderer.ts └── types.ts ├── test ├── browser │ ├── .DS_Store │ ├── index.html │ ├── spec │ │ ├── add-styles.mjs │ │ ├── expose.mjs │ │ ├── index.mjs │ │ ├── jsx.mjs │ │ ├── pre-check.mjs │ │ ├── wc-composition.mjs │ │ └── wc-creation.mjs │ └── tester │ │ └── index.mjs └── modules │ ├── index │ ├── checker.js │ ├── test.cjs │ └── test.mjs │ └── jsx │ ├── checker.js │ ├── test.cjs │ └── test.mjs ├── tsconfig.json └── webpack.config.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felippe-regazio/wcwc/abdab1a4a332c1c3a9f626f667a0df08870890d9/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | .vscode 3 | .DS_Store 4 | node_modules 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WCWC 2 | 3 | Write Cool Web Components 4 | 5 | [ Under Construction ] -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wcwc", 3 | "version": "1.0.0", 4 | "description": "Write Cool Web Components", 5 | "main": "lib/index.js", 6 | "types": "lib/d.ts", 7 | "files": [ 8 | "lib/*" 9 | ], 10 | "scripts": { 11 | "clear": "rimraf --sync ./lib", 12 | "build": "npm run clear && webpack --mode=production", 13 | "dev": "npm run clear && npm run test:browser", 14 | "test:browser": "webpack serve --mode=development --open", 15 | "test:module:index": "node ./test/modules/index/test.cjs && node ./test/modules/index/test.mjs", 16 | "test:module:jsx": "node ./test/modules/jsx/test.cjs && node ./test/modules/jsx/test.mjs", 17 | "test": "npm run clear && npm run build && npm run test:module:index && npm run test:module:jsx && npm run clear && npm run test:browser" 18 | }, 19 | "keywords": [], 20 | "author": "Felippe Regazio", 21 | "license": "MIT", 22 | "devDependencies": { 23 | "rimraf": "^3.0.2", 24 | "terser-webpack-plugin": "^5.3.6", 25 | "ts-loader": "^9.4.1", 26 | "typescript": "^4.8.4", 27 | "webpack": "^5.74.0", 28 | "webpack-cli": "^4.10.0", 29 | "webpack-dev-server": "^4.11.1" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/add-styles.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This function takes a .scss imported file (array style) or a String 3 | * and adds to the page as a