Skip to content

Commit

Permalink
Chore: Restructured for npm publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanholzapfel committed Apr 30, 2021
1 parent b0f426d commit 8dea20f
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
.idea
/dist/
25 changes: 19 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
{
"name": "lit-state",
"version": "3.0.1",
"name": "@stefanholzapfel/lit-state",
"version": "3.0.2",
"description": "A reactive state management for Lit 2",
"repository": {
"type": "git",
"url": "https://github.com/stefanholzapfel/lit-state.git"
},
"browser": "index.ts",
"scripts": {},
"scripts": {
"build": "tsc --build --clean && tsc",
"publish_npm": "tsc --build --clean && tsc && yarn publish"
},
"author": "Stefan Holzapfel",
"license": "MIT",
"dependencies": {
"lit-helpers": "https://github.com/stefanholzapfel/lit-helpers.git#2.0.0",
"lit": "^2.0.0-rc.1",
"ts-essentials": "^7.0.1"
}
},
"devDependencies": {
"typescript": "^4.2.4"
},
"type": "module",
"types": "dist/index.d.ts",
"main:": "dist/index.js",
"module": "dist/index.js",
"files": [
"dist",
"src"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions litElementStateful.ts → src/litElementStateful.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {DeepPartial} from 'ts-essentials';
import { LitElement } from 'lit';
import {
StateSubscriptionFunction,
ReducableState,
Expand All @@ -7,9 +8,8 @@ import {
import {LitElementStateService} from './litElementState.service';
import {LitElementStateSubscription} from './litElementStateSubscription';
import {optionsFromDefaultOrParams} from './litElementState.helpers';
import {LitElementEnhanced} from '../lit-helpers';

export class LitElementStateful<State> extends LitElementEnhanced {
export class LitElementStateful<State> extends LitElement {

private autoUnsubscribeSubs: LitElementStateSubscription<any>[] = [];
private stateService: LitElementStateService<State>;
Expand Down
16 changes: 5 additions & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@
"moduleResolution": "node",
"target": "es2020",
"lib": ["dom", "es2020"],
"sourceMap": true,
"experimentalDecorators": true
"declaration": true,
"declarationMap": true,
"experimentalDecorators": true,
"outDir": "dist"
},
"include": [
"*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
],
"browserslist": [
"> 1%",
"last 2 versions"
"node_modules"
]
}
11 changes: 5 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ lit-element@^3.0.0-rc.1:
"@lit/reactive-element" "^1.0.0-rc.1"
lit-html "^2.0.0-rc.1"

"lit-helpers@https://github.com/stefanholzapfel/lit-helpers.git#2.0.0":
version "2.0.0"
resolved "https://github.com/stefanholzapfel/lit-helpers.git#3b65b9dda8b7438f4e9db6bc9c389341a5fd73bc"
dependencies:
lit "^2.0.0-rc.1"

lit-html@^2.0.0-rc.1:
version "2.0.0-rc.2"
resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.0.0-rc.2.tgz#c7ac652af1df7e5d8e32a3e6130221766d09cbde"
Expand All @@ -46,3 +40,8 @@ ts-essentials@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.1.tgz#d205508cae0cdadfb73c89503140cf2228389e2d"
integrity sha512-8lwh3QJtIc1UWhkQtr9XuksXu3O0YQdEE5g79guDfhCaU1FWTDIEDZ1ZSx4HTHUmlJZ8L812j3BZQ4a0aOUkSA==

typescript@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==

0 comments on commit 8dea20f

Please sign in to comment.