Skip to content

Add missing concurrently and swap to pnpm #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,42 @@ jobs:
git config --global user.email "tomster@emberjs.com"
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies (apt-get)
run: |
sudo apt-get update -y
sudo apt-get install -y tree
- name: Install dependencies (yarn)
- name: Install dependencies (pnpm)
run: |
if [[ "$EMBER_RELEASE_CHANNEL" == "beta" ]]; then
yarn upgrade ember-cli@beta
pnpm upgrade ember-cli@beta
else
yarn upgrade ember-cli
pnpm upgrade ember-cli
fi

yarn install
pnpm install
env:
EMBER_RELEASE_CHANNEL: ${{ matrix.channel }}
- name: Lint (markdown source)
run: yarn lint:md:src
run: pnpm lint:md:src
- name: Lint (typescript)
run: yarn lint:ts
run: pnpm lint:ts
- name: Compile (typescript)
run: yarn tsc
run: pnpm tsc
- name: Generate
run: yarn generate
run: pnpm generate
env:
# This is needed for external PRs to build, since secrets are not
# available there. Get your own Mapbox token for local development
# at: https://account.mapbox.com/access-tokens
MAPBOX_ACCESS_TOKEN: 'pk.eyJ1IjoiZW1iZXJqcyIsImEiOiJjazBydnZjb2wwYXA5M2Rwc3IydGF2eXM0In0.EQiBFsRi9Jm70XFPiXnoHg'
- name: Lint (markdown output)
run: yarn lint:md:dist
run: pnpm lint:md:dist
- name: Prune artifacts
if: always()
working-directory: dist/code/super-rentals
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ The workflow for updating the Super Rentals Tutorial involves working within two

Once you have made your changes in the tutorial prose or code, you can run a few different commands to verify that your changes render as expected.

* To regenerate all of the chapters (and rebuild the app), run `yarn build`. This will `rm -rf` anything previously generated in the `/dist` directory.
* To generate a single chapter without removing all the previously generated content, run `yarn generate src/markdown/07-your-chapter-to-edit-here.md`. This will rebuild _just_ the chapter that is specified without deleting everything else in the `/dist` directory. Please note that, before running this command, the _current state_ of the `/dist/code` directory has to match the precise state of what it would be after running the generate command on the previous chapter. In other words, in order for the generate command to work correctly, the state of the code in `/dist/code` should match exactly the code that would be generated by `yarn generate src/markdown/06-the-previous-chapter.md` before it is run for `src/markdown/07-your-chapter-to-edit-here.md` .
* To regenerate all of the chapters (and rebuild the app), run `pnpm build`. This will `rm -rf` anything previously generated in the `/dist` directory.
* To generate a single chapter without removing all the previously generated content, run `pnpm generate src/markdown/07-your-chapter-to-edit-here.md`. This will rebuild _just_ the chapter that is specified without deleting everything else in the `/dist` directory. Please note that, before running this command, the _current state_ of the `/dist/code` directory has to match the precise state of what it would be after running the generate command on the previous chapter. In other words, in order for the generate command to work correctly, the state of the code in `/dist/code` should match exactly the code that would be generated by `pnpm generate src/markdown/06-the-previous-chapter.md` before it is run for `src/markdown/07-your-chapter-to-edit-here.md` .

### Code changes

Expand Down Expand Up @@ -82,7 +82,7 @@ When running commands, generating new files, or making changes to preexisting on
For example:

```run:pause
Note to self: check that `application.hbs` has the correct markup and remember to git add it!
Note to self: check that \`application.hbs\` has the correct markup and remember to git add it!
```

Any content inside of the code blocks will be printed in your command line.
Expand Down Expand Up @@ -133,7 +133,7 @@ In both cases, be sure your editor is not set to trim trailing whitespace on lin
Once you have added the diff to the prose using the `run:file:patch` command, you can remove the `run:pause` command. In order to test that your patch was successfully applied, be sure to:

1. Run `git checkout` any changes in the working directory of `/dist/code/super-rentals/code`.
2. Regenerate your modified chapter (`yarn generate src/markdown/00-your-chapter-to-edit-here.md`).
2. Regenerate your modified chapter (`pnpm generate src/markdown/00-your-chapter-to-edit-here.md`).

Finally, you can look at your modified chapter in `/dist/markdown` and make sure that your patch renders as you expect in the markdown!

Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"chalk": "^2.4.2",
"ember-cli": "*",
"ember-dictionary": "^0.2.3",
"glob": "^8.0.3",
"image-size": "^1.0.2",
"mkdirp": "^1.0.4",
"ncp": "^2.0.0",
Expand Down Expand Up @@ -48,21 +49,22 @@
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "^4.9.4",
"unified": "^8.4.0"
"unified": "^8.4.0",
"vfile": "^4.0.3"
},
"scripts": {
"clean": "shx rm -rf dist",
"lint": "yarn lint:ts && yarn lint:md",
"lint": "pnpm lint:ts && pnpm lint:md",
"lint:ts": "tslint --project .",
"lint:md": "remark . --frail",
"lint:md:src": "yarn lint:md --ignore-pattern dist",
"lint:md:dist": "yarn lint:md --ignore-pattern src",
"precompile": "yarn lint:ts",
"lint:md:src": "pnpm lint:md --ignore-pattern dist",
"lint:md:dist": "pnpm lint:md --ignore-pattern src",
"precompile": "pnpm lint:ts",
"compile": "tsc",
"generate": "node ./dist/bin/generate.js",
"prebuild": "yarn clean && yarn compile && yarn lint:md:src",
"build": "yarn generate",
"postbuild": "yarn lint:md:dist"
"prebuild": "pnpm clean && pnpm compile && pnpm lint:md:src",
"build": "pnpm generate",
"postbuild": "pnpm lint:md:dist"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184"
}
Loading
Loading