Skip to content

Commit

Permalink
[BUGFIX docs] ensure we publish docs
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Jul 18, 2019
1 parent f66ed45 commit 7785d8a
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 13 deletions.
14 changes: 14 additions & 0 deletions bin/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,20 @@ function packAllPackages() {
const pkgInfo = require(pkgPath);
if (pkgInfo.private !== true) {
// will pack into the project root directory
// due to an issue where npm does not run prepublishOnly for pack, we run it here
// however this is also a timing bug, as typically it would be run *after* prepublish
// and prepare and now it is run *before*
// we do not use `prepublish` or `prepare` so this should be fine for now.
// https://docs.npmjs.com/misc/scripts
// https://github.com/npm/npm/issues/15363
if (pkgInfo.scripts) {
if (pkgInfo.scripts.prepublishOnly) {
if (pkgInfo.scripts.prepublish || pkgInfo.scripts.prepare) {
console.log(`⚠️ ` + chalk.grey(`${pkgInfo.name} has both a 'prepublishOnly' and either 'prepare' or 'publish' scripts. Running prepublishOnly manually before instead of after publish and prepare. See https://github.com/npm/npm/issues/15363`));
}
execWithLog(`cd ${pkgDir} && npm run prepublishOnly`);
}
}
execWithLog(`npm pack ${pkgDir}`);
}
});
Expand Down
1 change: 1 addition & 0 deletions packages/-ember-data/.npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# compiled output
/dist/
/dist/**/*
/tmp/

# dependencies
Expand Down
3 changes: 1 addition & 2 deletions packages/-ember-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"test:production": "ember test -e production",
"test:optional-features": "ember test",
"test:try-one": "ember try:one",
"prepublishOnly": "ember build --environment=production && ember ts:precompile",
"postpublish": "ember ts:clean"
"prepublishOnly": "ember build --environment=production"
},
"author": "",
"license": "MIT",
Expand Down
6 changes: 5 additions & 1 deletion packages/adapter/.npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# compiled output
/dist/
/dist/**/*
/tmp/

# dependencies
Expand Down Expand Up @@ -31,4 +32,7 @@
/package.json.ember-try

# ember-data
/node-tests
/node-tests

# whitelist yuidoc's data.json for api docs generation
!/dist/docs/data.json
3 changes: 1 addition & 2 deletions packages/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"test": "ember test",
"test:all": "ember try:each",
"test:node": "mocha",
"prepublishOnly": "ember build --environment=production && ember ts:precompile",
"postpublish": "ember ts:clean"
"prepublishOnly": "ember build --environment=production"
},
"dependencies": {
"@ember-data/-build-infra": "^3.12.0-canary.2",
Expand Down
6 changes: 5 additions & 1 deletion packages/model/.npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# compiled output
/dist/
/dist/**/*
/tmp/

# dependencies
Expand Down Expand Up @@ -31,4 +32,7 @@
/package.json.ember-try

# ember-data
/node-tests
/node-tests

# whitelist yuidoc's data.json for api docs generation
!/dist/docs/data.json
3 changes: 1 addition & 2 deletions packages/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"test": "ember test",
"test:all": "ember try:each",
"test:node": "mocha",
"prepublishOnly": "ember build --environment=production && ember ts:precompile",
"postpublish": "ember ts:clean"
"prepublishOnly": "ember build --environment=production"
},
"dependencies": {
"@ember-data/-build-infra": "^3.12.0-canary.2",
Expand Down
6 changes: 5 additions & 1 deletion packages/serializer/.npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# compiled output
/dist/
/dist/**/*
/tmp/

# dependencies
Expand Down Expand Up @@ -31,4 +32,7 @@
/package.json.ember-try

# ember-data
/node-tests
/node-tests

# whitelist yuidoc's data.json for api docs generation
!/dist/docs/data.json
3 changes: 1 addition & 2 deletions packages/serializer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"test": "ember test",
"test:all": "ember try:each",
"test:node": "mocha",
"prepublishOnly": "ember build --environment=production && ember ts:precompile",
"postpublish": "ember ts:clean"
"prepublishOnly": "ember build --environment=production"
},
"dependencies": {
"@ember-data/-build-infra": "^3.12.0-canary.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/store/.npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# compiled output
/dist/
/dist/**/*
/tmp/

# dependencies
Expand Down Expand Up @@ -29,3 +30,6 @@
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

# whitelist yuidoc's data.json for api docs generation
!/dist/docs/data.json
3 changes: 1 addition & 2 deletions packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"start": "ember serve",
"test": "ember test",
"test:all": "ember try:each",
"prepublishOnly": "ember build --environment=production && ember ts:precompile",
"postpublish": "ember ts:clean"
"prepublishOnly": "ember build --environment=production"
},
"dependencies": {
"@ember-data/-build-infra": "^3.12.0-canary.2",
Expand Down

0 comments on commit 7785d8a

Please sign in to comment.