Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikwilkowski committed Aug 27, 2019
2 parents 219df15 + f76c02e commit d4e4219
Show file tree
Hide file tree
Showing 4 changed files with 451 additions and 443 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ npm run test


## Release History
* 2.4.5 - bumped dependencies, moved to relative links for fonts for webpack support (#22)
* 2.4.4 - bumped dependencies
* 2.4.3 - bumped dependencies
* 2.4.2 - bumped dependencies
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cfonts",
"description": "Sexy fonts for the console",
"version": "2.4.4",
"version": "2.4.5",
"homepage": "https://github.com/dominikwilkowski/cfonts",
"author": {
"name": "Dominik Wilkowski",
Expand Down Expand Up @@ -45,12 +45,12 @@
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"jest-cli": "^24.8.0",
"jest-cli": "^24.9.0",
"onchange": "^6.0.0"
},
"peerDependencies": {},
"dependencies": {
"ansi-styles": "^4.0.0",
"ansi-styles": "^4.1.0",
"chalk": "^2.4.2",
"change-case": "^3.1.0",
"window-size": "^1.1.1"
Expand Down
7 changes: 3 additions & 4 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const CLIOPTIONS = {
default: 1,
},
};
const PACKAGE = JSON.parse( Fs.readFileSync( Path.normalize(`${ __dirname }/../package.json`), 'utf8' ) );
const PACKAGE = require('../package.json');
const HEXTEST = RegExp('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$');


Expand All @@ -218,10 +218,9 @@ const GetFont = ( font ) => {

// try loading the font file
try {
let fontFile = Path.normalize( `${ __dirname }/../fonts/${ font }.json` ); // build font path
let FONTFACE = JSON.parse( Fs.readFileSync( fontFile, 'utf8' ) ); // read font file
let FONTFACE = require(`../fonts/${ font }.json`); // read font file

Debugging.report( `GetFont: Fontface path selected: "${ fontFile }"`, 2 );
Debugging.report( `GetFont: Fontface path selected: "${ font }.json"`, 2 );

return FONTFACE;
}
Expand Down
Loading

0 comments on commit d4e4219

Please sign in to comment.