Giter Club home page Giter Club logo

Comments (5)

Dan503 avatar Dan503 commented on August 21, 2024

Actually I think using a backSlash setting is the wrong approach now. If I use a backSlash setting it will be a stark on/off toggle that applies to all the paths. What if the user only want's to have some paths be back slashes and some paths be forward slashes? That wouldn't be possible with a backSlash setting.

I think the better approach would be to make it so that if the user uses \\$path instead of $path it will use backslashes instead of forward slashes. Or maybe #path, or \\path.... hmm 🤔

from gulp-auto-imports.

Dan503 avatar Dan503 commented on August 21, 2024

I need to also think about how to handle escaped back-slashes \\ vs normal back slashes \. I should provide a method for allowing the user to decide on what style of backslash they want to use.

I also need to make sure that the order retention functionality is compatible with the solution I come up with.

from gulp-auto-imports.

Dan503 avatar Dan503 commented on August 21, 2024

At the moment my best idea for a syntax is $\\path for single back slashes and $\\\\path for escaped back slashes.

I can't use $\path for single back slashes because the slashes need to be escaped and \p doesn't really translate into anything.

from gulp-auto-imports.

Dan503 avatar Dan503 commented on August 21, 2024

FYI, I went with this syntax:

$\_path = single back slashes

$\\path = escaped (double) backslashes

Technically $\_path is identical to writing $_path but I'm going to recommend adding the redundant backslash to help convey meaning.

from gulp-auto-imports.

Dan503 avatar Dan503 commented on August 21, 2024

I've ran into a bit of an issue where backslashes and absolute paths are not compatible with order retention.

from gulp-auto-imports.

Related Issues (13)

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.