Code Monkey home page Code Monkey logo

Comments (8)

ForbesLindesay avatar ForbesLindesay commented on August 15, 2024

Or just be fully resolved? It would be a bit weird to be able to enter ../../index.js though. Perhaps it would make more sense to just throw a friendly exception and get the user to fix it (given all the potential issues with making many implementations of the package manager work on different OSes etc. that may be simplest.

from component.

tj avatar tj commented on August 15, 2024

hmm yeah we could at very least support ./, or at least warn, even though it's a tiny "feature" I'd still like to support fewer things in favour of us all doing the same thing, otherwise it's just one more thing to add to the spec, I'd like to keep that as minimal as possible

from component.

buschtoens avatar buschtoens commented on August 15, 2024

Automatically fully resolving on build makes sense to me.

from component.

ForbesLindesay avatar ForbesLindesay commented on August 15, 2024

Surely we want to force component.json to live at the root? It would be really weird to let users burry it multiple levels deep.

I think we should keep this complexity out of component and just throw a nice error for now.

from component.

buschtoens avatar buschtoens commented on August 15, 2024

You're right. There seems to be no reason for placing component.json outside or nested deeper in the root and ./ could just throw, so adding it to the spec would be unnecessary.

from component.

enyo avatar enyo commented on August 15, 2024

I agree that it doesn't make sense to nest component.json which is why I suggested to just remove ./ if it occurs at the beginning since every other possibility doesn't make sense.

I'm also in favour of reducing the possibilities one has to format their component.json.
So, throwing an error when a script doesn't start with ./ or ../ is probably the best idea.

(Although most component.json files will be transferred from package.json which will lead to those errors very often)

from component.

tj avatar tj commented on August 15, 2024

closing for now, I don't disagree on stripping ./ but we'll see how many people end up doing this :D if it becomes an issue I'll go ahead and add this part

from component.

ForbesLindesay avatar ForbesLindesay commented on August 15, 2024

Just for tracking, I'm running into this a fair bit when looking at the @microjs libraries, which I'm converting to component form. A lot of them already have package.json files with the './' prefix.

from component.

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.