-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lock files * angular core and cli update * angular material update * Version bump and test correction * feat: move to nx for 14 Signed-off-by: Jordan Hall <jordan@libertyware.co.uk> Co-authored-by: Raimund S. Utz <raimund.utz@signal-iduna.de> Co-authored-by: Jordan Hall <jordan@libertyware.co.uk>
- Loading branch information
1 parent
7f1d20a
commit dd64664
Showing
10 changed files
with
6,414 additions
and
2,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,6 @@ | |
"defaultConfiguration": "development" | ||
} | ||
} | ||
}}, | ||
"defaultProject": "angular-material-rail-drawer" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* This file decorates the Angular CLI with the Nx CLI to enable features such as computation caching | ||
* and faster execution of tasks. | ||
* | ||
* It does this by: | ||
* | ||
* - Patching the Angular CLI to warn you in case you accidentally use the undecorated ng command. | ||
* - Symlinking the ng to nx command, so all commands run through the Nx CLI | ||
* - Updating the package.json postinstall script to give you control over this script | ||
* | ||
* The Nx CLI decorates the Angular CLI, so the Nx CLI is fully compatible with it. | ||
* Every command you run should work the same when using the Nx CLI, except faster. | ||
* | ||
* Because of symlinking you can still type `ng build/test/lint` in the terminal. The ng command, in this case, | ||
* will point to nx, which will perform optimizations before invoking ng. So the Angular CLI is always invoked. | ||
* The Nx CLI simply does some optimizations before invoking the Angular CLI. | ||
* | ||
* To opt out of this patch: | ||
* - Replace occurrences of nx with ng in your package.json | ||
* - Remove the script from your postinstall script in your package.json | ||
* - Delete and reinstall your node_modules | ||
*/ | ||
|
||
const fs = require('fs'); | ||
const os = require('os'); | ||
const cp = require('child_process'); | ||
const isWindows = os.platform() === 'win32'; | ||
let output; | ||
try { | ||
output = require('@nrwl/workspace').output; | ||
} catch (e) { | ||
console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.'); | ||
process.exit(0); | ||
} | ||
|
||
/** | ||
* Symlink of ng to nx, so you can keep using `ng build/test/lint` and still | ||
* invoke the Nx CLI and get the benefits of computation caching. | ||
*/ | ||
function symlinkNgCLItoNxCLI() { | ||
try { | ||
const ngPath = './node_modules/.bin/ng'; | ||
const nxPath = './node_modules/.bin/nx'; | ||
if (isWindows) { | ||
/** | ||
* This is the most reliable way to create symlink-like behavior on Windows. | ||
* Such that it works in all shells and works with npx. | ||
*/ | ||
['', '.cmd', '.ps1'].forEach(ext => { | ||
if (fs.existsSync(nxPath + ext)) fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext)); | ||
}); | ||
} else { | ||
// If unix-based, symlink | ||
cp.execSync(`ln -sf ./nx ${ngPath}`); | ||
} | ||
} | ||
catch(e) { | ||
output.error({ title: 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e.message }); | ||
throw e; | ||
} | ||
} | ||
|
||
try { | ||
symlinkNgCLItoNxCLI(); | ||
require('nx/src/adapter/decorate-cli').decorateCli(); | ||
output.log({ title: 'Angular CLI has been decorated to enable computation caching.' }); | ||
} catch(e) { | ||
output.error({ title: 'Decoration of the Angular CLI did not complete successfully' }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"affected": { | ||
"defaultBase": "master" | ||
}, | ||
"implicitDependencies": { | ||
"package.json": { | ||
"dependencies": "*", | ||
"devDependencies": "*" | ||
}, | ||
".eslintrc.json": "*" | ||
}, | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "nx/tasks-runners/default", | ||
"options": { | ||
"cacheableOperations": [ | ||
"build", | ||
"lint", | ||
"test", | ||
"e2e" | ||
] | ||
} | ||
} | ||
}, | ||
"targetDefaults": { | ||
"build": { | ||
"dependsOn": [ | ||
"^build" | ||
] | ||
} | ||
}, | ||
"workspaceLayout": { | ||
"appsDir": "projects", | ||
"libsDir": "projects" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"name": "angular-material-rail-drawer", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"homepage": "https://medium.com/@LostDeveloper/angular-material-navigation-drawer-adding-support-mode-rail-mini-variant-behaviour-8f7b107700b3", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Jordan-Hall/angular-material-rail-drawer-plugin" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.0.0" | ||
"tslib": "^2.4.0" | ||
}, | ||
"peerDependencies": { | ||
"@angular/common": ">= 10.0.0 < 14.0.0", | ||
"@angular/core": ">= 10.0.0 < 14.0.0", | ||
"@angular/animations": ">= 10.0.0 < 14.0.0", | ||
"@angular/material": ">= 10.0.0 < 14.0.0", | ||
"@angular/cdk": ">= 10.0.0 < 14.0.0", | ||
"rxjs": ">= 6.0.0" | ||
"@angular/common": ">= 10.0.0 < 15.0.0", | ||
"@angular/core": ">= 10.0.0 < 15.0.0", | ||
"@angular/animations": ">= 10.0.0 < 15.0.0", | ||
"@angular/material": ">= 10.0.0 < 15.0.0", | ||
"@angular/cdk": ">= 10.0.0 < 15.0.0", | ||
"rxjs": ">= 7.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
/* | ||
* Public API Surface of angular-material-rail-drawer | ||
*/ | ||
|
||
export * from './lib/drawer-rail.module'; | ||
export * from './lib/default.config'; | ||
export * from './lib/animations.settings'; | ||
export * from './lib/drawer-rail.directive'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.