diff --git a/.gitignore b/.gitignore index 8edf893..afd6c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -41,5 +41,4 @@ jspm_packages dist prebuild-src -file-icons src/node_modules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e1494c6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,15 @@ +[submodule "file-icons/atom"] + path = file-icons/atom + url = https://github.com/file-icons/atom.git +[submodule "file-icons/devopicons"] + path = file-icons/devopicons + url = https://github.com/file-icons/DevOpicons.git +[submodule "file-icons/mfixx"] + path = file-icons/mfixx + url = https://github.com/file-icons/MFixx.git +[submodule "file-icons/source"] + path = file-icons/source + url = https://github.com/file-icons/source.git +[submodule "file-icons/font-awesome"] + path = file-icons/font-awesome + url = https://github.com/FortAwesome/Font-Awesome.git diff --git a/file-icons-generator.js b/file-icons-generator.js index e7a7bd0..12eaf12 100644 --- a/file-icons-generator.js +++ b/file-icons-generator.js @@ -6,9 +6,8 @@ // The generated files are pretty-printed. See prebuild-minify.js for automatic, on-CI minification of source files before bundling them in binary release assets. // BEFORE RUNNING THIS SCRIPT: -// - npm run init-file-icons (only *nix supported) -// You can then use `npm run update-file-icons` which will pull the clones and run this script. -// The file-icons folder is in the .gitignore. +// - npm run init-file-icons +// You can then use `npm run update-file-icons` which will pull the git submodules and run this script. const fs = require("fs"); diff --git a/file-icons/atom b/file-icons/atom new file mode 160000 index 0000000..a59be3c --- /dev/null +++ b/file-icons/atom @@ -0,0 +1 @@ +Subproject commit a59be3cdacfbc7d0c153f4642592df71e473a866 diff --git a/file-icons/devopicons b/file-icons/devopicons new file mode 160000 index 0000000..2c2bf2b --- /dev/null +++ b/file-icons/devopicons @@ -0,0 +1 @@ +Subproject commit 2c2bf2bdb6507b8e4bfe695c1d54d639fbfed479 diff --git a/file-icons/font-awesome b/file-icons/font-awesome new file mode 160000 index 0000000..090e614 --- /dev/null +++ b/file-icons/font-awesome @@ -0,0 +1 @@ +Subproject commit 090e6148d3f63a45b40e7cd8679bd4d64e58d75d diff --git a/file-icons/mfixx b/file-icons/mfixx new file mode 160000 index 0000000..9bc4e37 --- /dev/null +++ b/file-icons/mfixx @@ -0,0 +1 @@ +Subproject commit 9bc4e3734898a07d3ff1b452f90446368d6baf12 diff --git a/file-icons/source b/file-icons/source new file mode 160000 index 0000000..ee528da --- /dev/null +++ b/file-icons/source @@ -0,0 +1 @@ +Subproject commit ee528dab19a72e6eaf1c3e1630c57f2201a20a38 diff --git a/package.json b/package.json index cd0d093..5a0b919 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "postbuild-darwin": "rm -R prebuild-src", "postbuild-windows": "rmdir /S /Q prebuild-src", "test": "rsync -a --info=progress2 src/ prebuild-src --exclude node_modules && node prebuild-minify.js && cd prebuild-src && npm install && snyk test && cd .. && rm -R prebuild-src", - "init-file-icons": "rm -Rf file-icons && mkdir file-icons && git clone https://github.com/file-icons/atom.git file-icons/atom && git clone https://github.com/FortAwesome/Font-Awesome.git file-icons/font-awesome && git clone https://github.com/file-icons/source.git file-icons/source && git clone https://github.com/file-icons/DevOpicons.git file-icons/devopicons && git clone https://github.com/file-icons/MFixx.git file-icons/mfixx", - "update-file-icons": "cd file-icons/source && git pull && cd ../devopicons && git pull && cd ../mfixx && git pull && cd ../atom && git pull && cd ../font-awesome && git pull && cd ../.. && node file-icons-generator.js" + "init-file-icons": "git submodule update --init", + "update-file-icons": "git submodule foreach git pull origin master && node file-icons-generator.js" }, "repository": { "type": "git",