Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLuke Karrys <luke@lukekarrys.com>2022-03-29 01:55:02 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-03-30 00:51:53 +0300
commitaac01b89caf6336a2eb34d696296303cdadd5c08 (patch)
treec322cc32001ab169bd2e9e335ba7e4a45f31b4aa /docs
parentb48a2bfde3745fa21ea4fc18d6f562fd82f82545 (diff)
deps: @npmcli/template-oss@3.2.1
- `no-shadow` was disabled for the cli and arborist due to the amount of changes required. These should be fixed later. - Manually updated linting in the cli root to match closer to what template-oss does - Included docs to be managed with template-oss. This required adding an empty test for now, with the plan to add real tests later.
Diffstat (limited to 'docs')
-rw-r--r--docs/.eslintrc.js15
-rw-r--r--docs/.gitignore24
-rw-r--r--docs/dockhand.js4
-rw-r--r--docs/package.json43
-rw-r--r--docs/test/index.js3
5 files changed, 83 insertions, 6 deletions
diff --git a/docs/.eslintrc.js b/docs/.eslintrc.js
new file mode 100644
index 000000000..0e8ad0071
--- /dev/null
+++ b/docs/.eslintrc.js
@@ -0,0 +1,15 @@
+/* This file is automatically added by @npmcli/template-oss. Do not edit. */
+
+const { readdirSync: readdir } = require('fs')
+
+const localConfigs = readdir(__dirname)
+ .filter((file) => file.startsWith('.eslintrc.local.'))
+ .map((file) => `./${file}`)
+
+module.exports = {
+ root: true,
+ extends: [
+ '@npmcli',
+ ...localConfigs,
+ ],
+}
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 000000000..27a0f6c59
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,24 @@
+# This file is automatically added by @npmcli/template-oss. Do not edit.
+
+# ignore everything in the root
+/*
+
+# keep these
+!/.eslintrc.local.*
+!**/.gitignore
+!/docs/
+!/tap-snapshots/
+!/test/
+!/map.js
+!/scripts/
+!/README*
+!/LICENSE*
+!/CHANGELOG*
+!/.eslintrc.js
+!/.gitignore
+!/config.json
+!/content/
+!/dockhand.js
+!/nav.yml
+!/package.json
+!/template.html
diff --git a/docs/dockhand.js b/docs/dockhand.js
index 77d3d63c0..d1e64f935 100644
--- a/docs/dockhand.js
+++ b/docs/dockhand.js
@@ -67,8 +67,8 @@ function ensureNavigationComplete (navPaths, fsPaths) {
if (missingNav.length > 0 && missingFs.length > 0) {
message += '\nThe following path(s) exist in nav.yml but are not present on disk:\n\n'
- for (const fs of missingFs) {
- message += ` ${fs}\n`
+ for (const m of missingFs) {
+ message += ` ${m}\n`
}
}
diff --git a/docs/package.json b/docs/package.json
index 0e52bf2d4..85a14a269 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -2,21 +2,56 @@
"name": "docs",
"description": "The npm cli documentation",
"version": "1.0.0",
+ "private": true,
"scripts": {
"build": "node dockhand",
- "eslint": "eslint",
- "lint": "npm run eslint -- ./*.js"
+ "lint": "eslint \"**/*.js\"",
+ "postlint": "template-oss-check",
+ "template-oss-apply": "template-oss-apply --force",
+ "lintfix": "npm run lint -- --fix",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "snap": "tap",
+ "test": "tap",
+ "posttest": "npm run lint"
},
"repository": {
"type": "git",
- "url": "https://github.com/npm/cli",
- "directory": "workspaces/docs"
+ "url": "https://github.com/npm/cli.git",
+ "directory": "docs"
},
"devDependencies": {
"@mdx-js/mdx": "^1.6.22",
+ "@npmcli/eslint-config": "^3.0.1",
+ "@npmcli/template-oss": "3.2.1",
"cmark-gfm": "^0.9.0",
"jsdom": "^18.1.0",
"marked-man": "^0.7.0",
+ "tap": "^15.2.3",
"yaml": "^1.10.0"
+ },
+ "author": "GitHub Inc.",
+ "files": [
+ "content/",
+ "config.json",
+ "dockhand.js",
+ "nav.yml",
+ "template.html"
+ ],
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ },
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "workspaceRepo": false,
+ "distPaths": [
+ "content/",
+ "config.json",
+ "dockhand.js",
+ "nav.yml",
+ "template.html"
+ ],
+ "version": "3.2.1"
}
}
diff --git a/docs/test/index.js b/docs/test/index.js
new file mode 100644
index 000000000..ee0fee2b7
--- /dev/null
+++ b/docs/test/index.js
@@ -0,0 +1,3 @@
+const t = require('tap')
+
+t.ok(1)