Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(): change to Covalent Angular package format build w/ ng-packagr #1065

Merged
merged 56 commits into from
Jan 15, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jan 4, 2018

Description

To be able to enable and measure server side rendering capability of a library and gain additional benefits such as tree shaking though primary/secondary entry points and much more. A library must follow the Angular Package Format to gain these benefits.

What's included?

  • Convert Covalent's build into Angular Package Format standard.

Test Steps

  • Note: touched every component/directive in Covalent so will need some deep testing
  • npm run reinstall
Basic testing
  • npm run build:release, verify the deploy/platform/* is outputting as Angular Package Format.
  • npm run build:universal, verify that the subset of components being tested are outputing server based rendered content.
  • npm run serve, verify all components/directives/demos are working accordingly
Advanced testing
  • Create a new project following the Covalent Getting Started, but instead of install Covalent from npm install --save @covalent/core or any of the other primary entry points. Install @covalent/* into the new project by first running npm run build:release in this repo then in each of the primary entry point folder (ex: /deploy/platform/core, /deploy/platform/dynamic-forms) runnpm pack. Then in the new project run npm install <file-path-to-*.tgz> on each of the generated packed file. Verify that you can use every component/directive though both the primary entry points @covalent/core, @covalent/dynamic-forms, @covalent/highlight, @covalent/http, @covalent/markdown and secondary entry points @covalent/core/paging, @covalent/core/loading, @covalent/chips, ect.... (if your using yarn you can use yarn link instead of npm pack/npm install)
  • Using similar steps above try it on a product like (HybridCloud, AppCenter, ect..), make sure to delete the current node_module/@covalent/* before installing the packages from this repo.

General Tests for Every PR

  • npm run serve:prod still works.
  • npm run tslint passes.
  • npm run stylelint passes.
  • npm test passes and code coverage is not lower.
  • npm run build:release still works.

Steven Ov added 2 commits January 3, 2018 16:08
…anch last 2 branches were outdated and getting too dirty
…r consumption style to produce respective angular package format v5
@ghost ghost force-pushed the angular-package-format-build branch from 57fc89b to eb5bdf3 Compare January 9, 2018 20:56
@ghost ghost changed the title Angular package format build (ssr friendly and more) Angular package format build Jan 13, 2018
@ghost ghost changed the title Angular package format build Covalent Angular package format build Jan 13, 2018
@ghost ghost changed the title Covalent Angular package format build Covalent Angular package format build w/ ng-packagr Jan 13, 2018
@@ -2,9 +2,6 @@
"name": "@covalent/core",
"version": "1.0.0-rc.2",
"description": "Teradata UI Platform built on Angular Material",
"main": "./bundles/core.umd.js",
"module": "./index.js",
"typings": "./index.d.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we removing this? does the ng-packegr add this automatically?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, nvm just saw that they are generated 👍

@emoralesb05 emoralesb05 changed the title Covalent Angular package format build w/ ng-packagr chore(): change to Covalent Angular package format build w/ ng-packagr Jan 15, 2018
@emoralesb05 emoralesb05 added this to the Release Candidate 3 milestone Jan 15, 2018
@emoralesb05 emoralesb05 merged commit cb2fd30 into develop Jan 15, 2018
@emoralesb05 emoralesb05 deleted the angular-package-format-build branch January 15, 2018 21:18
kriswinbush pushed a commit to kriswinbush/covalent that referenced this pull request Feb 20, 2020
…Teradata#1065)

* feat(): cherry-pick over inital ssr research/solution to new clean branch last 2 branches were outdated and getting too dirty

* feat(): mod paging, virtual scroll, notifications to follow ng-packagr consumption style to produce respective angular package format v5

* feat(): push yarn.lock update

* feat(): ng-packagr mod for @covalent/common and resove new file paths breaking npm run serve

* feat(): common folder setup for Angular Package Format and cleaned up scripts used for building @covalent/core and testing ssr

* fix(): forgot to save merge conflict resolution

* refactor(): remove outdated custom build config

* refactor(): remove package-lock.json

* feat(): enable imports from secondary entry points

For paging, virtual-scroll, notifications, and common.
Example for paging:
import { CovalentPagingModule } from '@covalent/core';
import { CovalentPagingModule } from '@covalent/core/paging';
...

* fix(): linting issue

* fix(): breaking test because of import location

* feat(): Angular package format build for /messages with /common ng-packangr hack work around

* feat(): mod build path to be deploy/platform instead of dist/

* feat(): fix linting issue

* fix(): remove message export from message.module and update common public_api

* feat(): ng-packagr setup for chips

* feat(): ng-packagr setup for data-table

* fix(): forgot to export chips in platform/index

* feat(): ng-packagr setup for dialogs

* fix(): export dialogs from core public-api

* feat(): ng-packagr setup for expansion-panel

* feat(): ng-packagr setup for file

* feat(): ng-packagr setup for json-formatter

* fix(): breaking test because of filepath

* feat(): ng-packagr setup for layout

* feat(): ng-packagr setup for loading

* feat(): ng-packagr setup for media

* feat(): ng-packagr setup for menu

* feat(): ng-packagr setup for search

* ng-packagr setup for steps

* feat(): clean up post ng-packagr conversion for /core

* feat(): move and build required files that ng-packagr doesn't handle

* fix(): breaking testing because of file path

* feat(): ng-packagr setup for primary entrypoint: dynamic-forms

* feat(): ng-packagr setup for primary entrypoint: highlight

* feat(): ng-packagr setup for primary entrypoint: http

* feat(): ng-packagr setup for primary entrypoint: markdown

* feat(): updated ng-packangr to 2.0.0-rc.0

* fix(): double exporting

* feat(): upgrade ng-packagr to 2.0.0-rc-6

* feat(): upgrade ng-packagr to 2.0.0-rc-7 and consolidated ng-package settings

* fix(): change ng-packagr.json to ng-packagr.js for last ng-packagr update

* feat(): upgrade ng-packagr to 2.0.0-rc-8

* feat(): upgrade ng-packagr to 2.0.0-rc-10

* refactor(): clean up + consolidate code/scripts

* refactor(): additional clean up

* fix(): linting issues

* chore(): delete unneeded tsconfig-aot.json

* chore(): set -e in build scripts to stop script if it fails

* chore(): ignore failure if .tgz pack is not there

* fix(): test run different sed command based on platform

* refactor(): remove platform echo test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant