Angular skeleton 

# make sure it is less than 5, since only 4
# works, there are too many changes so I
# haven't be able to do JIT + AOT at once
# with Angular 5
# you can list the versions like this:
npm show p3x-angular-compile versions --json
npm show corifeus-builder-angular versions --json

yarn add corifeus-builder-angular@4.x.x
yarn add p3x-angular-compile@4.x.x

Then everything else is automatic. It uses tree shaking, webpack, uglifys and tons of options for debug and so on, since I am working a big system - https://github.com/patrikx3/corifeus - but it only works the latest versions of Angular / NodeJs. Of course if you seek in versions it always shows the older versions, since they are the package.json, the first vMajor.Minor is the Angular version. So you can do it older versions as well, actually.

Copy 

These files from:
https://github.com/patrikx3/corifeus-app-web-pages

  • src/angular/bundle.aot.ts
  • src/angular/bundle.ts
  • src/angular/polyfills.ts
  • tsconfig.aot.json
  • tsconfig.json

Copy and customize 

These files and customize from:
https://github.com/patrikx3/corifeus-app-web-pages

  • src/angular/bundle.common.ts
// if you need additional imports
// you might even have it empty
  • src/angular/module.ts
    • you need to create your own module
  • src/index.html
    • your own html for bootstrapping
  • Gruntfile.js
// Gruntfile.js
module.exports = (grunt) => {
    const builder = require(`corifeus-builder-angular`);
    const loader = new builder.loader(grunt);
    loader.angular();
    grunt.registerTask('default', builder.config.task.build.angularAotJit);
    grunt.registerTask('aot-jit',['default']);
    grunt.registerTask('run', builder.config.task.run.angular);
    grunt.registerTask('coverage', 'karma:cory-angular');
    grunt.registerTask('test-connect', [
        'connect:cory-angular',
        'watch:cory-wait'
    ])
}

You put all code into src/angular. That's it.

# run on localhost:8080
grunt run

# build
grunt aot-jit

# to test the created app in build/browser:
grunt test-connect

The resulted bundle here:
build/browser

Voila!

Example 

Pages 

Repo: https://github.com/patrikx3/corifeus-app-web-pages
Deployed: https://pages.corifeus.com

Material 

Repo: https://github.com/patrikx3/corifeus-web-material
Deployed: https://material.corifeus.com

corifeus Prototype
onenoteGithub onenoteredis-uiGithub redis-uiangular-compileGithub angular-compilegitlistGithub gitlistramdiskGithub ramdiskfreenomGithub freenomopenwrt-insomniaGithub openwrt-insomniadocker-debian-testing-mongodb-stableGithub docker-debian-testing-mongodb-stableredis-ui-serverGithub redis-ui-serververdaccio-cliGithub verdaccio-clicorifeusGithub corifeuscorifeus-app-web-pagesGithub corifeus-app-web-pagesredis-ui-materialGithub redis-ui-materialsystemd-managerGithub systemd-managercorifeus-web-materialGithub corifeus-web-materialgrunt-p3x-expressGithub grunt-p3x-expresshtml-pdfGithub html-pdfxml2jsonGithub xml2jsoncorifeus-app-server-patrikx3Github corifeus-app-server-patrikx3corifeus-builderGithub corifeus-buildercorifeus-builder-angularGithub corifeus-builder-angularcorifeus-utilsGithub corifeus-utilscorifeus-webGithub corifeus-webfortune-cookieGithub fortune-cookietoolsGithub tools
  Bugs are evident™ - MATRIX
OK