From 56ff6ff91d3ac988f9d1201bc0193d267ff4eb80 Mon Sep 17 00:00:00 2001 From: Lars Willighagen Date: Fri, 8 Jul 2022 22:40:57 +0200 Subject: [PATCH] chore: init package --- .github/workflows/test.yml | 22 ++++++++++++++ .gitignore | 4 +++ .nycrc.json | 7 +++++ README.md | 21 ++++++++++++++ babel.config.js | 15 ++++++++++ package.json | 59 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 128 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 .nycrc.json create mode 100644 README.md create mode 100644 babel.config.js create mode 100644 package.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..972d84d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: test + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - run: npm install + - run: npm test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9a4ab7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/lib +/node_modules +/package-lock.json +/.nyc_output \ No newline at end of file diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 0000000..166ecc2 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,7 @@ +{ + "require": [ + "@babel/register" + ], + "sourceMap": false, + "instrument": false +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..48c6419 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +## Install + +```js +npm install @citation-js/plugin-enw +``` + +## Use + +Install the plugin by `require`-ing it: + +```js +require('@citation-js/plugin-enw') +``` + +## Formats + +Formats and other features added by this plugin. + +### Input + +### Output diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..8e1b6e1 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,15 @@ +module.exports = { + presets: [ + ['@babel/env', { + targets: { + node: 8 + } + }] + ], + env: { + coverage: { + plugins: ['istanbul'] + } + }, + comments: false +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..6e8a127 --- /dev/null +++ b/package.json @@ -0,0 +1,59 @@ +{ + "name": "@citation-js/plugin-enw", + "version": "0.0.0", + "description": "Citation.js plugin for .enw files", + "main": "lib/index.js", + "scripts": { + "test": "mocha -r @babel/register test/suite.js", + "babel": "babel src -d lib --copy-files", + "lint": "standard \"src/**/*.js\" \"test/**/*.js\"", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md", + "coverage": "NODE_ENV=coverage nyc npm test", + "report": "nyc report --reporter=lcov > coverage.lcov", + "preversion": "npm run lint && npm run test", + "version": "npm run changelog", + "postversion": "npm run babel" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/citation-js/plugin-enw.git" + }, + "keywords": [ + "EndNote" + ], + "author": "Lars Willighagen (https://larsgw.github.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/citation-js/plugin-enw/issues" + }, + "homepage": "https://github.com/citation-js/plugin-enw#readme", + "engines": { + "node": ">=14" + }, + "files": [ + "/lib" + ], + "standard": { + "parser": "@babel/eslint-parser" + }, + "dependencies": { + "@citation-js/date": "^0.5.0", + "@citation-js/name": "^0.4.2" + }, + "devDependencies": { + "@babel/cli": "^7.12.10", + "@babel/core": "^7.12.10", + "@babel/eslint-parser": "^7.14.3", + "@babel/preset-env": "^7.12.10", + "@babel/register": "^7.12.10", + "babel-plugin-istanbul": "^5.1.0", + "@citation-js/core": "^0.5.1", + "conventional-changelog-cli": "^2.1.0", + "mocha": "^8.4.0", + "nyc": "^15.1.0", + "standard": "^16.0.3" + }, + "peerDependencies": { + "@citation-js/core": "^0.5.1" + } +} \ No newline at end of file