-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed emoji-data as peer dep, too big for npm, and also github dep …
…not working well if package.json exists, downloading postinstall
- Loading branch information
1 parent
c263ed4
commit 360e11d
Showing
10 changed files
with
58 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
lib/ | ||
emoji-data/ | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
src/ | ||
bin/ | ||
!bin/install.js | ||
resources/ | ||
dist/ | ||
example/ | ||
emoji-data/ | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"ecmaFeatures": { | ||
"modules": false | ||
}, | ||
"rules": { | ||
"no-console": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const fs = require('fs'); | ||
const ghdownload = require('github-download'); | ||
const path = require('path'); | ||
|
||
const emojiDataPackageLocation = path.join(__dirname, '..', 'emoji-data'); | ||
|
||
fs.access(emojiDataPackageLocation, fs.F_OK, err => { | ||
if (err) { | ||
// Directory doesn't exist, download | ||
ghdownload({ | ||
user: 'iamcal', | ||
repo: 'emoji-data', | ||
ref: 'master' // Waiting for pull request and then change to 'v2.4.1' | ||
}, emojiDataPackageLocation) | ||
.on('dir', dir => { | ||
console.log(dir); | ||
}) | ||
.on('file', file => { | ||
console.log(file); | ||
}) | ||
.on('zip', zipUrl => { //only emitted if Github API limit is reached and the zip file is downloaded | ||
console.log(zipUrl); | ||
}) | ||
.on('error', err => { | ||
console.log(err); | ||
}) | ||
.on('end', () => { | ||
console.log('Finished downloading emoji-data'); | ||
}); | ||
} else { | ||
console.log('emoji-data already downloaded, skipping download'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters