Skip to content

Commit

Permalink
Merge pull request #1 from D3R/change-settings
Browse files Browse the repository at this point in the history
Remove legacy and update package settings
  • Loading branch information
neild3r authored Nov 22, 2023
2 parents 6b8474e + 92aacf6 commit 4843fa6
Show file tree
Hide file tree
Showing 6 changed files with 1,851 additions and 10,710 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:

env:
Expand Down Expand Up @@ -39,11 +36,9 @@ jobs:
matrix:
os:
- ubuntu-latest
- windows-latest
node:
- 12
- 14
- 16
- 20

steps:
- name: Clone repository
Expand Down
23 changes: 11 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,25 @@ const filePush = (file, compileResult, callback) => {
// Grab the path portion of the file that's being worked on
const sassFileSrcPath = path.dirname(sassFileSrc);

let rxp = new RegExp(sassFileSrc + '$')
const rxp = new RegExp(`${sassFileSrc}$`);
const base = file.path.replace(rxp, '');

if (sassFileSrcPath) {
var sourceFileIndex = sassMap.sources.indexOf(sassMapFile);
let sourceFileIndex = sassMap.sources.indexOf(sassMapFile);
if (sourceFileIndex === -1) {
sourceFileIndex = sassMap.sources.indexOf('file://' + sassMapFile);
sourceFileIndex = sassMap.sources.indexOf(`file://${sassMapFile}`);
}

// Prepend the path to all files in the sources array except the file that's being worked on
sassMap.sources = sassMap.sources.map((source, index) => {
// Make path relative
if (source.startsWith('file://')) {
let relative = path.relative(base, source.replace(/^file:/, ''));
return relative;
}

return index === sourceFileIndex
? source
: path.join(sassFileSrcPath, source)
// Make path relative
if (source.startsWith('file://')) {
return path.relative(base, source.replace(/^file:/, ''));
}

return index === sourceFileIndex
? source
: path.join(sassFileSrcPath, source);
});
}

Expand Down
193 changes: 0 additions & 193 deletions legacy.js

This file was deleted.

Loading

0 comments on commit 4843fa6

Please sign in to comment.