JPeer264 / node-rename-css-selectors

📝 Rename css classes and id's in files
MIT License
65 stars 9 forks source link

Update rcs core #44

Closed X-Ryl669 closed 5 years ago

X-Ryl669 commented 5 years ago

This update the code to work with version 3 of rcs-core. It adds ignore feature to config file, so it's possible to ignore minified files (like those coming from external libraries) It also adds source line tracking so generated warning are meaningful (to be used with rcs-core#94)

X-Ryl669 commented 5 years ago

I need help here, I don't know how to solve travis's report here. I don't think it's clean to have a dependency on rcs-core^3.0.0-alpha.0 and I've tried rcs-core^3.0.0@next but it does not work either.

How to do this ?

JPeer264 commented 5 years ago

I don't think it's clean to have a dependency on rcs-core^3.0.0-alpha.0

True, that's why I am not releasing a stable version of rename-css-selectors based on an alpha rcs-core dependency. You have 3 options here to lock down to the current alpha version:

{
    "dependencies": {
        // locking the version
        "rcs-core": "^3.0.0-alpha.0",
        // locking the tag
        "rcs-core": "next",
        // locking the branch of github
        "rcs-core": "github:JPeer264/node-rcs-core#master",
        // locking any commit
        "rcs-core": "github:JPeer264/node-rcs-core#2815d48e6caa619a7cb38a5d014af7b762e6de6f"
    }
}

But I would suggest to lock down the version in this case. I will release an alpha version of rename-css-selectors as long as rcs-core doesn't have a stable version :)

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.6%) to 97.026% when pulling 8d519fe08c15c48750a1f1dfa607de21b06eab0b on X-Ryl669:updateRCSCore into a10956db058b3b9c296a9a7ea350b2d1a49aae6b on JPeer264:master.

X-Ryl669 commented 5 years ago

Should be OK now. I've fixed all original code that choked with the linter too.

X-Ryl669 commented 5 years ago

Let me know if it's ok for you this way. It's seem easier to read IMHO. Also, please increment the version in rcs-core so I can add the new allWarnings.warn() call to get the final (merged) warning report on the console. I'm preparing a new PR for this on this project with some documentation update.

JPeer264 commented 5 years ago

I released rcs-core@3.0.0-alpha.1 or rcs-core@next :+1:

klimashkin commented 4 years ago

Hi! Not sure why it's in a patch update of the rename-css-selectors It breaks my build after 3.2.5 -> 3.2.6 update. Something is replaced too greedy in js files

JPeer264 commented 4 years ago

Uff thats really bad. So "just" JS files are breaking?

It's in a patch as it shouldn't break the usage of rcs. I'm gonna invest in this asap!

JPeer264 commented 4 years ago

Btw which kinda errors are you getting? JS files are being replaced wrongly or you JS files where you use rcs are breaking? E.g. some methods are not found?

JPeer264 commented 4 years ago

FYI. I unpublished 3.2.6 and released 3.2.7 which is the same as 3.2.5, so nobody should experience any issues for now, until we solved the problem with the new rcs-core.

klimashkin commented 4 years ago

Thanks! Some pieces of js files where replaced outside of strings, so it became not parsable anymore

X-Ryl669 commented 4 years ago

Can you give the example code that breaks (before and after transform) ? Thanks.

X-Ryl669 commented 4 years ago

@klimashkin It'll be hard to fix if you don't give us more details. Can you give (part of) the source JS code and the compiled JS code that has broken? Thanks.

JPeer264 commented 4 years ago

@klimashkin could you try v4.0.0-rc.0 or as alias rename-css-selectors@next and report if your error still exists? :)