Skip to content

Commit

Permalink
Merge pull request #57 from sidiousvic/dev
Browse files Browse the repository at this point in the history
Fixed exporting/importing bug
  • Loading branch information
sidiousvic authored Jul 20, 2020
2 parents a64b184 + 4538b1d commit 1112df2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ All notable changes to [Phantom](https://github.com/sidiousvic/phantom) will be

👻

## [v2.1.1] — 2020.07.20

- [x] Fixed exporting/importing bug.

## [v2.1.0] — 2020.07.20

- [x] Using `rollup` for builds.
- [x] Package exports type definitions
- [x] Package exports type definitions.
- [x] [Added tsc types test](./spec/types.test.ts)

## [v2.0.0] — 2020.07.19
Expand Down Expand Up @@ -58,6 +62,7 @@ All notable changes to [Phantom](https://github.com/sidiousvic/phantom) will be
- [x] In `phantom.ts` instances of `innerHTML` injection were reinforced with the sanitizer. HMTL is now sanitized before rendering to DOM.

[unreleased]: https://github.com/sidiousvic/phantom/compare/v2.1.0...HEAD
[v2.1.1]: https://github.com/sidiousvic/phantom/compare/v2.1.0...v2.1.1
[v2.1.0]: https://github.com/sidiousvic/phantom/compare/v2.0.0...v2.1.0
[v2.0.0]: https://github.com/sidiousvic/phantom/compare/v1.7.7...v2.0.0
[v1.7.7]: https://github.com/sidiousvic/phantom/compare/v1.6.0...v1.7.7
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sidiousvic/phantom",
"version": "2.1.0",
"version": "2.1.1",
"description": "A state—reactive DOM rendering engine for building UIs. 👻",
"main": "lib/phantom.js",
"unpkg": "dist/phantom.js",
Expand Down Expand Up @@ -33,7 +33,7 @@
"scripts": {
"clean": "rimraf lib dist es types",
"build": "rollup -c",
"preversion": "npm run build && npm test",
"preversion": "npm test",
"postversion": "git push origin --all; git push origin --tags",
"test": "jest && tsc spec/types.test.ts --noEmit",
"example/pizza": "webpack --config examples/pizza/webpack.config.js && webpack-dev-server --mode development --hot --watch-stdin --config examples/pizza/webpack.config.js",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default [
file: "lib/phantom.js",
format: "cjs",
indent: false,
exports: "auto",
exports: "named",
},
external: makeExternalPredicate([
...Object.keys(pkg.dependencies || {}),
Expand Down Expand Up @@ -122,6 +122,7 @@ export default [
format: "umd",
name: "Phantom",
indent: false,
exports: "named",
},
plugins: [
nodeResolve({
Expand All @@ -148,6 +149,7 @@ export default [
format: "umd",
name: "Phantom",
indent: false,
exports: "named",
},
plugins: [
nodeResolve({
Expand Down
3 changes: 1 addition & 2 deletions spec/types.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PhantomAction } from "./../src/types/phantomStore";
import phantom from "../src/phantom";
import createPhantomStore from "../src/createPhantomStore";
import phantom, { createPhantomStore } from "../src/index";

const initialData = {
0: "0",
Expand Down
7 changes: 2 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// functions
import createPhantomStore from "./createPhantomStore";
import phantom from "./phantom";

import createPhantomStore from "./createPhantomStore";
// types
export {
PhantomElement,
Expand All @@ -14,6 +12,5 @@ export {
Subscription,
} from "./types/phantomStore"; // phantomStore

// API exports
phantom.createPhantomStore = createPhantomStore;
export { createPhantomStore };
export default phantom;

0 comments on commit 1112df2

Please sign in to comment.