Skip to content

Commit 908f47d

Browse files
authored
add build command; fix make dev for first-time users (#526)
1 parent 59ac4e3 commit 908f47d

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ steps:
102102
- echo "--- Install dependencies"
103103
- yarn install --immutable
104104
- echo "+++ Run tests"
105-
- yarn workspace @segment/analytics-next build:dev
105+
- yarn workspace @segment/analytics-next build
106106
- yarn workspace with-next-js lint
107107
- yarn workspace with-next-js build
108108
plugins:

.changeset/wild-pens-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@segment/analytics-next': patch
3+
---
4+
5+
Updated dev instructions in README

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ $ cd analytics-next
168168
$ yarn dev
169169
```
170170

171+
> 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"
172+
171173
Then, make your changes and test them out in the test app!
172174

173175
<img src="https://user-images.githubusercontent.com/2866515/135407053-7561d522-b969-484d-8d3a-6f1c4d9c025b.gif" alt="Example of the development app" width="500px">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"scripts": {
1313
"test": "echo 'Running all tests...' && yarn workspaces foreach run test",
1414
"lint": "echo 'Linting all workspaces...' && yarn constraints && yarn workspaces foreach -p run lint",
15-
"build:dev": "yarn workspace @segment/analytics-next build:dev",
1615
"dev": "yarn workspace @segment/analytics-next exec make dev",
16+
"build": "yarn workspaces foreach -pt --no-private run build",
1717
"postinstall": "husky install",
1818
"changeset": "changeset",
1919
"update-versions-and-changelogs": "changeset version && yarn version-run-all",

packages/browser/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,6 @@ analyze:
8787
.PHONY: analyze
8888

8989
dev: ## Starts a dev server that is ready for development
90-
$(yarn_run) concurrently "yarn workspace with-next-js dev" "$(yarn_run) pkg -w"
90+
$(yarn_run) pkg --incremental
91+
$(yarn_run) concurrently "sleep 2 && yarn workspace with-next-js dev" "$(yarn_run) pkg -w"
9192
.PHONY: dev

packages/browser/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ $ cd analytics-next
168168
$ yarn dev
169169
```
170170

171+
> 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"
172+
171173
Then, make your changes and test them out in the test app!
172174

173175
<img src="https://user-images.githubusercontent.com/2866515/135407053-7561d522-b969-484d-8d3a-6f1c4d9c025b.gif" alt="Example of the development app" width="500px">

packages/browser/qa/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Analytics-Next contains a comprehensive QA test suite that verifies that E2E fun
55
1. Compile Analytics-Next (browser)
66

77
```sh
8-
$ yarn build:dev
8+
$ yarn build
99
```
1010

1111
2. Grab list of test sources

0 commit comments

Comments
 (0)