chore: 6.x build updates (#4228)
This runs the changelog generation on versioning automatically, if it isn't a pre-release. It also runs the build and API docs generation on publish and makes sure that the generated API docs are in the published package.
Esse commit está contido em:
@@ -3,3 +3,4 @@
|
|||||||
!dist/**
|
!dist/**
|
||||||
!es5/**
|
!es5/**
|
||||||
!src/css/**
|
!src/css/**
|
||||||
|
!docs/api/**
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
var safeParse = require("safe-json-parse/tuple");
|
||||||
|
var tuple = safeParse(process.env.npm_config_argv);
|
||||||
|
var npm_config_argv = tuple[1]
|
||||||
|
|
||||||
|
if (tuple[0]) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var sh = require('shelljs');
|
||||||
|
var version = process.env.npm_package_version;
|
||||||
|
var prereleaseType = npm_config_argv['remain'][0];
|
||||||
|
var approvedTypes = {
|
||||||
|
'major': 1,
|
||||||
|
'minor': 1,
|
||||||
|
'patch': 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prereleaseType in approvedTypes) {
|
||||||
|
sh.exec('npm run changelog');
|
||||||
|
}
|
||||||
+4
-2
@@ -32,8 +32,9 @@
|
|||||||
"docs:lint": "remark -- './**/*.md'",
|
"docs:lint": "remark -- './**/*.md'",
|
||||||
"docs:fix": "remark --output -- './**/*.md'",
|
"docs:fix": "remark --output -- './**/*.md'",
|
||||||
"babel": "babel src/js -d es5",
|
"babel": "babel src/js -d es5",
|
||||||
"prepublish": "not-in-install && npm run docs:api || in-install",
|
"prepublish": "not-in-install && run-p docs:api build || in-install",
|
||||||
"prepush": "npm run lint -- --errors"
|
"prepush": "npm run lint -- --errors",
|
||||||
|
"version": "node build/version.js && git add CHANGELOG.md"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -111,6 +112,7 @@
|
|||||||
"lodash": "^4.16.6",
|
"lodash": "^4.16.6",
|
||||||
"markdown-table": "^1.0.0",
|
"markdown-table": "^1.0.0",
|
||||||
"npm-run": "^4.1.0",
|
"npm-run": "^4.1.0",
|
||||||
|
"npm-run-all": "^4.0.2",
|
||||||
"proxyquireify": "^3.0.0",
|
"proxyquireify": "^3.0.0",
|
||||||
"qunitjs": "1.23.1",
|
"qunitjs": "1.23.1",
|
||||||
"remark-cli": "^3.0.0",
|
"remark-cli": "^3.0.0",
|
||||||
|
|||||||
Referência em uma Nova Issue
Bloquear um usuário