File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22/* eslint-disable @typescript-eslint/no-unused-vars */
33
4- import {
5- join as pathJoin ,
6- relative as pathRelative ,
7- sep as pathSep ,
8- posix as pathPosix
9- } from "path" ;
4+ import { join as pathJoin , relative as pathRelative , sep as pathSep } from "path" ;
105import * as fs from "fs" ;
116import { getProjectRoot } from "./tools/getProjectRoot" ;
127import { assert } from "tsafe/assert" ;
@@ -99,12 +94,9 @@ import type { Equals } from "tsafe";
9994 const gitignoreRaw = fs . readFileSync ( gitignoreFilePath ) . toString ( "utf8" ) ;
10095
10196 const pathToIgnore = `/${ pathJoin (
102- pathRelative ( projectDirPath , publicDirPath ) . replace (
103- new RegExp ( `\\${ pathSep } ` , "g" ) ,
104- pathPosix . sep
105- ) ,
97+ pathRelative ( projectDirPath , publicDirPath ) ,
10698 "dsfr"
107- ) } /`;
99+ ) . replace ( new RegExp ( `\\ ${ pathSep } ` , "g" ) , "/" ) } /`;
108100
109101 if ( gitignoreRaw . split ( "\n" ) . find ( line => line . startsWith ( pathToIgnore ) ) !== undefined ) {
110102 break edit_gitignore;
You can’t perform that action at this time.
0 commit comments