Skip to content

feat(schematics): ng add ui-platform#23

Open
richavyas wants to merge 16 commits into
developfrom
feature/schematics-ng-add
Open

feat(schematics): ng add ui-platform#23
richavyas wants to merge 16 commits into
developfrom
feature/schematics-ng-add

Conversation

@richavyas
Copy link
Copy Markdown
Contributor

@richavyas richavyas commented Dec 4, 2019

Description

This PR takes care of adding the capability of ng-add schematics to ui-platform so that user can start adding ui-platform to their project with a single command.

ng add @td-vantage/ui-platform

closes #7

ui-platform-schematics

Prerequisites:
Adding covalent is a prerequisite for adding ui-platform. Since covalent schematics is not released yet, incorporating ng add @covalent/core as part of ui-platform's ng-add schematics isn't possible atm. This would be a future enhancement.

What's included?

  • ng-add(Proposed command for publishing ng add @td-vantage/ui-platform)
    • this schematic will take care of adding ui-platform to a project and SSO optionally

###Test Steps

  • Navigate to scripts directory
  • Run ./precommit-schematics.sh : this is the script to test this entire feature locally

@@ -0,0 +1,21 @@
# Run test and linter
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not have pre-commit in the name. Also, where is this used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the test step says, it's a temp script which is added for testing this entire feature locally. so you just have to run the script for testing it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove precommit from the name

Copy link
Copy Markdown
Contributor

@christianmemije christianmemije left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests failing.

Started
.F...

Failures:
1) ng-add schematic should create proxy.conf.js when sso option is selected by user
  Message:
    Expected false to be true.
  Stack:
    Error: Expected false to be true.
        at Object.<anonymous> (/Users/cm250080/repos/teradata/vantage-ui-platform/src/lib/schematics/ng-add/index.spec.js:37:46)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/cm250080/repos/teradata/vantage-ui-platform/node_modules/tslib/tslib.js:107:62)
        at processTicksAndRejections (internal/process/task_queues.js:86:5)
  Message:
    Failed: The file (proxy.conf.js) does not exist.
  Stack:
    Error: The file (proxy.conf.js) does not exist.
        at Object.getFileContent (/Users/cm250080/repos/teradata/vantage-ui-platform/node_modules/@schematics/angular/utility/test/get-file-content.js:6:15)
        at Object.<anonymous> (/Users/cm250080/repos/teradata/vantage-ui-platform/src/lib/schematics/ng-add/index.spec.js:38:36)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/cm250080/repos/teradata/vantage-ui-platform/node_modules/tslib/tslib.js:107:62)
        at processTicksAndRejections (internal/process/task_queues.js:86:5)

5 specs, 1 failure
Finished in 3.396 seconds

/* Vantage and local development environments */
/* * * * * * * * * * * */

const serverUrl = 'https://vantage.url.io'; // REPLACE WITH VANTAGE BASE URL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be interpolated with the ssoServerURL options?

Suggested change
const serverUrl = 'https://vantage.url.io'; // REPLACE WITH VANTAGE BASE URL
const serverUrl = '<%= ssoServerURL %>'; // VANTAGE BASE URL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if the quotes would be needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schematics - ui-platform - ng add

4 participants