0

I have an npm module written in typescript.

However, when I rename a certain class and try npm rebuild the build folder still contains the old module name. This is still a problem even after I change the class name in <project name>.js folder, in module.exports .

Deleting said <old-class-name>.js in the build folder before rebuilding also doesn't seem to help, as no new javascript file is created in the build folder. Am I doing something wrong here?

This is very annoying because now I have inconsistent class names and unexpected errors, significantly slowing down the development process.

Joël Abrahams
  • 379
  • 4
  • 15

1 Answers1

2

npm rebuild is designed to rebuild your npm modules. What you are looking for is npm buid.

p.s. Please don't call your javascript modules 'classes', they are not. They might contain classes but they are modules.

p.p.s. Please don't ever have 'file extensions' for folders. No folder should be called <project name>.js

matetukacs
  • 115
  • 6
  • Good point, still haven't quite gotten the hang of the javascript jargon. However, `npm build` doesn't seem to do the trick either, which is odd. I still see the old class name in the generated javascript file. – Joël Abrahams Aug 04 '17 at 11:23