Closed Stephen-X closed 6 years ago
@Stephen-X this should be fixed in v3.0.0
You can now also write it a bit different, as I refactored it a bit for an easier usage:
const rcs = require('rename-css-selectors')
rcs.loadMapping('./temp/renaming_map.json')
rcs.process.auto(['style.css', 'index.html'], {newPath: 'temp'}, err => {
rcs.generateMapping('./temp', { overwrite: true }, err => {
// the mapping file is now saved
})
})
It's part of a series of issues I found, so I'm going to reuse the base test case and open separate issues for each of them š I'm developing on Windows btw; not sure if these are all platform specific bugs.
Issue Description:
If you only send HTML file to the
process
function, then it'll only output a new CSS file.Steps to reproduce this issue:
index.html
:style.css
:selector_obfs.js
:node selector_obfs.js
. Notice that there's no new HTML files in thetemp
directory; only the CSS file gets renamed.