1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-11-19 02:14:30 +00:00

Added fs-extra for creation of a dist and deploy procedure

This commit is contained in:
Alan Velasco 2019-06-25 19:55:51 -07:00
parent feee6da8b1
commit 5ecf25d10e
4 changed files with 28 additions and 5 deletions

View File

@ -33,12 +33,14 @@
"module": "./dist/twemoji.esm.js", "module": "./dist/twemoji.esm.js",
"unpkg": "./dist/twemoji.min.js", "unpkg": "./dist/twemoji.min.js",
"scripts": { "scripts": {
"version": "yarn version",
"build": "./scripts/generate", "build": "./scripts/generate",
"test": "phantomjs ./src/test/testrunner.js", "test": "phantomjs ./src/test/testrunner.js",
"deploy": "./scripts/deploy.sh gh-pages-new 12.0.4", "deploy": "./scripts/deploy.sh gh-pages 12.0.4",
"prepublish": "run-s version build test deploy" "prepublish": "run-s version build test deploy"
}, },
"dependencies": { "dependencies": {
"fs-extra": "^8.0.1",
"twemoji-parser": "12.0.0" "twemoji-parser": "12.0.0"
}, },
"files": [ "files": [

View File

@ -4,7 +4,7 @@
https://github.com/twitter/twemoji/blob/gh-pages/LICENSE https://github.com/twitter/twemoji/blob/gh-pages/LICENSE
*/ */
const fs = require('fs'); const fs = require('fs-extra');
const path = require('path'); const path = require('path');
const { spawnSync } = require('child_process'); const { spawnSync } = require('child_process');
@ -56,5 +56,5 @@ fs.writeFileSync(distFile('twemoji.min.js'), `${copyright}\n${minifiedContents}`
fs.writeFileSync(distFile('twemoji.esm.js'), `${copyright}\n${minifiedContents}\nexport default twemoji;`); fs.writeFileSync(distFile('twemoji.esm.js'), `${copyright}\n${minifiedContents}\nexport default twemoji;`);
// Copy the png assets and svgs to the dist folder // Copy the png assets and svgs to the dist folder
fs.copyFileSync(file('assets/svg'), distFile('svg')); fs.copySync(file('assets/svg'), distFile('svg'));
fs.copyFileSync(file('assets/72x72'), distFile('72x72')); fs.copySync(file('assets/72x72'), distFile('72x72'));

View File

@ -4,7 +4,7 @@ ROOT=$(
cd $(dirname $0)/.. cd $(dirname $0)/..
/bin/pwd /bin/pwd
) )
OUTPUT="$ROOT/dist/" OUT="$ROOT/dist/"
PUBLISH_BRANCH=$1 PUBLISH_BRANCH=$1
VERSION=$2 VERSION=$2

View File

@ -328,6 +328,15 @@ fs-extra@^1.0.0:
jsonfile "^2.1.0" jsonfile "^2.1.0"
klaw "^1.0.0" klaw "^1.0.0"
fs-extra@^8.0.1:
version "8.0.1"
resolved "https://artifactory.twitter.biz:443/api/npm/js-virtual/fs-extra/-/fs-extra-8.0.1.tgz#90294081f978b1f182f347a440a209154344285b"
integrity sha1-kClAgfl4sfGC80ekQKIJFUNEKFs=
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"
function-bind@^1.0.2, function-bind@^1.1.1: function-bind@^1.0.2, function-bind@^1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
@ -493,6 +502,13 @@ jsonfile@^2.1.0:
optionalDependencies: optionalDependencies:
graceful-fs "^4.1.6" graceful-fs "^4.1.6"
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://artifactory.twitter.biz:443/api/npm/js-virtual/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
optionalDependencies:
graceful-fs "^4.1.6"
jsonify@~0.0.0: jsonify@~0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
@ -965,6 +981,11 @@ uglify-to-browserify@~1.0.0:
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc=
universalify@^0.1.0:
version "0.1.2"
resolved "https://artifactory.twitter.biz:443/api/npm/js-virtual/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=
uri-js@^4.2.2: uri-js@^4.2.2:
version "4.2.2" version "4.2.2"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"