Skip to content

Commit

Permalink
moved to babel 7, removed runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Wilkowski <Hi@Dominik-Wilkowski.com>
  • Loading branch information
dominikwilkowski committed Feb 8, 2019
1 parent d5aeb6b commit aea9e23
Show file tree
Hide file tree
Showing 5 changed files with 1,535 additions and 1,603 deletions.
5 changes: 2 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}
"presets": ["@babel/preset-env"]
}
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.1 - updated to babel 7, removed runtime from dependencies
* 2.4.0 - added font `shade`, added hex color support
* 2.3.1 - added tests, fixed options, updated dependencies
* 2.3.0 - added apostrophe support in all fonts
Expand Down
17 changes: 8 additions & 9 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.0",
"version": "2.4.1",
"homepage": "https://github.com/dominikwilkowski/cfonts",
"author": {
"name": "Dominik Wilkowski",
Expand Down Expand Up @@ -36,23 +36,22 @@
"test:watch": "jest --watchAll --coverage",
"test:unit": "jest",
"build": "npm run build:bin & npm run build:lib",
"build:bin": "mkdir -p bin && babel src/bin.js --out-file bin/index.js --presets=es2015 --plugins transform-runtime",
"build:lib": "mkdir -p lib && babel src/lib.js --out-file lib/index.js --presets=es2015 --plugins transform-runtime",
"build:bin": "mkdir -p bin && babel src/bin.js --out-file bin/index.js",
"build:lib": "mkdir -p lib && babel src/lib.js --out-file lib/index.js",
"watch": "npm run build && onchange 'src/**/*' -- npm run build"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"jest-cli": "^23.6.0",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"jest-cli": "^24.1.0",
"onchange": "^5.2.0"
},
"peerDependencies": {},
"dependencies": {
"ansi-styles": "^3.2.1",
"babel-runtime": "^6.26.0",
"chalk": "^2.4.2",
"change-case": "^3.0.2",
"change-case": "^3.1.0",
"window-size": "^1.1.1"
},
"jest": {
Expand Down
6 changes: 3 additions & 3 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ const AddLetterSpacing = ( output, fontLines, fontLetterspace, fontColors, color
space = ' ';
}

output[ i ] += String.repeat( space, letterSpacing );
output[ i ] += space.repeat( letterSpacing );
}

return output;
Expand Down Expand Up @@ -487,7 +487,7 @@ const AlignText = ( output, lineLength, characterLines, align, size = Size ) =>

if( space > 0 ) { // only add if there is something to add
let lines = output.length - characterLines; // last line is characterLines tall and is located at the bottom of the output array
space = String.repeat(' ', space );
space = ' '.repeat( space );

for( let i = lines; i < output.length; i++ ) { // iterate over last line (which can be several line breaks long)
output[ i ] = space + output[ i ];
Expand Down Expand Up @@ -620,7 +620,7 @@ const RenderConsole = ( INPUT, OPTIONS, size = Size ) => {

let space = '';
if( OPTIONS.letterSpacing > 0 ) {
space = String.repeat( ' ', OPTIONS.letterSpacing );
space = ' '.repeat( OPTIONS.letterSpacing );
}

// we have to add our letter spacing first
Expand Down
Loading

0 comments on commit aea9e23

Please sign in to comment.