-
Notifications
You must be signed in to change notification settings - Fork 1.4k
How to configure the seed to resolve all the typings when behind a proxy?
Unable to resolve dependencies "typings install && gulp check.versions && npm prune" Proxy Issue
To fix issue create ".typingsrc" file in angular2-seed project root and set the contents to this;
proxy=YOUR_PROXY
rejectUnauthorized=false
How to integrate with @ngrx?
In project.config.ts set your SYSTEM_CONFIG to:
SYSTEM_CONFIG: any = {
defaultJSExtensions: true,
packageConfigPaths: [
`${this.APP_BASE}node_modules/*/package.json`,
// This is the important line, which hints SystemJS from where to load @ngrx
`${this.APP_BASE}node_modules/@ngrx/store/package.json`
],
paths: {
[this.BOOTSTRAP_MODULE]: `${this.APP_BASE}${this.BOOTSTRAP_MODULE}`,
'angular2/*': `${this.APP_BASE}angular2/*`,
'rxjs/*': `${this.APP_BASE}rxjs/*`,
'*': `${this.APP_BASE}node_modules/*`
},
packages: {
angular2: { defaultExtension: false },
rxjs: { defaultExtension: false }
}
};Update 16-Mar-2017: to get @ngrx/store to load correctly in the current version of the Seed project, the following was sufficient:
let additionalPackages: ExtendPackages[] = [
{ name: '@ngrx/core', path: 'node_modules/@ngrx/core/bundles/core.min.umd.js' },
{ name: '@ngrx/store', path: 'node_modules/@ngrx/store/bundles/store.min.umd.js' }
];
How to get colored output from the gulp tasks in IntelliJ Idea?
Use the --color flag. Here's a sample integration.
How to use constant passed as command-line argument/defined within tools/config inside of my application?
You can take a look at this issue.
How to define environment specific application configuration?
Create the file src/client/app/config/config.ts:
const BASE_CONFIG = {
// ...
};
const ENV_CONFIG['prod'] = {
// ...
};
const ENV_CONFIG['dev'] = {
// ...
};
export const CONFIG = Object.assign(BASE_CONFIG, ENV_CONFIG['<%= ENV %>']);Later you can configure a provider on bootstrap or top-level component level which uses the exported CONFIG object.