0.0.54 • Published 7 years ago

ng-compiler v0.0.54

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

THIS IS A WORK IN PROGRESS!

@angular/cli does not minify HTML templates before the AOT process leading to extremely bloated script bundles.

NOTES:

This currently does not work as a global package, install it locally to the project.

The input assets folder currently just gets copied over to to output assets folder. I will be using imagemin to optimize images in the assets folder in the near future (svg, png, jpeg).

STRUCTURE SUPPORTED:

I will be adding a configuration file where you can define your project structure, for now here is the hard coded project structure supported:

input:{
    root: "src",
    styles: "styles",
    assets: "assets",
    index: "index.html",
    vendor: "vendor.ts",
    bootstrap: "bootstrap.ts",
    tsconfig: "tsconfig.json"
},
output: {
    root: "dist",
    scripts: "scripts",
    styles: "styles",
    assets: "assets"
},
serve: {
    port: "9995"
}

EXAMPLE:

Below is an exagerated example of why I made this compiler. Using @angular/cli create a new project, in an HTML file just start hitting spacebar, new line, copy and paste all the useless white space just to prove the point, you will end up with a compiled AOT template that is extremely bloated and not efficient that looks like the following:

alt text

Even though this is an exagration, it is still extremely bad. Add up all the white space in your HTML (spaces, new lines) across hundreds of HTML files and it will significantly increase the size of your javascript bundles for an AOT compilation.

0.0.54

7 years ago

0.0.53

7 years ago

0.0.52

7 years ago

0.0.51

7 years ago

0.0.50

7 years ago

0.0.49

7 years ago

0.0.48

7 years ago

0.0.47

8 years ago

0.0.46

8 years ago

0.0.45

8 years ago

0.0.44

8 years ago

0.0.43

8 years ago

0.0.42

8 years ago

0.0.41

8 years ago

0.0.40

8 years ago

0.0.39

8 years ago

0.0.38

8 years ago

0.0.37

8 years ago

0.0.36

8 years ago

0.0.35

8 years ago

0.0.34

8 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago