Skip to content

Commit

Permalink
Update to publish under @PDF-Lib scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopding committed Dec 19, 2018
1 parent cc4b9b3 commit 873b05d
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 14 deletions.
12 changes: 12 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
src/
test/
.gitignore
.nycrc
.travis.yml
babel.config.js
esdoc.json
index.html
Makefile.js
rollup.config.js
stats.html
yarn.lock
30 changes: 30 additions & 0 deletions Makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ require('shelljs/make');
config.fatal = true;
config.verbose = true;

const { execFileSync } = require('child_process');

const packageJson = require('./package.json');

target.all = () => {
target.clean();
target.generateTrieJson();
Expand Down Expand Up @@ -61,3 +65,29 @@ target.clean = () => {
'src/opentype/shapers/use.json',
);
};

/* =============================== Release ================================== */

target.releaseNext = () => {
const version = `${packageJson.version}@next`;
console.log('Releasing version', version);

target.all();

execFileSync('yarn', ['publish', '--tag', 'next', '--access', 'public'], { stdio: 'inherit' });
};

target.releaseLatest = async () => {
const currentBranch = exec('git rev-parse --abbrev-ref HEAD').stdout.trim();
if (currentBranch !== 'master') {
console.error('Must be on `master` branch to cut an @latest release.');
return;
}

const version = `${packageJson.version}@latest`;
console.log('Releasing version', version);

target.all();

execFileSync('yarn', ['publish', '--tag', 'latest', '--access', 'public'], { stdio: 'inherit' });
};
39 changes: 25 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fontkit",
"version": "1.7.7",
"name": "@pdf-lib/fontkit",
"version": "0.0.0",
"description": "An advanced font engine for Node and the browser",
"main": "dist/fontkit.umd.js",
"unpkg": "dist/fontkit.umd.min.js",
Expand All @@ -12,17 +12,6 @@
"test": "mocha",
"coverage": "cross-env BABEL_ENV=cover nyc mocha"
},
"author": "Devon Govett <[email protected]>",
"license": "MIT",
"keywords": [
"opentype",
"font",
"typography",
"subset",
"emoji",
"glyph",
"layout"
],
"dependencies": {
"@pdf-lib/brotli": "^0.0.0",
"@pdf-lib/restructure": "^0.0.0",
Expand Down Expand Up @@ -61,5 +50,27 @@
"rollup-plugin-terser": "^3.0.0",
"rollup-plugin-visualizer": "^0.9.2",
"shelljs": "^0.8.3"
}
},
"repository": {
"type": "git",
"url": "git://github.com/Hopding/fontkit.git"
},
"keywords": [
"opentype",
"font",
"typography",
"subset",
"emoji",
"glyph",
"layout"
],
"author": "Andrew Dillon <[email protected]>",
"contributors": [
"Devon Govett <[email protected]> (http://badassjs.com/)"
],
"bugs": {
"url": "https://github.com/Hopding/fontkit/issues"
},
"license": "MIT",
"homepage": "https://github.com/Hopding/fontkit"
}

0 comments on commit 873b05d

Please sign in to comment.