This file contains hidden or 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
import { CustomWebpackBrowserSchema, TargetOptions } from '@angular-builders/custom-webpack'; | |
import * as webpack from 'webpack'; | |
export default ( | |
config: webpack.Configuration, | |
options: CustomWebpackBrowserSchema, | |
targetOptions: TargetOptions | |
) => { | |
config.plugins.push( | |
new webpack.DefinePlugin({ |
This file contains hidden or 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
declare global { | |
/** | |
* @description | |
* Global commandline environment variables available to | |
* devserver build at runtime | |
* | |
*/ | |
export const APP_ENV: { | |
/** | |
* @description |
This file contains hidden or 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
import { enableProdMode } from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
import '../tools/build/app-env'; // <- Import the app environment schema into our application bundle | |
if (environment.production) { | |
enableProdMode(); |
This file contains hidden or 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
{ | |
"architect": { | |
"build": { | |
"builder": "@angular-builders/custom-webpack:browser", // <- Change builder to Custom Webpack | |
"options": { | |
"customWebpackConfig": { | |
"path": "webpack.config.ts" | |
}, | |
//... | |
}, |
This file contains hidden or 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
# | |
# Run 'nvm use' automatically every time there's | |
# a .nvmrc file in the directory. Also, revert to default | |
# version when entering a directory without .nvmrc | |
# | |
enter_directory() { | |
if [[ $PWD == $PREV_PWD ]]; then | |
return | |
fi | |
PREV_PWD=$PWD |
This file contains hidden or 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
# | |
# Run 'nvm use' automatically every time there's | |
# a .nvmrc file in the directory. Also, revert to default | |
# version when entering a directory without .nvmrc | |
# | |
nvm_autouse() { | |
# if [[ $PWD == $PREV_PWD ]]; then | |
# return | |
# fi |
This file contains hidden or 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
{ | |
"extends": "./tsconfig.build.json", | |
... | |
} |
This file contains hidden or 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
import { Action, ActionReducer } from '@ngrx/store'; | |
export const concatReducers = <T, V extends Action = Action>(...reducers: Array<ActionReducer<T>>) => ( | |
state: T | undefined, | |
action: Action, | |
): T => reducers.reduce((accumulatedState, reducer) => reducer(accumulatedState, action), state); | |
export const concatReducerFactories = <T, V extends Action = Action>( | |
...reducerFactories: Array<(state: T | undefined, action: Action) => T> | |
) => (state: T | undefined, action: Action): T => |
This file contains hidden or 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
export const MODULE_STATE_KEY = 'router'; | |
export const initialState: RouterReducerState<RouterStoreState> = { | |
state: { url: '' }, | |
navigationId: 0, | |
}; | |
export const customRouterStoreReducer = createReducer( | |
initialState, |
This file contains hidden or 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
#!/bin/sh | |
# | |
# Inspects branch name and checks if it contains a Jira ticket number (i.e. ABC-123). | |
# If yes, commit message will be automatically prepended with [ABC-123]. | |
# | |
# Useful for looking through git history and relating a commit or group of commits | |
# back to a user story. | |
# |