pugjs / pug-cli

Pug's CLI interface
MIT License
259 stars 63 forks source link

allow symlink as input #80

Open lazdmx opened 4 years ago

lazdmx commented 4 years ago

Previous implementation used 'lstatSync' which returns stat info about link itself, not the file that it refers to. That behaviour didn't allow to use the tool in case of separate build (source and build dirs are separate, and sources linked back into build directory).

As workaround there we could provide file content through stdin, but that approach has limitations:

This commit changes the use of 'lstatSync' to 'statSync' which makes symlink files be processed as expected.

ci-reporter[bot] commented 4 years ago

The build is failing

✨ Good work on this PR so far! ✨ Unfortunately, the Travis CI build is failing as of 2d6c334acdfe0518b48bb54fe21e100e1d0e0d00. Here's the output:

npm test
> pug-cli@1.0.0-alpha6 test /home/travis/build/pugjs/pug-cli
> mocha -R spec --bail

/home/travis/build/pugjs/pug-cli/node_modules/mocha/bin/mocha:13
const {deprecate} = require('../lib/utils');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:945:3

I'm sure you can fix it! If you need help, don't hesitate to ask a maintainer of the project!


This comment was automagically generated by ci-reporter. If you see a problem, open an issue here.