Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions extensions/laravel-docs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"root": true,
"env": {
"es2020": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"]
}
4 changes: 4 additions & 0 deletions extensions/laravel-docs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"singleQuote": false
}
29 changes: 29 additions & 0 deletions extensions/laravel-docs/README-DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Laravel version updates

When a new laravel version comes out you should add this new version to the dropdown in the package.json

Then execute the following script on the documentation page of that version E.g. https://laravel.com/docs/8.x:

```js
let list = {};
document
.querySelector(".docs_sidebar ul")
.querySelectorAll(":scope >li")
.forEach((element) => {
let listHeader = element.querySelector(":scope > h2");
let listItems = element.querySelectorAll(":scope > ul > li > a");
if (!listHeader || !listItems) return;

list[listHeader.innerText] = [...listItems].map((anchor) => {
return { title: anchor.innerText, url: anchor.href };
});
});

console.log(JSON.stringify(list, null, 2));
```

This will build you the file you should save in `src/documentation`

After creating the file add it to the list of documentation in index.tsx

It is also good practice to bring documentation/master.json up-to-date with https://laravel.com/docs/master
Binary file added extensions/laravel-docs/assets/command-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading