Skip to content

Commit 54a74fc

Browse files
committed
Add support for .cjs as a JavaScript extension
References: nodejs/ecmascript-modules#32
1 parent dc628a8 commit 54a74fc

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
99
[Unpublished]
1010
----------------------
1111
- **New icons:** Flutter (`.flutter-plugins`), Red (updated logo)
12-
- **Support:** Go (`go.mod`, `go.sum`), Microsoft Excel (`.xla`, `.xlam`, `.xltm`, `.xltx`), Package (`.packages`, `pubspec.{lock,yaml}`), Separated-value file (`.prn`)
12+
- **Support:** Go (`go.mod`, `go.sum`), JavaScript (`.cjs`), Microsoft Excel (`.xla`, `.xlam`, `.xltm`, `.xltx`), Package (`.packages`, `pubspec.{lock,yaml}`), Separated-value file (`.prn`)
1313

1414

1515
[v2.1.29] - 2019-01-26

config.cson

+1
Original file line numberDiff line numberDiff line change
@@ -2559,6 +2559,7 @@ fileIcons:
25592559
[".jsm", "auto-blue"]
25602560
[".jss", "auto-green"]
25612561
[/\.es\d?$/i, "auto-yellow"]
2562+
[".cjs", "auto-green", alias: "CommonJS"]
25622563
[".mjs", "auto-blue"]
25632564
[".sjs", "auto-pink"]
25642565
[".ssjs", "auto-red"]

lib/icons/.icondb.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ module.exports = [
832832
["js-icon",["medium-orange","dark-orange"],/\._js$/i],
833833
["js-icon",["medium-maroon","dark-maroon"],/\.jsb$|\.jse$|\.dust$/i],
834834
["js-icon",["medium-blue","dark-blue"],/\.jsm$|\.mjs$|\.xsjslib$/i],
835-
["js-icon",["medium-green","dark-green"],/\.jss$/i],
835+
["js-icon",["medium-green","dark-green"],/\.jss$|\.cjs$/i],
836836
["js-icon",["medium-pink","dark-pink"],/\.sjs$/i],
837837
["js-icon",["medium-red","dark-red"],/\.ssjs$|\.jscript$|\.jslib$/i],
838838
["js-icon",["medium-orange","medium-orange"],/\.jspre$/i],

0 commit comments

Comments
 (0)