From 908f47d187c8dd45c4cff79c0f06800173ab7cb0 Mon Sep 17 00:00:00 2001
From: Seth Silesky <5115498+silesky@users.noreply.github.com>
Date: Thu, 7 Jul 2022 14:55:03 -0500
Subject: [PATCH] add build command; fix make dev for first-time users (#526)
---
.buildkite/pipeline.yml | 2 +-
.changeset/wild-pens-fix.md | 5 +++++
README.md | 2 ++
package.json | 2 +-
packages/browser/Makefile | 3 ++-
packages/browser/README.md | 2 ++
packages/browser/qa/README.md | 2 +-
7 files changed, 14 insertions(+), 4 deletions(-)
create mode 100644 .changeset/wild-pens-fix.md
diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml
index f8537e2a1..50f36be49 100644
--- a/.buildkite/pipeline.yml
+++ b/.buildkite/pipeline.yml
@@ -102,7 +102,7 @@ steps:
- echo "--- Install dependencies"
- yarn install --immutable
- echo "+++ Run tests"
- - yarn workspace @segment/analytics-next build:dev
+ - yarn workspace @segment/analytics-next build
- yarn workspace with-next-js lint
- yarn workspace with-next-js build
plugins:
diff --git a/.changeset/wild-pens-fix.md b/.changeset/wild-pens-fix.md
new file mode 100644
index 000000000..a3871fc68
--- /dev/null
+++ b/.changeset/wild-pens-fix.md
@@ -0,0 +1,5 @@
+---
+'@segment/analytics-next': patch
+---
+
+Updated dev instructions in README
diff --git a/README.md b/README.md
index 603a0d04a..030b1c157 100644
--- a/README.md
+++ b/README.md
@@ -168,6 +168,8 @@ $ cd analytics-next
$ yarn dev
```
+> If you get "Cannot find module '@segment/analytics-next' or its corresponding type declarations.ts(2307)" (in VSCode), you may have to "cmd+shift+p -> "TypeScript: Restart TS server"
+
Then, make your changes and test them out in the test app!
diff --git a/package.json b/package.json
index 354e84af2..24c0103e6 100644
--- a/package.json
+++ b/package.json
@@ -12,8 +12,8 @@
"scripts": {
"test": "echo 'Running all tests...' && yarn workspaces foreach run test",
"lint": "echo 'Linting all workspaces...' && yarn constraints && yarn workspaces foreach -p run lint",
- "build:dev": "yarn workspace @segment/analytics-next build:dev",
"dev": "yarn workspace @segment/analytics-next exec make dev",
+ "build": "yarn workspaces foreach -pt --no-private run build",
"postinstall": "husky install",
"changeset": "changeset",
"update-versions-and-changelogs": "changeset version && yarn version-run-all",
diff --git a/packages/browser/Makefile b/packages/browser/Makefile
index 837fc23db..015b26d98 100644
--- a/packages/browser/Makefile
+++ b/packages/browser/Makefile
@@ -87,5 +87,6 @@ analyze:
.PHONY: analyze
dev: ## Starts a dev server that is ready for development
- $(yarn_run) concurrently "yarn workspace with-next-js dev" "$(yarn_run) pkg -w"
+ $(yarn_run) pkg --incremental
+ $(yarn_run) concurrently "sleep 2 && yarn workspace with-next-js dev" "$(yarn_run) pkg -w"
.PHONY: dev
diff --git a/packages/browser/README.md b/packages/browser/README.md
index 603a0d04a..030b1c157 100644
--- a/packages/browser/README.md
+++ b/packages/browser/README.md
@@ -168,6 +168,8 @@ $ cd analytics-next
$ yarn dev
```
+> If you get "Cannot find module '@segment/analytics-next' or its corresponding type declarations.ts(2307)" (in VSCode), you may have to "cmd+shift+p -> "TypeScript: Restart TS server"
+
Then, make your changes and test them out in the test app!
diff --git a/packages/browser/qa/README.md b/packages/browser/qa/README.md
index fb8acc1dc..837a9f6e2 100644
--- a/packages/browser/qa/README.md
+++ b/packages/browser/qa/README.md
@@ -5,7 +5,7 @@ Analytics-Next contains a comprehensive QA test suite that verifies that E2E fun
1. Compile Analytics-Next (browser)
```sh
-$ yarn build:dev
+$ yarn build
```
2. Grab list of test sources