jsoverson / preprocess

Preprocess HTML, JavaScript, and other files with directives based off custom or ENV configuration
Other
366 stars 80 forks source link

add sourcemaps support for @if directives. #127

Open Izhaki opened 7 years ago

Izhaki commented 7 years ago

As the process was removing lines from scripts, sourcemaps (and coverage reports) line mapping was faulty.

With this change, removed content (and directives) is replaced with empty lines, maintaining correct line mapping.

Izhaki commented 7 years ago

Related to #59

Izhaki commented 7 years ago

Whilst this only implements @if directive, I guess a non-negligible part of the user base will benefit from this change.

So possibly merge and iterate later, rather than waiting for the full support.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.08%) to 97.647% when pulling 1c93e10fb04420dce135cb2039975c345dc3318e on Izhaki:master into 704d28987837f38abcd6b2e07ba65928e43f2983 on jsoverson:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.08%) to 97.647% when pulling 1c93e10fb04420dce135cb2039975c345dc3318e on Izhaki:master into 704d28987837f38abcd6b2e07ba65928e43f2983 on jsoverson:master.

Izhaki commented 7 years ago

Hmmm... the build fails on non-code related error - ERROR: npm is known not to run on Node.js v0.12.18