Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

[WIP] build: update build process to only bundle .js and .d.ts files - #50

Closed
CaerusKaru wants to merge 1 commit into
angular:masterfrom
CaerusKaru:build
Closed

[WIP] build: update build process to only bundle .js and .d.ts files#50
CaerusKaru wants to merge 1 commit into
angular:masterfrom
CaerusKaru:build

Conversation

@CaerusKaru

@CaerusKaru CaerusKaru commented Nov 1, 2017

Copy link
Copy Markdown
Member

This PR is meant to stop packaging full TypeScript files in the
library. This breaks testing capabilities in Angular, and is
overall unnecessary. Instead, we transpile all files using tsc
into a separate directory, and only publish that directory, with
the root files (index.js and index.d.ts) specified in package.json.

  • add outDir to tsconfig for bundling

  • clean up package.jsom npm scripts

  • add exports to index.ts to allow for root import

  • move inline builder to separate directory

  • add dev dependencies for TypeScript building

  • add files and directories to npmignore to allow for root packaging

  • move protractor config to root level

  • change webpack to use ts-loader

  • Fixes refactor: change project structure to Angular Library format #49

BREAKING CHANGE:

Due to the change in how folders are exported, all imports from
preboot must come as a root import, e.g.

import {ServerPrebootModule} from 'preboot'; instead of
import {ServerPrebootModule} from 'preboot/server';

@CaerusKaru
CaerusKaru force-pushed the build branch 3 times, most recently from 4c4e199 to bd0f2a9 Compare November 1, 2017 00:26
@CaerusKaru CaerusKaru changed the title build: update build process to only bundle .js and .d.ts files [WIP] build: update build process to only bundle .js and .d.ts files Nov 1, 2017
@CaerusKaru CaerusKaru changed the title [WIP] build: update build process to only bundle .js and .d.ts files build: update build process to only bundle .js and .d.ts files Nov 1, 2017
@CaerusKaru CaerusKaru changed the title build: update build process to only bundle .js and .d.ts files [WIP] build: update build process to only bundle .js and .d.ts files Nov 1, 2017
This PR is meant to stop packaging full TypeScript files in the
library. This breaks testing capabilities in Angular, and is
overall unnecessary. Instead, we transpile all files using tsc
into a separate directory, and only publish that directory, with
the root files (index.js and index.d.ts) specified in package.json.

There are no breaking changes in this PR, but if you are building
from source, please make sure to update your dev dependencies.

* add outDir to tsconfig for bundling
* upgrade to angular v5 and use new compiler instead of just tsc
* clean up package.jsom npm scripts
* add exports to index.ts to allow for root import
* move inline builder to separate directory
* add dev dependencies for TypeScript building
* add files and directories to npmignore to allow for root packaging
* move protractor config to root level
* change webpack to use ts-loader

* Fixes angular#49

BREAKING CHANGE:

Due to the change in how folders are exported, all imports from
`preboot` must come as a root import, e.g.

`import {ServerPrebootModule} from 'preboot';` instead of
`import {ServerPrebootModule} from 'preboot/server';`
@CaerusKaru

Copy link
Copy Markdown
Member Author

@jeffwhelpley Here's the state of this PR so far: it builds and everything works great, but e2e is failing because this PR bumps the deps to Angular v5, which:

a) no longer uses ReflectiveInjector, and
b) no longer exposes COMPILER_PROVIDERS

The upgrade to v5 was necessary to fix some AOT issues with the new build format (which necessitated switching to ngc over just tsc)

We'll need another testing solution for JIT, or we could alternatively compile it with AOT and test it that way.

@CaerusKaru

Copy link
Copy Markdown
Member Author

Closing in favor of #51

@CaerusKaru CaerusKaru closed this Nov 6, 2017
@CaerusKaru
CaerusKaru deleted the build branch December 5, 2017 18:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant