File tree Expand file tree Collapse file tree 7 files changed +20
-125
lines changed
Expand file tree Collapse file tree 7 files changed +20
-125
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11# @c14mx/pix31
22
3+ ## 1.0.7
4+
5+ ### Patch Changes
6+
7+ - Fixing ` add ` command. Getting ` Error: ENOENT: no such file or directory... `
8+
39## 1.0.6
410
511### Patch Changes
3541### Patch Changes
3642
3743- Removing npm org scope and updating docs
38-
39- ## 1.0.4
40-
41- ### Patch Changes
42-
43- - fix publish.yml types and error
44-
45- ## 1.0.3
46-
47- ### Patch Changes
48-
49- - More README updates
50-
51- ## 1.0.2
52-
53- ### Patch Changes
54-
55- - Adding license and updating readme
Original file line number Diff line number Diff line change 11# pix31
22
3- [ ![ npm version] ( https://badge.fury.io/js/%40c14mx%2Fpix31.svg )] ( https://www.npmjs.com/package/@c14mx/pix31 )
4- [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
5-
63A CLI to add [ pixelarticons] ( https://pixelarticons.com/ ) to your React and React Native projects.
74
85** Dependencies**
Original file line number Diff line number Diff line change 1212 "dev" : " tsc -w" ,
1313 "typecheck" : " tsc --noEmit" ,
1414 "lint" : " tsc --noEmit" ,
15- "prepublishOnly" : " npm run build" ,
16- "changeset" : " changeset" ,
17- "version" : " changeset version" ,
18- "release" : " npm run build && changeset publish --access public"
15+ "prepublishOnly" : " npm run build"
1916 },
2017 "name" : " pix31" ,
21- "version" : " 1.0.6 " ,
18+ "version" : " 1.0.7 " ,
2219 "private" : false ,
2320 "main" : " dist/index.js" ,
2421 "module" : " dist/index.mjs" ,
4239 "terminal-link" : " ^3.0.0"
4340 },
4441 "devDependencies" : {
45- "@changesets/cli" : " ^2.28.1" ,
4642 "@types/commander" : " ^2.12.2" ,
4743 "@types/fs-extra" : " ^11.0.4" ,
4844 "@types/jest" : " ^29.0.0" ,
Original file line number Diff line number Diff line change @@ -115,13 +115,19 @@ ${componentName}.displayName = "${componentName}";
115115}
116116
117117export function getSvgFiles ( ) : string [ ] {
118- const cliDir = path . join ( __dirname , "../ .." ) ;
119- const svgDir = path . join ( cliDir , "pixelarticons" ) ;
118+ const packageRoot = path . join ( __dirname , ".." , " ..") ;
119+ const svgDir = path . join ( packageRoot , "pixelarticons" ) ;
120120
121- return fs
122- . readdirSync ( svgDir )
123- . filter ( ( file ) => file . endsWith ( ".svg" ) )
124- . map ( ( file ) => path . join ( svgDir , file ) ) ;
121+ try {
122+ return fs
123+ . readdirSync ( svgDir )
124+ . filter ( ( file ) => file . endsWith ( ".svg" ) )
125+ . map ( ( file ) => path . join ( svgDir , file ) ) ;
126+ } catch ( error ) {
127+ throw new Error (
128+ `Failed to find SVG files in ${ svgDir } . Please ensure the package is installed correctly.`
129+ ) ;
130+ }
125131}
126132
127133export function searchRelatedFileNames ( query : string , fileNames : string [ ] , limit = 3 ) : string [ ] {
You can’t perform that action at this time.
0 commit comments