Skip to content

Commit

Permalink
Merge pull request #388 from ember-animation/convert-monorepo
Browse files Browse the repository at this point in the history
Convert addon setup to monorepo
  • Loading branch information
SergeAstapov authored Mar 2, 2022
2 parents 23e72bf + caadd78 commit 511cd9b
Show file tree
Hide file tree
Showing 233 changed files with 16,785 additions and 26,613 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

10 changes: 9 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/docs/"
directory: "/addon/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/docs/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/test-app/"
schedule:
interval: "weekly"
72 changes: 49 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,58 +18,74 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 6.32.1
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
cache: 'pnpm'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm install --frozen-lockfile
- name: Lint Addon
run: pnpm run lint
working-directory: addon
- name: Lint Test App
run: pnpm run lint
working-directory: test-app
- name: Run Tests
run: yarn test:ember
run: pnpm run test:ember
working-directory: test-app

test-library-floating:
name: "Library - Floating Dependencies"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 6.32.1
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
cache: 'pnpm'
# pnpm does not have --no-lockfile option
- name: Remove lock file
shell: bash
run: rm pnpm-lock.yaml
- name: Install Dependencies
run: yarn install --no-lockfile
run: pnpm install
- name: Run Tests
run: yarn test:ember
run: pnpm run test:ember
working-directory: test-app

test-docs:
name: "Docs"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 6.32.1
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
# Disable yarn cache as it cause issues in CI due to double install.
# cache: yarn
- name: Install Library Dependencies
run: yarn --production --frozen-lockfile
- name: Install Docs Dependencies
# Absurdly, yarn always fails on the first try here.
# https://github.com/yarnpkg/yarn/issues/2629
run: until yarn install --frozen-lockfile; do echo "Retrying yarn"; done
working-directory: docs
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm run lint
working-directory: docs
- name: Run Tests
run: yarn test:ember
run: pnpm run test:ember
working-directory: docs

try-scenarios:
Expand All @@ -95,15 +111,20 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 6.32.1
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
cache: 'pnpm'
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: test-app

typescript-compatibility:
if: ${{ false }} # disable for now
Expand All @@ -123,12 +144,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 6.32.1
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
cache: 'pnpm'
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Type checking
run: ./node_modules/.bin/ember try:one --config-path="./config/ember-try-typescript.js" ${{ matrix.typescript-scenario }}
working-directory: test-app
33 changes: 5 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# you definitely want this:
node_modules

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
# and you can put in anything else that tends to accumulate in your environment:
yarn-error.log
.DS_Store
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{
"type": "node",
"request": "launch",
"name": "Launch Dummy App",
"name": "Launch Test App",
"program": "${workspaceRoot}/node_modules/ember-cli/bin/ember",
"cwd": "${workspaceRoot}",
"cwd": "${workspaceRoot}/test-app",
"args": [
"serve"
]
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
],
"eslint.workingDirectories": [
".",
"docs"
"addon",
"docs",
"test-app"
],
"[javascript]": {
"editor.formatOnSave": true
Expand Down
26 changes: 17 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# How To Contribute

This repo is divided into multiple packages using Yarn workspaces:

- `addon` is the actual ember-page-title addon
- `test-app` is its test suite
- `docs` is the documentation/marketing site


## Installation

* `git clone https://github.com/ember-animation/ember-animated.git`
Expand All @@ -8,26 +15,27 @@

## Linting

Inside any of the packages you can run:

* `yarn lint`
* `yarn lint:fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions
* `cd test-app && ember test` – Runs the test suite on the current Ember version
* `cd test-app && ember test --server` – Runs the test suite in "watch mode"
* `cd test-app & ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application
## Running the test application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
* `cd test-app && ember serve`
* Visit the test application at [http://localhost:4200](http://localhost:4200).

## Running the documentation application

The docs are in a standalone app in the /docs subdirectory.

* `cd docs`
* `yarn install` (this is needed separately from the `yarn install` in the addon itself)
* `ember s`
* `cd docs && ember serve`
* Visit the docs application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
60 changes: 60 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Release Process

Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).

## Preparation

Since the majority of the actual release process is automated, the primary
remaining task prior to releasing is confirming that all pull requests that
have been merged since the last release have been labeled with the appropriate
`lerna-changelog` labels and the titles have been updated to ensure they
represent something that would make sense to our users. Some great information
on why this is important can be found at
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
changelog/release notes.

## Release

Once the prep work is completed, the actual release is straight forward:

* First, ensure that you have installed your projects dependencies:

```sh
yarn install
```

* Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.

For instance:

```bash
export GITHUB_AUTH=abc123def456
```

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable

* And last (but not least 😁) do your release.

```sh
npx release-it
```

[release-it](https://github.com/release-it/release-it/) manages the actual
release process. It will prompt you to choose the version number after which
you will have the chance to hand tweak the changelog to be used (for the
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
pushing the tag and commits, etc.
13 changes: 13 additions & 0 deletions addon/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache
Loading

0 comments on commit 511cd9b

Please sign in to comment.