Skip to content

Commit

Permalink
chore: setup instructions md file
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Apr 21, 2020
1 parent 992aaf1 commit 782bafa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Congratulations! You have configured `@adonisjs/shield` package successfully. Just make sure to add the following middleware inside the `start/kernel.ts` file.

```ts
Server.middleware.register([
'Adonis/Core/BodyParserMiddleware',
'Adonis/Addons/ShieldMiddleware',
'...',
])
```

**The middleware must be right after `BodyParserMiddleware`.**
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build/src",
"build/templates",
"build/standalone.d.ts",
"build/standalone.js"
"build/standalone.js",
"build/instructions.md"
],
"typings": "./build/adonis-typings/index.d.ts",
"scripts": {
Expand All @@ -19,7 +20,8 @@
"prepublishOnly": "npm run build",
"lint": "eslint . --ext=.ts",
"clean": "del build",
"copy:files": "copyfiles \"templates/**/*.txt\" build",
"copy:files": "copyfiles \"templates/**/*.txt\" build && npm run copy:instructions_md",
"copy:instructions_md": "copyfiles \"instructions.md\" build",
"compile": "npm run lint && npm run clean && tsc && npm run copy:files",
"build": "npm run compile",
"commit": "git-cz",
Expand Down Expand Up @@ -100,6 +102,7 @@
}
},
"adonisjs": {
"instructionsMd": "./build/instructions.md",
"types": "@adonisjs/shield",
"providers": [
"@adonisjs/shield"
Expand Down

0 comments on commit 782bafa

Please sign in to comment.