Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
fix: removed unused env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
edewit authored and ia3andy committed Jul 5, 2018
1 parent fe21c9d commit c7ce9b8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
14 changes: 0 additions & 14 deletions config/webpack.demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ const path = require('path');
* Webpack Constants
*/

const OSIO_AUTH_TOKEN = process.env.OSIO_AUTH_TOKEN;
const STACK_API_TOKEN = process.env.STACK_API_TOKEN;

const ANALYTICS_RECOMMENDER_URL = process.env.ANALYTICS_RECOMMENDER_URL;
const ANALYTICS_LICENSE_URL = process.env.ANALYTICS_LICENSE_URL;

const METADATA = {
OSIO_AUTH_TOKEN: OSIO_AUTH_TOKEN,
STACK_API_TOKEN: STACK_API_TOKEN,
ANALYTICS_RECOMMENDER_URL: ANALYTICS_RECOMMENDER_URL,
ANALYTICS_LICENSE_URL: ANALYTICS_LICENSE_URL
};

/**
* Webpack Plugins
Expand All @@ -27,7 +15,6 @@ const AotPlugin = require('@ngtools/webpack').AotPlugin; // Angular 4
const CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
const CopyWebpackPlugin = require('copy-webpack-plugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const EnvironmentPlugin = require('webpack/lib/EnvironmentPlugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const IgnorePlugin = require('webpack/lib/IgnorePlugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand Down Expand Up @@ -171,7 +158,6 @@ module.exports = {
},

plugins: [
new webpack.EnvironmentPlugin(METADATA),
extractCSS,
/*
* Plugin: CommonsChunkPlugin
Expand Down
8 changes: 0 additions & 8 deletions config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,15 @@ const HOST = process.env.HOST || 'localhost';
const PORT = process.env.PORT || 3000;
const HMR = helpers.hasProcessFlag('hot');
// if env is 'inmemory', the inmemory debug resource is used
const API_URL = process.env.API_URL || (ENV==='inmemory'?'app/':'http://localhost:8080/api/');
const STACK_API_URL = process.env.STACK_API_URL || 'http://api-bayesian.dev.rdu2c.fabric8.io/api/v1/';
const FORGE_URL = process.env.FORGE_URL || 'http://localhost:8080/forge';
const PUBLIC_PATH = process.env.PUBLIC_PATH || '/';
const OSIO_AUTH_TOKEN = process.env.OSIO_AUTH_TOKEN || '';


const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, {
host: HOST,
port: PORT,
ENV: ENV,
HMR: HMR,
API_URL: API_URL,
STACK_API_URL: STACK_API_URL,
FORGE_URL: FORGE_URL,
PUBLIC_PATH: PUBLIC_PATH,
OSIO_AUTH_TOKEN: OSIO_AUTH_TOKEN
});

/**
Expand Down
2 changes: 1 addition & 1 deletion src/demo/shared/mock-auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';
@Injectable()
export class MockAuthenticationService {
getToken(): string | Promise<string> {
return process.env['OSIO_AUTH_TOKEN'] || '';
return '';
}

isPromise(token: string| Promise<string>): token is Promise<string> {
Expand Down

0 comments on commit c7ce9b8

Please sign in to comment.