I have some stylus mixins in a Meteorite package that I don't want to add with api.add_files(). Instead, they need to be @imported into an app from the packages directory to access the mixins. However, Meteor will not watch these files for changes, making development and testing a little annoying (either the server needs to be restarted, or an added file needs to be changed).

Is there any way to make Meteor watch a file for changes, even if it is not directly included in the app/package?

有帮助吗?

解决方案

(I'm assuming you're using a stylus smart package for this answer to make sense)

I suggest you take the same route as recommended for the LESS package: rename the files you want to @import to .stylimport, and do an add_files on those too.

Additionally, you can reference those .stylimport files from outside the smart package as such:

@import "/packages/name-of-your-package/thefilename.stylimport"

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top