This is a migrated thread and some comments may be shown as answers.

Installing Kendo UI for jQuery using NPM

1 Answer 202 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mikael
Top achievements
Rank 1
Mikael asked on 08 Apr 2020, 07:07 AM

Forgive me if this is a newbie question, but I just started working with Visual Studio Code and NPM.

I am using Visual Studio Code to build a Kendo UI jQuery-based application (including the use of typescript)

I am following the instructions here: https://docs.telerik.com/kendo-ui/intro/installation/npm. I also install typescript support, using the instructions here: https://docs.telerik.com/kendo-ui/third-party/typescript. I am not following the instructions completely, I use

This works fine, in a way, but during the NPM-installation, the .js and .css files are located deep down in /node_modules/...

So, in my HTML-file, instead of using something like this:

    <link href="styles/kendo.common.min.css" rel="stylesheet" />

I have to use:

    <link href="node_modules\@progress\kendo-ui\css\web\kendo.common.min.css" rel="stylesheet" />

That doesn't feel right. Of course, I could manually copy the css, js, etc files from the node_modules structure to folders "styles", "js", etc but that would make the use of NPM rather useless (I could just as well manually download the.zip-file from Telerik and copy the files). Also, if I would run NPM -install again, I could potentially bring down new versions of the css/js-files, and would have to remember to manually copy the files to "styles", "js"-folders again.

I have a feeling I am using the wrong technique here, any ideas?

/Fredrik

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 09 Apr 2020, 07:49 PM

Hello Fredrik,

NPM installs packages to node_modules, not just our packages, but packages in general. I'll quote a member of the NPM team:

"If you're looking for a way to install something from npm but not have it
end up in node_modules, then no, we're not going to do that or add that
kind of functionality.

I don't mean to come off as belligerent, but packages on npm get installed
to node_modules by design and that is not going to change."

More on this you can find in their Github repo.

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Mikael
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or