Skip to content

Commit

Permalink
chore: issue with publishj
Browse files Browse the repository at this point in the history
  • Loading branch information
azukaar committed Nov 19, 2019
1 parent 9e9933b commit c03c950
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-css",
"version": "1.0.1",
"version": "1.0.2",
"description": "Proper, framework agnostic Style in JS library, without any of the fuss of CSS",
"main": "dist/index.js",
"files": [
Expand All @@ -10,7 +10,7 @@
"test": "cross-env NODE_ENV=test jest",
"test-ci": "cross-env NODE_ENV=test jest --coverage; cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"start": "webpack-serve",
"build": "tsc src/index.ts --declaration --emitDeclarationOnly --outDir dist && webpack -p"
"build": "rm -rf dist; tsc src/index.ts --declaration --emitDeclarationOnly --outDir dist; webpack -p"
},
"serve": {
"content": [
Expand Down
8 changes: 7 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ const subscribeDynamicCSS = (className, unparsed, cb) => {
}

function DynamicCSS<T>(defaultValues: T): T {
type dynamicObject = T & {
subscribe: Function,
refresh: Function,
use: Function,
inject: Function
};
const nextId = dynamicCssList.length;
const result = new Proxy({
id: nextId,
Expand Down Expand Up @@ -107,7 +113,7 @@ function DynamicCSS<T>(defaultValues: T): T {

dynamicCssList.push(result);

return (result as any as T);
return (result as any as dynamicObject);
};

const resetCSS = function () {
Expand Down

0 comments on commit c03c950

Please sign in to comment.