File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Write glob rules for ignored files.
1+ exports . file = ` # Write glob rules for ignored files.
22# Check syntax on https://deepcode.freshdesk.com/support/solutions/articles/60000531055-how-can-i-ignore-files-or-directories-
33# Check examples on https://github.com/github/gitignore
4+ ` ;
Original file line number Diff line number Diff line change 1- # Write glob rules for ignored files.
1+ exports . file = ` # Write glob rules for ignored files.
22# Check syntax on https://deepcode.freshdesk.com/support/solutions/articles/60000531055-how-can-i-ignore-files-or-directories-
33# Check examples on https://github.com/github/gitignore
44
@@ -1597,3 +1597,4 @@ CATKIN_IGNORE
15971597_build
15981598_tracks
15991599opa-debug-js
1600+ ` ;
Original file line number Diff line number Diff line change 33
44SCRIPT_DIR=$( dirname " $0 " )
55SOURCE_DIR=" ./source"
6- EMPTY_OUTPUT=" ../empty.dcignore"
7- FULL_OUTPUT=" ../full.dcignore"
6+ EMPTY_OUTPUT=" ../empty.dcignore.js "
7+ FULL_OUTPUT=" ../full.dcignore.js "
88REGEX=" (^#.*)|((^|\/)\..*$)|(^.*\.[^\/]*$)|(.*src.*)|(^\/\*$)"
99
1010cd " $SCRIPT_DIR "
1616 git clone https://github.com/github/gitignore.git $SOURCE_DIR
1717fi
1818
19+ # Wrap generated string in a JS export
1920TOP=(
20- " # Write glob rules for ignored files."
21+ " exports.file = \` # Write glob rules for ignored files."
2122 " # Check syntax on https://deepcode.freshdesk.com/support/solutions/articles/60000531055-how-can-i-ignore-files-or-directories-"
2223 " # Check examples on https://github.com/github/gitignore"
2324)
2425for ELEMENT in " ${TOP[@]} " ; do
2526 echo -e " $ELEMENT "
2627done > " $EMPTY_OUTPUT "
28+ echo -e " \` ;" >> " $EMPTY_OUTPUT "
29+
2730for ELEMENT in " ${TOP[@]} " ; do
2831 echo -e " $ELEMENT "
2932done > " $FULL_OUTPUT "
@@ -53,6 +56,8 @@ find $SOURCE_DIR -name '*.gitignore' | while read file; do
5356 fi
5457done
5558
59+ echo -e " \` ;" >> " $FULL_OUTPUT "
60+
5661cd ..
5762echo " Parsing completed. Check '$( pwd) /$( basename $FULL_OUTPUT ) ' file for results."
5863exit 0
Original file line number Diff line number Diff line change 1- const fs = require ( 'fs' ) ;
2- const path = require ( 'path' ) ;
3- const DefaultDCIgnore = fs . readFileSync ( path . resolve ( __dirname , 'full.dcignore' ) , 'utf8' ) ;
4- const CustomDCIgnore = fs . readFileSync ( path . resolve ( __dirname , 'empty.dcignore' ) , 'utf8' ) ;
1+ const { file : DefaultDCIgnore } = require ( './full.dcignore.js' ) ;
2+ const { file : CustomDCIgnore } = require ( './empty.dcignore.js' ) ;
3+
54module . exports = {
65 DefaultDCIgnore,
7- CustomDCIgnore
6+ CustomDCIgnore,
87} ;
You can’t perform that action at this time.
0 commit comments