refactor(angular): move to packages directory (#27719)

Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The `angular` directory sits at the root of the project instead of in
`packages` with all the other JS Framework integrations. This does not
cause any functional issues with Ionic, but it is confusing since
integrations are not in a consistent place.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Moves the `angular` directory to `packages/angular`

Note: Most files should remain unchanged. The only files I changed are
the files that had direct paths to the old `angular` directory:

1. Removes the `angular` path in `lerna.json`. This is now covered by
`packages/*`
2. Updated the angular file path in `.gitignore`
3. Updates the path to the angular package in `stencil.config.ts` for
the Angular Output Targets
4. Updates some of Angular's sync scripts to correctly get the core
stylesheets as well as the core package.
5. Updates the test app sync script to correctly sync core and
angular-server

~I'm not entirely sure why GitHub thinks
https://github.com/ionic-team/ionic-framework/pull/27719/files#diff-f5bba7e7c7c75426e2b9c89868310cb03890493b4efe0252adf8d12cc8398962
is a new file since it exists in `main` here:
1f06be4a31/angular/test/base/scripts/build-ionic.sh~
Fixed in
6e7fc49827

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build: `7.1.2-dev.11688052109.13454f5c`
This commit is contained in:
Liam DeBeasi
2023-07-05 13:52:35 -04:00
committed by GitHub
parent e5ab6d8804
commit 32bc33ed28
268 changed files with 29 additions and 30 deletions

4
.github/CODEOWNERS vendored
View File

@ -15,9 +15,9 @@
## Angular ## Angular
/angular/ @sean-perkins /packages/angular/ @sean-perkins
/packages/angular-server @sean-perkins /packages/angular-server @sean-perkins
/angular/test /packages/angular/test
## React ## React

View File

@ -295,7 +295,7 @@ See [Ionic's E2E testing guide](../core/src/utils/test/playwright/docs/README.md
#### Modifying Files #### Modifying Files
1. Locate the files inside the relevant root directory: 1. Locate the files inside the relevant root directory:
- Angular: [`/angular/src`](/angular/src) - Angular: [`/packages/angular/src`](/packages/angular/src)
- React: [`/packages/react/src`](/packages/react/src) - React: [`/packages/react/src`](/packages/react/src)
- Vue: [`/packages/vue/src`](/packages/vue/src) - Vue: [`/packages/vue/src`](/packages/vue/src)
2. Make your changes to the files. If the change is overly complex or out of the ordinary, add comments so we can understand the changes. 2. Make your changes to the files. If the change is overly complex or out of the ordinary, add comments so we can understand the changes.
@ -311,7 +311,7 @@ See [Ionic's E2E testing guide](../core/src/utils/test/playwright/docs/README.md
##### Previewing in this repository ##### Previewing in this repository
Follow the steps in the test directory for each framework: Follow the steps in the test directory for each framework:
- Angular: [`/angular/test`](/angular/test/README.md) - Angular: [`/packages/angular/test`](/packages/angular/test/README.md)
- React: [`/packages/react/test`](/packages/react/test/README.md) - React: [`/packages/react/test`](/packages/react/test/README.md)
- Vue: [`/packages/vue/test`](/packages/vue/test/README.md) - Vue: [`/packages/vue/test`](/packages/vue/test/README.md)
@ -322,7 +322,7 @@ Follow the steps to [preview changes in core](#preview-changes).
#### Lint Changes #### Lint Changes
1. Run `npm run lint` to lint the TypeScript in the relevant directory: 1. Run `npm run lint` to lint the TypeScript in the relevant directory:
- Angular: [`/angular/src`](/angular/src) - Angular: [`/packages/angular/src`](/packages/angular/src)
- React: [`/packages/react/src`](/packages/react/src) - React: [`/packages/react/src`](/packages/react/src)
- Vue: [`/packages/vue/src`](/packages/vue/src) - Vue: [`/packages/vue/src`](/packages/vue/src)
2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not. 2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
@ -330,7 +330,7 @@ Follow the steps to [preview changes in core](#preview-changes).
#### Modifying Tests #### Modifying Tests
1. Locate the e2e test to modify inside the relevant test app directory: 1. Locate the e2e test to modify inside the relevant test app directory:
- Angular: [`/angular/test/base/e2e/src`](/angular/test/base/e2e/src) - Angular: [`/packages/angular/test/base/e2e/src`](/packages/angular/test/base/e2e/src)
- React: [`/packages/react/test/base/tests/e2e/specs`](/packages/react/test/base/tests/e2e/specs) - React: [`/packages/react/test/base/tests/e2e/specs`](/packages/react/test/base/tests/e2e/specs)
- Vue: [`/packages/vue/test/base/tests/e2e/specs`](/packages/vue/test/base/tests/e2e/specs) - Vue: [`/packages/vue/test/base/tests/e2e/specs`](/packages/vue/test/base/tests/e2e/specs)
2. If a test exists, modify the test by adding an example to reproduce the problem fixed or feature added. 2. If a test exists, modify the test by adding an example to reproduce the problem fixed or feature added.

2
.github/labeler.yml vendored
View File

@ -9,7 +9,7 @@
- core/**/* - core/**/*
'package: angular': 'package: angular':
- angular/**/* - packages/angular/**/*
- packages/angular-*/**/* - packages/angular-*/**/*
'package: react': 'package: react':

View File

@ -14,25 +14,25 @@ runs:
- name: Install Angular Dependencies - name: Install Angular Dependencies
run: npm ci run: npm ci
shell: bash shell: bash
working-directory: ./angular working-directory: ./packages/angular
- name: Sync - name: Sync
run: npm run sync run: npm run sync
shell: bash shell: bash
working-directory: ./angular working-directory: ./packages/angular
- name: Lint - name: Lint
run: npm run lint run: npm run lint
shell: bash shell: bash
working-directory: ./angular working-directory: ./packages/angular
- name: Build - name: Build
run: npm run build run: npm run build
shell: bash shell: bash
working-directory: ./angular working-directory: ./packages/angular
- name: Check Diff - name: Check Diff
run: git diff --exit-code run: git diff --exit-code
shell: bash shell: bash
working-directory: ./angular working-directory: ./packages/angular
- uses: ./.github/workflows/actions/upload-archive - uses: ./.github/workflows/actions/upload-archive
with: with:
name: ionic-angular name: ionic-angular
output: ./angular/AngularBuild.zip output: ./packages/angular/AngularBuild.zip
paths: ./angular/dist paths: ./packages/angular/dist

View File

@ -27,16 +27,16 @@ runs:
- name: Create Test App - name: Create Test App
run: ./build.sh ${{ inputs.app }} run: ./build.sh ${{ inputs.app }}
shell: bash shell: bash
working-directory: ./angular/test working-directory: ./packages/angular/test
- name: Install Dependencies - name: Install Dependencies
run: npm install run: npm install
shell: bash shell: bash
working-directory: ./angular/test/build/${{ inputs.app }} working-directory: ./packages/angular/test/build/${{ inputs.app }}
- name: Sync Built Changes - name: Sync Built Changes
run: npm run sync run: npm run sync
shell: bash shell: bash
working-directory: ./angular/test/build/${{ inputs.app }} working-directory: ./packages/angular/test/build/${{ inputs.app }}
- name: Run Tests - name: Run Tests
run: npm run test run: npm run test
shell: bash shell: bash
working-directory: ./angular/test/build/${{ inputs.app }} working-directory: ./packages/angular/test/build/${{ inputs.app }}

View File

@ -81,15 +81,15 @@ jobs:
tag: ${{ inputs.tag }} tag: ${{ inputs.tag }}
version: ${{ inputs.version }} version: ${{ inputs.version }}
preid: ${{ inputs.preid }} preid: ${{ inputs.preid }}
working-directory: 'angular' working-directory: 'packages/angular'
folder: './dist' folder: './dist'
token: ${{ secrets.NPM_TOKEN }} token: ${{ secrets.NPM_TOKEN }}
- name: Cache Built @ionic/angular - name: Cache Built @ionic/angular
uses: ./.github/workflows/actions/upload-archive uses: ./.github/workflows/actions/upload-archive
with: with:
name: ionic-angular name: ionic-angular
output: ./angular/AngularBuild.zip output: packages/angular/AngularBuild.zip
paths: ./angular/dist paths: packages/angular/dist
release-react: release-react:
needs: [release-core] needs: [release-core]

4
.gitignore vendored
View File

@ -71,8 +71,8 @@ core/playwright-report/
core/**/*-snapshots core/**/*-snapshots
# angular # angular
angular/css/ packages/angular/css/
angular/test/build/ packages/angular/test/build/
.angular/ .angular/
# vue # vue

View File

@ -184,8 +184,8 @@ export const config: Config = {
// }, // },
angularOutputTarget({ angularOutputTarget({
componentCorePackage: '@ionic/core', componentCorePackage: '@ionic/core',
directivesProxyFile: '../angular/src/directives/proxies.ts', directivesProxyFile: '../packages/angular/src/directives/proxies.ts',
directivesArrayFile: '../angular/src/directives/proxies-list.ts', directivesArrayFile: '../packages/angular/src/directives/proxies-list.ts',
excludeComponents: [ excludeComponents: [
// overlays that accept user components // overlays that accept user components
'ion-modal', 'ion-modal',

View File

@ -2,7 +2,6 @@
"packages": [ "packages": [
"core", "core",
"docs", "docs",
"angular",
"packages/*" "packages/*"
], ],
"version": "7.1.1" "version": "7.1.1"

View File

@ -5,7 +5,7 @@ const spawn = require('child_process').spawn;
const typescriptPath = path.join(__dirname, '..', 'node_modules', '.bin'); const typescriptPath = path.join(__dirname, '..', 'node_modules', '.bin');
function copyCSS() { function copyCSS() {
const src = path.join(__dirname, '..', '..', 'core', 'css'); const src = path.join(__dirname, '..', '..', '..', 'core', 'css');
const dst = path.join(__dirname, '..','dist', 'css'); const dst = path.join(__dirname, '..','dist', 'css');
fs.removeSync(dst); fs.removeSync(dst);

View File

@ -6,7 +6,7 @@ set -e
rm -f *.tgz rm -f *.tgz
# Pack @ionic/core # Pack @ionic/core
npm pack ../core npm pack ../../core
# Install Dependencies # Install Dependencies
npm install *.tgz --no-save npm install *.tgz --no-save

Some files were not shown because too many files have changed in this diff Show More