Changes made to Rocket.Chat are not included after building

342 views Asked by At

I'm new to developing with Meteor and node-based apps. I intend to create a PR for a problem i noticed in Rocket.Chat.

I git cloned the Rocket.Chat dev branch and made a change to a certain file: https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-oembed/client/oembedImageWidget.html

After that i ran the build-script successfully. My build started, but the change is not included. Using the Chrome Dev Tools to inspect the change, i still see the original unchanged code.

I know it's a rather generic question and i'm sure the solution is kind of stupid, but any idea why ?

Thank you. Kind regards

2

There are 2 answers

3
Mikkel On

It looks like the file you modified is in the packages directory. This is dealt with differently.

Check the .meteor/packages files to see if this package is referenced, if it is, then it will install the package from the atmosphere package management system.

Here the steps required to make your changes work...

1) Edit the .meteor/packages file and change the reference to rocketchat:oembed to be simply oembed

2) Edit the file packages/rocketchat-oembed/package.js and do the same thing, change rocketchat:oembed to be simply oembed

Package.describe({
    name: 'oembed',
    version: '0.0.1',
    summary: 'Message pre-processor that insert oEmbed widget in template',
    git: ''
});

I think you can leave the directory names as is.

Meteor will now use your local package instead of going out to get the published version of it

1
Styx On

In addition to @Mikkel's answer: I think you don't have to change package name, but just change its version. That should be enough for Meteor to rebuild this package from its source and you won't have any dependency issues.