Topic: Precompiled version ?

Sand Angel free asked 6 years ago


I want to have a precompiled version of ng-mdb-pro. Right now it is shipped with .ts file,  not compatible with my tsconfig. { "compileOnSave": false, "compilerOptions": { "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "noFallthroughCasesInSwitch": true, "noImplicitReturns": true, "suppressExcessPropertyErrors": true, "noImplicitThis": true, "noImplicitAny": true, "alwaysStrict": true, "suppressImplicitAnyIndexErrors": true, "noUnusedLocals": true, "noUnusedParameters": true, "target": "es5", "typeRoots": ["node_modules/@types"], "lib": ["es2017", "dom"], }, "exclude": ["node_modules", "tmp"] }   I want to use noUnusedParameters and noUnusedLocals options. Please give some instructions for build process.

Sand Angel free answered 6 years ago


Hello customer support, I have waited two days for your answer. When I install ng-mdb-pro from gitlab account, or add another package to my repo, I noticed that there is a node_modules folder installed under ng-mdb-pro folder in the node_modules folder of my repo.

  • node_modules
    • @angular
    • ng-mdb-pro
      • node_modules
        • @angular

So when I compile, there are two version of angular in my node_modules. I have to delete the nested node_modules folder and add this config to my tsconfig.json.

"include": [
"node_modules/ng-mdb-pro/**/*.ts",
"src/**/*.ts"
]

I request a working precompiled version as any normal UI library would be, not a ts source which will break my build config. Can you tell me when you'll be able to offer me that version?
 


Sebastian Kaczmarek staff commented 6 years ago

Hello Sand Angel, I am sorry for late answer, we had a bank holiday. I have tried to reproduce your issue but I couldn't get the same result as you. Could you please provide me with more details? How do you install MDB- via NPM, Yarn or manually? Also, did you try to isolate the issue by doing the same thing on a new clean project with and without MDB installed? Regards

Sand Angel free commented 6 years ago

Thanks for your reply. I install ng-mdb-pro by using yarn 1.2.1 and gitlab repo in a new angular 5 project created by angular/cli 1.5, following instructions in "Get started in 5 minutes" Pro user. I have tested with my Mac 10.13, There are some user face the same issue https://mdbootstrap.com/support/problems-with-the-installatio-of-mdb-pro.  After install, there are two node_modules folder installed as described above. I have to manually delete the nested folder and adjust the tsconfig to compile both my source code and mdb

Sand Angel free commented 6 years ago

One more issue, I findout that your $image-path variable in the scss code doesn't has !default flag, and there are some place in your scss code directly use relative path: e.g url('../img/....'), not #{$image-path}/..., which lead to I can not include some scss file in my styles.scss. Can you fix this?

Sand Angel free commented 6 years ago

I have tried to compile your mdb module. And the problem that keep your code not compatible with strictMetadataEmit: true in angularCompilerOptions (=> not compatible with AOT mode) is the use of PageScrollConfig class with all static member. I suggest change all static to instance member, and export const = new class(). With that change, I was able to compile your mdb lib to umd and es2015 module.

Dawid Adach pro commented 6 years ago

As discussed we will continue discussion on our BetaTest slack channel


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags