Skip to content

Commit

Permalink
ignore: move plugin packages to their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Sep 14, 2018
1 parent 80133d2 commit 9777540
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 29 deletions.
2 changes: 1 addition & 1 deletion generators/app/package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const _ = require('lodash');
const generatorVersion = require('./generator-version');
const pkg = require('../../package.json');
const pkg = require('../../plugin/package.json');

pkg.optionalDependencies = pkg.optionalDependencies || {};
pkg.devDependencies = pkg.devDependencies || {};
Expand Down
10 changes: 10 additions & 0 deletions greenkeeper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"groups": {
"generator": {
"packages": ["./package.json"]
},
"plugin": {
"packages": ["./plugin/package.json"]
}
}
}
15 changes: 1 addition & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,7 @@
"videojs-generator-verify": "~1.0.4",
"videojs-standard": "^7.1.0",
"yeoman-assert": "^3.1.1",
"yeoman-test": "^2.0.0",
"jsdoc": "https://github.com/BrandonOCasey/jsdoc#feat/plugin-from-cli"
},
"optionalDependencies": {
"global": "^4.3.2",
"karma": "^3.0.0",
"postcss-cli": "^6.0.0",
"rollup": "^0.65.0",
"sinon": "^6.1.5",
"video.js": "^6 || ^7",
"videojs-generate-karma-config": "~3.0.0",
"videojs-generate-postcss-config": "~2.0.1",
"videojs-generate-rollup-config": "~2.2.0",
"videojs-languages": "^1.0.0"
"yeoman-test": "^2.0.0"
},
"husky": {
"hooks": {
Expand Down
37 changes: 37 additions & 0 deletions plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "plugin-pkg-template",
"version": "0.0.0",
"description": "",
"main": "",
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"global": "^4.3.2",
"video.js": "^6 || ^7"
},
"devDependencies": {
"conventional-changelog-cli": "^2.0.1",
"conventional-changelog-videojs": "^3.0.0",
"doctoc": "^1.3.1",
"husky": "^1.0.0-rc.13",
"in-publish": "^2.0.0",
"jsdoc": "https://github.com/BrandonOCasey/jsdoc#feat/plugin-from-cli",
"karma": "^3.0.0",
"lint-staged": "^7.2.2",
"not-prerelease": "^1.0.1",
"npm-merge-driver-install": "^1.0.0",
"npm-run-all": "^4.1.3",
"postcss-cli": "^6.0.0",
"rollup": "^0.65.0",
"shx": "^0.3.2",
"sinon": "^6.1.5",
"videojs-generate-karma-config": "~3.0.0",
"videojs-generate-postcss-config": "~2.0.1",
"videojs-generate-rollup-config": "~2.2.0",
"videojs-generator-verify": "~1.0.4",
"videojs-languages": "^1.0.0",
"videojs-standard": "^7.1.0"
}
}
19 changes: 5 additions & 14 deletions test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const fs = require('fs');
const libs = require('./libs');
const packageJSON = require('../generators/app/package-json');
const generatorVersion = require('../generators/app/generator-version');
const generatorPkg = require('../package.json');
const pluginPkg = require('../plugin/package.json');

describe('videojs-plugin:app', function() {
const scripts = [
Expand Down Expand Up @@ -207,21 +207,12 @@ describe('videojs-plugin:app', function() {
libs.allAreNonEmpty(this.pkg.devDependencies, Object.keys(this.pkg.devDependencies));
});

it('(generator) has no extra optional deps', function() {
const optionalPackages = Object.keys(generatorPkg.optionalDependencies);
const packages = Object.keys(this.pkg.dependencies)
.concat(Object.keys(this.pkg.devDependencies));
let i = optionalPackages.length;
it('should have the same deps as the template package', function() {

while (i--) {
const pkg = optionalPackages[i];
const templatePackages = Object.keys(pluginPkg.dependencies).concat(Object.keys(pluginPkg.devDependencies));
const packages = Object.keys(this.pkg.dependencies).concat(Object.keys(this.pkg.devDependencies));

if (packages.indexOf(pkg) !== -1) {
optionalPackages.splice(i, 1);
}
}

assert.deepEqual(optionalPackages, [], 'there are no extra packages in optional dependencies');
assert.deepEqual(templatePackages, packages, 'have the same packages');
});
});

Expand Down

0 comments on commit 9777540

Please sign in to comment.