Skip to content

Commit

Permalink
feat(baz): scaffolded new package
Browse files Browse the repository at this point in the history
using @form8ion/add-package-to-monorepo
  • Loading branch information
travi committed Dec 9, 2020
1 parent 6d77f7a commit 642e6b1
Show file tree
Hide file tree
Showing 15 changed files with 7,719 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/baz/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"presets":["@travi"],"ignore":["./lib/"],"env":{"test":{"plugins":["istanbul"]}}}
2 changes: 2 additions & 0 deletions packages/baz/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/lib/
/coverage/
4 changes: 4 additions & 0 deletions packages/baz/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root: true
extends:
- '@travi'
- '@travi/mocha'
1 change: 1 addition & 0 deletions packages/baz/.lockfile-lintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path":"package-lock.json","type":"npm","validate-https":true,"allowed-hosts":["npm"]}
1 change: 1 addition & 0 deletions packages/baz/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"ui":"tdd","require":["@babel/register","./test/mocha-setup.js"]}
1 change: 1 addition & 0 deletions packages/baz/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update-notifier=false
1 change: 1 addition & 0 deletions packages/baz/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"extends":"@istanbuljs/nyc-config-babel","reporter":["lcov","text-summary","html"],"exclude":["src/**/*-test.js","test/","thirdparty-wrappers/","vendor/"]}
14 changes: 14 additions & 0 deletions packages/baz/.remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// https://github.com/remarkjs/remark/tree/master/packages/remark-stringify#options
exports.settings = {
listItemIndent: 1,
emphasis: '_',
strong: '_',
bullet: '*',
incrementListMarker: false
};

exports.plugins = [
'remark-preset-lint-travi',
['remark-toc', {tight: true}],
['remark-usage', {heading: 'example'}]
];
3 changes: 3 additions & 0 deletions packages/baz/example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// remark-usage-ignore-next
/* eslint-disable-next-line no-unused-vars */
import baz from './lib/index.cjs';
7,596 changes: 7,596 additions & 0 deletions packages/baz/package-lock.json

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions packages/baz/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "baz",
"license": "MIT",
"version": "0.0.0-semantically-released",
"files": [
"example.js",
"lib/"
],
"publishConfig": {
"access": "public"
},
"runkitExampleFilename": "./example.js",
"main": "lib/index.cjs.js",
"module": "lib/index.es.js",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/travi-test/lerna-playground.git",
"directory": "packages/baz"
},
"bugs": "https://github.com/travi-test/lerna-playground/issues",
"homepage": "https://npm.im/baz",
"author": "Matt Travi <[email protected]> (https://matt.travi.org/)",
"scripts": {
"test": "npm-run-all --print-label build --parallel lint:* --parallel test:*",
"lint:lockfile": "lockfile-lint",
"lint:js": "eslint . --cache",
"lint:js:fix": "run-s lint:js -- --fix",
"lint:md": "remark . --frail",
"generate:md": "remark . --output",
"pregenerate:md": "run-s build",
"lint:sensitive": "ban",
"clean": "rimraf ./lib",
"prebuild": "run-s clean",
"build": "npm-run-all --print-label --parallel build:*",
"build:js": "rollup --config",
"watch": "run-s 'build:js -- --watch'",
"prepack": "run-s build",
"test:unit": "cross-env NODE_ENV=test nyc run-s test:unit:base",
"coverage:report": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"test:unit:base": "DEBUG=any mocha 'src/**/*-test.js'",
"lint:peer": "npm ls >/dev/null"
},
"devDependencies": {
"@babel/register": "7.12.1",
"@istanbuljs/nyc-config-babel": "3.0.0",
"@travi/any": "2.0.15",
"@travi/babel-preset": "3.0.36",
"@travi/eslint-config": "1.0.56",
"@travi/eslint-config-mocha": "1.0.8",
"babel-plugin-istanbul": "6.0.0",
"ban-sensitive-files": "1.9.14",
"chai": "4.2.0",
"codecov": "3.8.1",
"cross-env": "7.0.3",
"lockfile-lint": "4.3.7",
"mocha": "8.2.1",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"remark-cli": "9.0.0",
"remark-preset-lint-travi": "1.3.11",
"remark-toc": "7.0.0",
"remark-usage": "9.0.0",
"rimraf": "3.0.2",
"rollup": "2.34.2",
"rollup-plugin-auto-external": "2.0.0",
"sinon": "9.2.1"
}
}
11 changes: 11 additions & 0 deletions packages/baz/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint import/no-extraneous-dependencies: ['error', {'devDependencies': true}] */
import autoExternal from 'rollup-plugin-auto-external';

export default {
input: 'src/index.js',
plugins: [autoExternal()],
output: [
{file: 'lib/index.cjs.js', format: 'cjs', sourcemap: true},
{file: 'lib/index.es.js', format: 'es', sourcemap: true}
]
};
7 changes: 7 additions & 0 deletions packages/baz/src/canary-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {assert} from 'chai';

suite('canary test', () => {
test('that mocha is wired together correctly', () => {
assert.isTrue(true);
});
});
Empty file added packages/baz/src/index.js
Empty file.
8 changes: 8 additions & 0 deletions packages/baz/test/mocha-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import sinon from 'sinon';
import chai from 'chai';

sinon.assert.expose(chai.assert, {prefix: ''});

process.on('unhandledRejection', reason => {
throw reason;
});

0 comments on commit 642e6b1

Please sign in to comment.