Skip to content

Commit

Permalink
Merge pull request #2 from Xelzs/develop
Browse files Browse the repository at this point in the history
1.1.0
  • Loading branch information
Xelzs committed Nov 23, 2020
2 parents 59a42b5 + 4d29b76 commit 464eaa9
Show file tree
Hide file tree
Showing 7 changed files with 726 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
*.css
axentix.*
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.1.0 - 2020-11-23

- ADDED
- `sass` & `js` languages support for minified format
- IMPROVED
- Update dependencies

# 1.0.0 - 2020-08-18

CodeSize estimates the size of your files in different format (original, minified, gzipped, brotli).
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

Estimates the size of your files in different format (original, minified, gzipped, brotli).

**The minified format support only CSS and SCSS languages.**

## Command-line Usage

Install code-size package globally with npm :
Expand Down Expand Up @@ -37,7 +35,7 @@ Options:
-g, --gzip show gzipped size
-b, --brotli show brotli size
-m, --minify show minified size | !! Works only with supported language !!
-l, --language <language> specifies the language type. Supported: css, scss (default: "css")
-l, --language <language> specifies the language type. Supported: css, sass, scss, js (default: "css")
-h, --help display help for command
```

Expand Down Expand Up @@ -77,7 +75,7 @@ All options availables on command-line are also available here.
- `gzip` - Boolean to enable the gzip estimation
- `brotli` - Boolean to enable the brotli estimation
- `minify` - Boolean to enable the minify estimation. **Language option required**
- `language` - Specify the language type. Supported: `css, scss`.
- `language` - Specify the language type. Supported: `css`, `sass`, `scss`, `js`.

## Changelog

Expand Down
4 changes: 2 additions & 2 deletions bin/code-size
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ commander
.option('-g, --gzip', 'show gzipped size')
.option('-b, --brotli', 'show brotli size')
.option('-m, --minify', 'show minified size | !! Works only with supported language !!')
.option('-l, --language <language>', 'specifies the language type. Supported: css, scss', 'css')
.option('-l, --language <language>', 'specifies the language type. Supported: css, sass, scss, js', 'css')
.parse(process.argv);

const { file, source, language, minify, gzip, brotli } = commander;
Expand All @@ -31,7 +31,7 @@ const { file, source, language, minify, gzip, brotli } = commander;
return;
}

const availableLanguages = ['css', 'scss'];
const availableLanguages = ['css', 'sass', 'scss', 'js'];
languageFmt = language.toLowerCase();

if (minify && !availableLanguages.includes(languageFmt)) {
Expand Down
Loading

0 comments on commit 464eaa9

Please sign in to comment.