Skip to content

Instantly share code, notes, and snippets.

View santoshyadavdev's full-sized avatar
🏠
making a difference

Santosh Yadav santoshyadavdev

🏠
making a difference
View GitHub Profile
import {readFileSync} from 'fs';
import {execSync} from 'node:child_process';
import {exec} from 'child_process';
import util from 'util';
export const execAsync = util.promisify(exec);
execSync('npx nx graph --file=workspace-graph.json').toString('utf-8');
@santoshyadavdev
santoshyadavdev / migrate-to-eslint.ts
Last active November 26, 2021 12:53
Migration script from tslint to eslint
import { existsSync } from 'fs'
const execSync = require('child_process').execSync;
const angularJson = require('./angular.json');
const angularProjectsEntries: [
key: string,
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{
path: 'employee',
loadChildren: () => import('./employee/employee.module').then(m => m.EmployeeModule)
},
{
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
declarations: [
AppComponent
import { NgModule } from '@angular/core';
import { OverlayModule } from '@angular/cdk/overlay';
import { CdkTreeModule } from '@angular/cdk/tree';
import { PortalModule } from '@angular/cdk/portal';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatChipsModule } from '@angular/material/chips';
<mat-accordion>
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>
Personal data
</mat-panel-title>
<mat-panel-description>
Type your name and age
</mat-panel-description>
</mat-expansion-panel-header>
<div class="example-container">
<mat-form-field appearance="fill">
<mat-label>Input</mat-label>
<input matInput>
</mat-form-field>
<br>
<mat-form-field appearance="fill">
<mat-label>Select</mat-label>
<mat-select>
<mat-option value="option">Option</mat-option>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { Condfig } from './shared/demo.config';
import { configToken } from './shared/demo.token';
export const configValue: Config = {
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { EmployeeRoutingModule } from './employee-routing.module';
import { EmployeeComponent } from './employee.component';
import { Config } from '../shared/demo.config';
import { configToken } from '../shared/demo.token';
export const configValue: Config = {
apiEndPoint: 'abc.com',
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DepartmentRoutingModule } from './department-routing.module';
import { DepartmentComponent } from './department.component';
import { Config } from '../shared/demo.config';
import { configToken } from '../shared/demo.token';
export const configValue: Config = {
apiEndPoint: 'xyz.com',