frets-styles-generator
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -5,3 +5,3 @@ #! /usr/bin/env node | ||
const fs = require("fs"); | ||
const postcss = require("postcss"); | ||
const postcss_1 = require("postcss"); | ||
const importer = require("postcss-import"); | ||
@@ -41,3 +41,3 @@ const camelcase = require("camel-case"); | ||
const walker = walk.walk(inputPath, { | ||
filters: ["node_modules"] | ||
filters: ["node_modules"], | ||
}); | ||
@@ -66,3 +66,3 @@ walker.on("file", (root, stat, next) => { | ||
} | ||
customPlugins = customPlugins.filter(p => { | ||
customPlugins = customPlugins.filter((p) => { | ||
if (p && p.postcssPlugin && removeThesePlugins.includes(p.postcssPlugin)) { | ||
@@ -93,5 +93,5 @@ console.log("skipping plugin: ", p.postcssPlugin); | ||
// console.log("Using Config: ", opts); | ||
postcss([importer({ root: inputPath }), ...customPlugins]) | ||
postcss_1.default([importer({ root: inputPath }), ...customPlugins]) | ||
.process(data.toString(), { | ||
from: inputPath | ||
from: inputPath, | ||
}) | ||
@@ -154,2 +154,2 @@ .then((result) => { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQtc3R5bGUtdHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZC1zdHlsZS10eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUtBLHlCQUF5QjtBQUN6QixtQ0FBbUM7QUFFbkMsTUFBTSxRQUFRLEdBQUcsT0FBTyxDQUFDLGdCQUFnQixDQUFDLENBQUM7QUFDM0MsTUFBTSxTQUFTLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQ3hDLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUNyQyxNQUFNLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDN0IsTUFB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Q0FBQztZQUMxQyxJQUFJLE9BQU8sQ0FBQyxTQUFTLEVBQUU7Z0JBQ3JCLEVBQUUsQ0FBQyxhQUFhLENBQUMsS0FBSyxFQUFFLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQzthQUNyQztZQUNELElBQUksU0FBUyxJQUFJLENBQUMsVUFBVSxFQUFFO2dCQUM1QixVQUFVLEdBQUcsSUFBSSxDQUFDO2dCQUNsQixPQUFPLENBQUMsR0FBRyxDQUFDLHlCQUF5QixDQUFDLENBQUM7Z0JBQ3ZDLEVBQUUsQ0FBQyxTQUFTLENBQUMsS0FBSyxFQUFFLEdBQUcsRUFBRSxDQUFDLFFBQVEsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLENBQUMsQ0FBQzthQUNwRDtRQUNILENBQUMsQ0FBQyxDQUFDO0lBQ1AsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDIn0= |
@@ -28,13 +28,15 @@ "use strict"; | ||
constructor(selector: string) { | ||
this.chain = new Array<string>(); | ||
if (selector.length > 0) { | ||
this.chain.push(selector); | ||
constructor(selector: string) { | ||
this.chain = new Array<string>() | ||
if (typeof selector === 'string') { | ||
const parts = selector.split('.') | ||
this.chain.push(...parts) | ||
} | ||
return this; | ||
return this | ||
} | ||
// The first element in the arguments might be a attributes object, or they might all be Nodes | ||
public h = <T>( | ||
...children: Array<ReactElement | string | AllHTMLAttributes<T> | Props<T>> | ||
...children: Array<ReactElement | string | AllHTMLAttributes<T> | Props<T> | Boolean> | ||
): ReactElement => { | ||
@@ -62,3 +64,3 @@ const style = { | ||
}, | ||
...(children.slice(1) as Array<ReactElement>) | ||
...(children.slice(1).filter(Boolean) as Array<ReactElement>) | ||
); | ||
@@ -72,3 +74,3 @@ } | ||
}, | ||
...(children as Array<ReactElement>) | ||
...(children.filter(Boolean) as Array<ReactElement>) | ||
); | ||
@@ -146,2 +148,9 @@ }; | ||
public toSelector = (): string => { | ||
if (this.chain.length === 1) { | ||
return this.chain[0] || 'div' | ||
} | ||
return this.chain.join('.') | ||
} | ||
public toString = (): string => { | ||
@@ -163,2 +172,11 @@ if (this.classObjectMode) { | ||
public addSelectors = (selector: string) => { | ||
if (typeof selector === 'string') { | ||
const parts = selector.split('.') | ||
this.chain.push(...parts) | ||
} | ||
return this | ||
} | ||
public add = (className: string | false): BaseStyles => { | ||
@@ -188,3 +206,12 @@ if (!className) return this; | ||
}; | ||
export function $onClick<T>(fn: React.MouseEventHandler) { | ||
return (child: BaseStyles, ...children: BaseStyleArgs<T>) => { | ||
return children[0] && | ||
typeof children[0] === 'object' && | ||
!Array.isArray(children[0]) && | ||
!(children[0] as ReactElement).type | ||
? child.h({ ...children[0], onClick: fn }, ...children.slice(1)) | ||
: child.h({ onClick: fn }, ...children) | ||
} | ||
} | ||
export const $ = $$(); | ||
@@ -195,2 +222,2 @@ | ||
exports.default = default_1; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3JlYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUJBQXdCLGVBQXlCO0lBQy9DLE9BQU87Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUE0S0wsZUFBZSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUM7Ozs7Ozs7Ozs7Q0FVN0IsQ0FBQztBQUNGLENBQUM7QUF4TEQsNEJBd0xDIn0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3JlYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUJBQXlCLGVBQXlCO0lBQ2hELE9BQU87Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUE4TEwsZUFBZSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FtQjdCLENBQUM7QUFDRixDQUFDO0FBbk5ELDRCQW1OQyJ9 |
{ | ||
"name": "frets-styles-generator", | ||
"version": "2.0.1", | ||
"description": "Tool that genreates a typescript class for FRETS based on a CSS file", | ||
"version": "2.1.0", | ||
"description": "Tool that generates a Typescript class for hyperscript functions based on a CSS file", | ||
"main": "build/main/index.js", | ||
"typings": "build/main/index.d.ts", | ||
"repository": "https://gitlab.com/FRETS/frets.git", | ||
"repository": "https://github.com/sirtimbly/frets-styles-generator.git", | ||
"author": "Tim Bendt <biz@timbly.com>", | ||
@@ -15,12 +15,12 @@ "license": "MIT", | ||
"info": "npm-scripts-info", | ||
"build": "trash build && yarn build:main", | ||
"build": "trash build && npm run build:main", | ||
"build:main": "tsc -p tsconfig.json", | ||
"build:tests": "trash test && node config/exports/build-tests.js", | ||
"lint": "tslint --project . --type-check src/**/*.ts", | ||
"unit": "yarn build && yarn build:tests && ava", | ||
"test": "yarn lint", | ||
"watch": "yarn build && yarn build:tests -- --no-browser && concurrently -r --kill-others 'npm run --silent build:main -- -w' 'npm run --silent build:tests -- -w --no-browser' 'sleepms 2000 && ava --watch'", | ||
"unit": "npm run build && npm run build:tests && ava", | ||
"test": "npm run lint", | ||
"watch": "npm run build && npm run build:tests -- --no-browser && concurrently -r --kill-others 'npm run --silent build:main -- -w' 'npm run --silent build:tests -- -w --no-browser' 'sleepms 2000 && ava --watch'", | ||
"changelog": "standard-version", | ||
"release": "yarn reset && yarn test && yarn changelog", | ||
"reset": "git clean -dfx && git reset --hard && yarn" | ||
"release": "npm run reset && npm run test && npm run changelog", | ||
"reset": "git clean -dfx && git reset --hard && npm install" | ||
}, | ||
@@ -47,3 +47,3 @@ "scripts-info": { | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
"@semantic-release/npm": "^7.0.5", | ||
"@semantic-release/npm": "^7.1.3", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
@@ -58,5 +58,5 @@ "@types/node": "^8.0.4", | ||
"opn-cli": "^4.0.0", | ||
"semantic-release": "^17.4.4", | ||
"sleep-ms": "^2.0.1", | ||
"standard-version": "^8.0.1", | ||
"semantic-release": "^17.1.1", | ||
"trash-cli": "^1.4.0", | ||
@@ -113,3 +113,3 @@ "tslint": "^5.12.1", | ||
"normalize-path": "^3.0.0", | ||
"postcss": "^8.1.8", | ||
"postcss": "^8.3.5", | ||
"postcss-import": "^13.0.0", | ||
@@ -116,0 +116,0 @@ "tslib": "^1.9.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
53895
757
Updatedpostcss@^8.3.5