Skip to content

Commit

Permalink
chore(imports): don't use alias for core imports (#3968)
Browse files Browse the repository at this point in the history
* for files already in the core module, modify the imports to not import
from `@spinnaker/core`.  rather, favor importing from their `core/` or
relative path.
  • Loading branch information
icfantv authored and anotherchrisberry committed Jul 31, 2017
1 parent dd5f6a6 commit d94104a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IController } from 'angular';

import { bootstrapModule } from './bootstrap.module';
import { OverrideRegistry } from 'core/overrideRegistry';
import { IFeatures, SETTINGS } from '@spinnaker/core';
import { IFeatures, SETTINGS } from 'core/config/settings';

const template = `
<div class="spinnaker-container">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { NgReact } from '@spinnaker/core';
import { NgReact } from 'core/reactShims/ngReact';
import { IPipelineTemplate } from 'core/pipeline/config/templates/pipelineTemplate.service';

import './TemplateDescription.less';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {DeploymentStrategyRegistry} from '@spinnaker/core';
import {DeploymentStrategyRegistry} from 'core/deploymentStrategy/deploymentStrategy.registry';

DeploymentStrategyRegistry.registerStrategy({
label: 'Rolling Red/Black (Experimental)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const angular = require('angular');

import { InstanceTemplates } from '@spinnaker/core';
import {InstanceTemplates} from 'core/instance/templates';

module.exports = angular
.module('spinnaker.core.instance.details.console.link', [
Expand All @@ -19,7 +19,7 @@ module.exports = angular
text: '=?'
},
controllerAs: 'vm',
controller: function($uibModal) {
controller: function ($uibModal) {
this.text = this.text || 'Console Output (Raw)';
this.showConsoleOutput = function () {
$uibModal.open({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IUrlBuilder } from '@spinnaker/core';
import { IUrlBuilder } from './urlBuilder.service';

export class UrlBuilderRegistry {
private builders: { [key: string]: IUrlBuilder} = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { get } from 'lodash';
import { StateParams } from '@uirouter/core';

import { BaseExecutionDetailsCtrl, IExecutionDetailsScope } from '../core/baseExecutionDetails.controller';
import { ExecutionDetailsSectionService, IStage } from '@spinnaker/core';
import { IStage } from 'core/domain/IStage';
import { ExecutionDetailsSectionService } from 'core/delivery/details/executionDetailsSection.service';

export class ScriptExecutionDetailsCtrl extends BaseExecutionDetailsCtrl {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { mock } from 'angular';
import * as React from 'react';
import { mount, ReactWrapper } from 'enzyme';

import { HELP_CONTENTS, HELP_CONTENTS_REGISTRY, REACT_MODULE } from '@spinnaker/core';

import { REACT_MODULE } from 'core/reactShims/react.module';
import { HELP_CONTENTS } from 'core/help/help.contents';
import { HELP_CONTENTS_REGISTRY } from 'core/help/helpContents.registry';
import { PIPELINE_TEMPLATE_MODULE } from './pipelineTemplate.module';
import { Variable } from './Variable';
import { IVariableError, IVariableProps } from './inputs/variableInput.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { IPromise } from 'angular';
import { $q, $log } from 'ngimport';

import { ISearchResult, ISearchResultFormatter, IUrlBuilder, urlBuilderRegistry } from '@spinnaker/core';
import { urlBuilderRegistry } from 'core/navigation/urlBuilder.registry';
import { IUrlBuilder } from 'core/navigation/urlBuilder.service';
import { searchResultFormatterRegistry } from './searchResult/searchResultFormatter.registry';
import { ISearchResult } from './search.service';
import { ISearchResultFormatter } from './searchResult/searchResultFormatter.registry';

/**
* External search registry entries add a section to the infrastructure search
Expand Down

0 comments on commit d94104a

Please sign in to comment.