fabioformosa / kaishi

Kaishi is the origin for all angular projects based on an admin theme
MIT License
0 stars 0 forks source link

You are mixing too many things together #1

Open catull opened 6 years ago

catull commented 6 years ago

@fabioformosa

Please explain why you include these three things into kaishi

The theme module imports User and 3 services from ngx-admin-lte.

If kaishi is a core project, then why would you include an app module and a route in it ?

This is what I do not get ?

catull commented 6 years ago

The route is useless.

An app which imports kaishi will provide its own route. And will have its own app module.

fabioformosa commented 6 years ago

You're right. The app in kaishi it's only a showcase for the main module (kaishi-theme-adminlte). A dummy app useful to test kaishi without an actual app (the equivalent of bootstrapping-ngx-admin-lte for ngx-admin-lte). I've followed this tutorial https://medium.com/@nikolasleblanc/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e I don't export the app inside kaishi, but I package and export the main module inside kaishi: kaishi-theme-adminlte. Indeed simple-kaishi imports kaishi-theme-adminlte and it defines its routes.

catull commented 6 years ago

I played around with your two repos but I cannot get it to build properly.

I have kaishi as a wrapper of ngx-admin-lte. I have simple-kaishi almost building, just one error left:

npm run build

> simple-kaishi@0.0.0 build kaishi/simple-kaishi.git
> ng build --prod

@angular/compiler-cli@5.2.9 requires typescript@'>=2.4.2 <2.7.0' but 2.7.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

    npm install typescript@'>=2.4.2 <2.7.0'

To disable this warning run "ng set warnings.typescriptMismatch=false".

Date: 2018-03-15T22:08:54.503Z
Hash: 8bc1db79c50aa386fb93
Time: 5892ms
chunk {0} styles.ac89bfdd6de82636b768.bundle.css (styles) 0 bytes [initial] [rendered]
chunk {1} polyfills.997d8cc03812de50ae67.bundle.js (polyfills) 84 bytes [initial] [rendered]
chunk {2} main.ee32620ecd1edff94184.bundle.js (main) 84 bytes [initial] [rendered]
chunk {3} inline.318b50c57b4eba3d437b.bundle.js (inline) 796 bytes [entry] [rendered]

ERROR in ../ngx-admin-lte/ngx-admin-lte.ts(10,2): Error during template compile of 'LayoutAuthComponent'
  Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'Component'
    'Component' calls 'ɵmakeDecorator'.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! simple-kaishi@0.0.0 build: `ng build --prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the simple-kaishi@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     .npm/_logs/2018-03-15T22_08_54_548Z-debug.log

Will produce PRs for both repos.