Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Initial AppVeyor support, use Lerna's "hoist" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Stone committed Mar 12, 2017
1 parent 054008a commit 36be020
Show file tree
Hide file tree
Showing 82 changed files with 803 additions and 588 deletions.
6 changes: 2 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
environment:
matrix:
- nodejs_version: "4"
- nodejs_version: "6"
nodejs_version: "6"
install:
- ps: Install-Product node $env:nodejs_version
- npm install
test_script:
- npm test
build: off
build: off
5 changes: 3 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"lerna": "2.0.0-beta.37",
"lerna": "2.0.0-beta.38",
"packages": [
"packages/*"
],
"version": "0.5.2"
"version": "0.5.2",
"hoist": true
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"devDependencies": {
"colors": "^1.1.2",
"lerna": "2.0.0-beta.32",
"lerna": "2.0.0-beta.38",
"licensecheck": "^1.3.0",
"moment": "^2.17.1",
"semver": "^5.3.0",
Expand Down
19 changes: 0 additions & 19 deletions packages/composer-admin/.istanbul.yml

This file was deleted.

11 changes: 7 additions & 4 deletions packages/composer-admin/jsdoc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@
"dictionaries": ["jsdoc","closure"]
},
"source": {
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_|(chaincode|node_modules|out|scripts).+"
"include": [
"./lib",
"./index.js"
],
"includePattern": ".+\\.js(doc|x)?$"
},
"plugins": [],
"plugins": ["plugins/markdown"],
"templates": {
"logoFile": "",
"cleverLinks": false,
"monospaceLinks": false,
"dateFormat": "ddd MMM Do YYYY",
"outputSourceFiles": true,
"outputSourcePath": true,
"systemName": "IBM Concerto",
"systemName": "Fabric Composer",
"footer": "",
"copyright": "Copyright IBM Corp. 2016",
"navType": "vertical",
Expand Down
38 changes: 26 additions & 12 deletions packages/composer-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@
"scripts": {
"prepublish": "node ./scripts/tsgen.js",
"pretest": "npm run lint",
"test": "./scripts/api-changelog.sh && mocha --recursive && istanbul cover --include-all-sources --report cobertura --report html ./node_modules/mocha/bin/_mocha -- --recursive",
"posttest": "istanbul check-coverage",
"test": "node ./scripts/api-changelog.js && nyc mocha --recursive",
"lint": "eslint .",
"postlint": "npm run licchk",
"licchk": "license-check",
"postlicchk": "npm run doc",
"doc": "npm run docpub && npm run docpriv",
"docpub": "jsdoc --pedantic --recurse -c jsdoc.conf -t ./node_modules/ink-docstrap/template -a public,undefined -d ./out/public .",
"docpriv": "jsdoc --pedantic --recurse -c jsdoc.conf -t ./node_modules/ink-docstrap/template -a all -d ./out/private .",
"systest": "mocha -t 0 systest && cucumber-js systest"
"doc": "jsdoc --pedantic --recurse -c jsdoc.conf"
},
"repository": {
"type": "git",
Expand All @@ -37,13 +33,12 @@
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"chai-things": "^0.2.0",
"eslint": "^3.5.0",
"ink-docstrap": "^1.3.0",
"istanbul": "^0.4.5",
"jsdoc": "^3.4.1",
"eslint": "^3.17.1",
"jsdoc": "^3.4.3",
"license-check": "^1.1.5",
"mocha": "^3.0.2",
"sinon": "^1.17.6",
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"sinon": "^1.17.7",
"sinon-as-promised": "^4.0.2"
},
"dependencies": {
Expand All @@ -61,5 +56,24 @@
"blocking": true,
"logInfo": false,
"logError": true
},
"nyc": {
"exclude": [
"coverage/**",
"out/**",
"scripts/**",
"systest/**",
"test/**"
],
"reporter": [
"text-summary",
"html"
],
"all": true,
"check-coverage": true,
"statements": 100,
"branches": 100,
"functions": 100,
"lines": 100
}
}
56 changes: 56 additions & 0 deletions packages/composer-admin/scripts/api-changelog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

const child_process = require('child_process');
const fs = require('fs');
const path = require('path');

