Giter Site home page Giter Site logo

Comments (3)

inlife avatar inlife commented on August 22, 2024 1

Hey,

The problem is that when "output file had a different extension then the default" fs.stat throws an error, which is later handled by first if substatement.

 fs.stat( path.join( 
            project.workpath, 
            project.resultname 
        ), (err, stats) => {
            if (err || !stats || stats.size < 1) {
                getLogs(project, (logs) => {
                    return reject(logs);
                })
          ...

The intention of this piece of code, was to verify that outputted file is the one which we were expecting at the beginning (setting outputExt in project).

But now, i'm thinking: maybe this validation part don't even needed...I don't know.

I was looking how to implement this on my own and provide a changeset

Might be something looking like that:

if (err) {
    return reject(err);
} else if (!stats || stats.size < 1) {
    getLogs(project, (logs) => {
        return reject(logs);
    })
}

from nexrender.

southernsun avatar southernsun commented on August 22, 2024 1

Indeed, that might probably be the best way to handle it and provide the user with a more clear error message. Great. Btw, your framework is pretty cool! Thank you for all the effort that you put into it!

from nexrender.

inlife avatar inlife commented on August 22, 2024

Implemented this changed in the project, and pushed new version to npm.
And thank you for the feedback. I really appreciate it! ❤️

from nexrender.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.