Skip to content

Commit

Permalink
publish utils
Browse files Browse the repository at this point in the history
The  resulting core and layers bundle requires type definitions from utils.
  • Loading branch information
prevwong committed Jan 3, 2020
1 parent 304a458 commit 2c75efb
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"url": "https://github.com/prevwong/craft.js/issues"
},
"dependencies": {
"@craftjs/utils": "^0.1.0-alpha.2",
"debounce": "^1.2.0",
"immer": "^3.1.3",
"lodash.isequalwith": "^4.4.0",
"shortid": "^2.2.15",
"tiny-invariant": "^1.0.6"
"tiny-invariant": "^1.0.6",
"@types/react": "^16.9.11"
},
"devDependencies": {
"@craftjs/utils": "^0.1.0-alpha.2",
"@types/react": "^16.9.11",
"react": "^16.8.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
},
"homepage": "https://github.com/prevwong/craft.js/",
"dependencies": {
"@craftjs/utils": "^0.1.0-alpha.2",
"immer": "^3.1.3",
"lodash.isequalwith": "^4.4.0",
"react-contenteditable": "^3.3.3",
Expand All @@ -40,7 +41,6 @@
},
"devDependencies": {
"@babel/core": "^7.7.4",
"@craftjs/utils": "^0.1.0-alpha.2",
"@svgr/rollup": "^4.3.3"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Prev Wong
Copyright (c) 2020 Previnash Wong Sze Chuan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion packages/utils/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# @craftjs/utils

Internal package containing common utilities used across the Craft.js monorepo.
Internal package containing common utilities used across the [Craft.js](https://github.com/prevwong/craft.js) monorepo.


9 changes: 4 additions & 5 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "@craftjs/utils",
"private": true,
"description": "Utilities used internally across the craft.js monorepo",
"private": false,
"version": "0.1.0-alpha.2",
"description": "Shared utilities used across the craft.js monorepo",
"author": "Prev Wong <prevwong@gmail.com>",
"license": "MIT",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./lib/index.d.ts",
Expand All @@ -15,9 +16,7 @@
"dependencies": {
"immer": "^3.1.3",
"lodash.isequalwith": "^4.4.0",
"tiny-invariant": "^1.0.6"
},
"devDependencies": {
"tiny-invariant": "^1.0.6",
"@types/react": "^16.9.11"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/useConnectorHooks.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// https://github.com/react-dnd/react-dnd
import { isValidElement, ReactElement } from "react";
import { cloneElement } from "react";
import invariant from "tiny-invariant";
import { useMemo } from "react";
import { useRef } from "react";

// Thank you React DND
function setRef(ref: any, node: any) {
if (node) {
if (typeof ref === "function") {
Expand Down
1 change: 1 addition & 0 deletions packages/utils/src/useMethods.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/pelotom/use-methods
import produce, { PatchListener } from "immer";
import { useMemo, useEffect, useRef, useReducer } from "react";

Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import typescript from "rollup-plugin-typescript";
import babel from "rollup-plugin-babel";

const shouldMinify = process.env.NODE_ENV === "production";
const bundle = ["@craftjs/utils", "tslib"];
const bundle = ["tslib"];

export default {
input: "./src/index.ts",
Expand Down

0 comments on commit 2c75efb

Please sign in to comment.