const parentDirectory = path.resolve(__dirname, '..');
const apiSignatureFile = path.resolve(parentDirectory, 'api.txt');

if (fs.existsSync(apiSignatureFile)) {
fs.unlinkSync(apiSignatureFile);
}

return Promise.resolve()
.then(() => {
return new Promise((resolve, reject) => {
const parsejs = require.resolve('composer-common/lib/codegen/parsejs.js');
const command = child_process.fork(parsejs, ['--format', 'APISignature', '--inputDir', path.resolve(parentDirectory, 'lib'), '--outputDir', parentDirectory]);
command.on('exit', (code) => {
if (code !== 0) {
process.exit(code);
}
resolve();
});
});
})
.then(() => {
return new Promise((resolve, reject) => {
const changelog = require.resolve('composer-common/lib/tools/changelog.js');
const command = child_process.fork(changelog, ['--api', apiSignatureFile, '--changelog', path.resolve(parentDirectory, 'changelog.txt')]);
command.on('exit', (code) => {
if (code !== 0) {
process.exit(code);
}
resolve();
});
});
})
.catch((error) => {
console.error(error);
process.exit(1);
});
20 changes: 0 additions & 20 deletions packages/composer-admin/scripts/api-changelog.sh

This file was deleted.

Empty file modified packages/composer-admin/scripts/tsgen.js
100644 → 100755
Empty file.
15 changes: 0 additions & 15 deletions packages/composer-cli/.istanbul.yml

This file was deleted.

33 changes: 25 additions & 8 deletions packages/composer-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"lint": "eslint .",
"postlint": "npm run licchk",
"licchk": "license-check",
"test": "mocha --recursive && istanbul cover --include-all-sources --report cobertura --report html ./node_modules/mocha/bin/_mocha -- --recursive",
"posttest": "istanbul check-coverage"
"test": "nyc mocha --recursive"
},
"repository": {
"type": "git",
Expand All @@ -30,22 +29,21 @@
"author": "Fabric Composer",
"license": "Apache-2.0",
"devDependencies": {
"eslint": "^3.5.0",
"license-check": "^1.1.5",
"mocha": "^3.2.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"chai-things": "^0.2.0",
"istanbul": "^0.4.5",
"sinon": "^1.17.6",
"eslint": "^3.17.1",
"license-check": "^1.1.5",
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"sinon": "^1.17.7",
"sinon-as-promised": "^4.0.2"
},
"dependencies": {
"composer-admin": "^0.5.2",
"composer-client": "^0.5.2",
"composer-common": "^0.5.2",
"homedir": "^0.6.0",
"moment": "^2.17.1",
"npm-paths": "^0.1.3",
"nunjucks": "^3.0.0",
"prettyjson": "^1.2.1",
Expand All @@ -65,5 +63,24 @@
"blocking": true,
"logInfo": false,
"logError": true
},
"nyc": {
"exclude": [
"coverage/**",
"out/**",
"scripts/**",
"systest/**",
"test/**"
],
"reporter": [
"text-summary",
"html"
],
"all": true,
"check-coverage": true,
"statements": 60,
"branches": 50,
"functions": 58,
"lines": 60
}
}
20 changes: 0 additions & 20 deletions packages/composer-cli/test.js

This file was deleted.

10 changes: 0 additions & 10 deletions packages/composer-client/.istanbul.yml

This file was deleted.

11 changes: 6 additions & 5 deletions packages/composer-client/jsdoc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"dictionaries": ["jsdoc","closure"]
},
"source": {
"includePattern": ".+\\.js(doc|x)?$",
"include": [
"./lib"
]
"./lib",
"./index.js"
],
"includePattern": ".+\\.js(doc|x)?$"
},
"plugins": [],
"plugins": ["plugins/markdown"],
"templates": {
"logoFile": "",
"cleverLinks": false,
"monospaceLinks": false,
"dateFormat": "ddd MMM Do YYYY",
"outputSourceFiles": true,
"outputSourcePath": true,
"systemName": "IBM Concerto",
"systemName": "Fabric Composer",
"footer": "",
"copyright": "Copyright IBM Corp. 2016",
"navType": "vertical",
Expand Down
Loading

0 comments on commit 36be020

Please sign in to comment.