Skip to content

Commit

Permalink
add build command; fix make dev for first-time users (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky authored Jul 7, 2022
1 parent 59ac4e3 commit 908f47d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .changeset/wild-pens-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@segment/analytics-next': patch
---

Updated dev instructions in README
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

<img src="https://user-images.githubusercontent.com/2866515/135407053-7561d522-b969-484d-8d3a-6f1c4d9c025b.gif" alt="Example of the development app" width="500px">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions packages/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

<img src="https://user-images.githubusercontent.com/2866515/135407053-7561d522-b969-484d-8d3a-6f1c4d9c025b.gif" alt="Example of the development app" width="500px">
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/qa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 908f47d

Please sign in to comment.