Git Product home page Git Product logo

Comments (4)

yazan-abdalrahman avatar yazan-abdalrahman commented on August 28, 2024

@ry

Hello, I'm trying to invistegate this featuer, maybe i can work on it. We need to see if the X 'deno execute X' is not a script by checking if it not has any endings with '.ts || .js' I will print a message to inform 'the X it was task not script' and then run 'deno task X', but from where it would search on task? I believe it should exist deno.json to specify the tasks.

do you have some behavior or expected logic of it task?

from deno.

yazan-abdalrahman avatar yazan-abdalrahman commented on August 28, 2024

@ry
Can we modify the Custom Error in deno_core to return 'class' attribute that will help determine script not found? Then, if it is 'not found' and the flag it 'run', it will map it to task.

[cli\main.rs:347:7] &err = CustomError {
class: "NotFound",
message: "Module not found "file:///D:/yad/deno/task/start".",
}
?

Please let me know whether I can use this solution or tell me what to expect.

from deno.

BlackAsLight avatar BlackAsLight commented on August 28, 2024

We need to see if the X 'deno execute X' is not a script by checking if it not has any endings with '.ts || .js'

This method is flawed. A file doesn't need an extension or could have a different extension and still be valid JavaScript/TypeScript code.

then run 'deno task X', but from where it would search on task? I believe it should exist deno.json to specify the tasks.

Either deno.json or deno.jsonc

from deno.

yazan-abdalrahman avatar yazan-abdalrahman commented on August 28, 2024

We need to see if the X 'deno execute X' is not a script by checking if it not has any endings with '.ts || .js'

This method is flawed. A file doesn't need an extension or could have a different extension and still be valid JavaScript/TypeScript code.

then run 'deno task X', but from where it would search on task? I believe it should exist deno.json to specify the tasks.

Either deno.json or deno.jsonc

@BlackAsLight
Hello, sure, I checked it yesterday and I know we can't use that method.

so,Can we modify the Custom Error in deno_core to return 'class' attribute that will help determine script not found? Then, if it is 'not found' and the flag it 'run', it will map it to task.

[cli\main.rs:347:7] &err = CustomError {
class: "NotFound",
message: "Module not found "file:///D:/yad/deno/task/start".",
}
?

Please let me know whether I can use this solution or tell me what to expect.

from deno.

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.