From 2f15ef883d66460b621dee20986f5c8121ac42b1 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Mon, 1 Feb 2021 02:24:22 -0800 Subject: [PATCH] Improve OSS plugin template Summary: Based https://github.com/facebook/flipper/issues/1866 and running `npx flipper-plugin init` locally. Doesn't address the original issue Fixes #1866 Reviewed By: passy Differential Revision: D26147089 fbshipit-source-id: 608dc92c5ccc741b6e760ea5a5034f9444e951b7 --- desktop/pkg/src/__tests__/runInit.node.ts | 6 ++++-- desktop/pkg/templates/plugin/package.json.template | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/desktop/pkg/src/__tests__/runInit.node.ts b/desktop/pkg/src/__tests__/runInit.node.ts index 660400a56..3ce8533ce 100644 --- a/desktop/pkg/src/__tests__/runInit.node.ts +++ b/desktop/pkg/src/__tests__/runInit.node.ts @@ -70,7 +70,7 @@ test('It generates the correct files', async () => { \\"prepack\\": \\"flipper-pkg lint && flipper-pkg bundle\\", \\"build\\": \\"flipper-pkg bundle\\", \\"watch\\": \\"flipper-pkg bundle --watch\\", - \\"test\\": \\"jest\\" + \\"test\\": \\"jest --no-watchman\\" }, \\"peerDependencies\\": { \\"flipper\\": \\"latest\\", @@ -80,6 +80,7 @@ test('It generates the correct files', async () => { \\"devDependencies\\": { \\"@babel/preset-react\\": \\"latest\\", \\"@babel/preset-typescript\\": \\"latest\\", + \\"@testing-library/react\\": \\"latest\\", \\"@types/jest\\": \\"latest\\", \\"@types/react\\": \\"latest\\", \\"@types/react-dom\\": \\"latest\\", @@ -87,7 +88,8 @@ test('It generates the correct files', async () => { \\"flipper\\": \\"latest\\", \\"flipper-plugin\\": \\"latest\\", \\"flipper-pkg\\": \\"latest\\", - \\"jest\\": \\"latest\\" + \\"jest\\": \\"latest\\", + \\"typescript\\": \\"latest\\" } } ", diff --git a/desktop/pkg/templates/plugin/package.json.template b/desktop/pkg/templates/plugin/package.json.template index 799c45143..c81fc8910 100644 --- a/desktop/pkg/templates/plugin/package.json.template +++ b/desktop/pkg/templates/plugin/package.json.template @@ -16,7 +16,7 @@ "prepack": "flipper-pkg lint && flipper-pkg bundle", "build": "flipper-pkg bundle", "watch": "flipper-pkg bundle --watch", - "test": "jest" + "test": "jest --no-watchman" }, "peerDependencies": { "flipper": "latest", @@ -26,6 +26,7 @@ "devDependencies": { "@babel/preset-react": "latest", "@babel/preset-typescript": "latest", + "@testing-library/react": "latest", "@types/jest": "latest", "@types/react": "latest", "@types/react-dom": "latest", @@ -33,6 +34,7 @@ "flipper": "latest", "flipper-plugin": "latest", "flipper-pkg": "latest", - "jest": "latest" + "jest": "latest", + "typescript": "latest" } }