mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-16 08:12:41 +02:00
modified
This commit is contained in:
-9
@@ -1,9 +0,0 @@
|
||||
# The MIT License
|
||||
|
||||
Copyright 2021 Harminder Virk, contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
<div align="center"><img src="https://res.cloudinary.com/adonis-js/image/upload/v1620150474/edge-banner_tzmnox.jpg" width="600px"></div>
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table of contents
|
||||
|
||||
- [Edge Supercharged](#edge-supercharged)
|
||||
- [Maintainers](#maintainers)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# Edge Supercharged
|
||||
> Supercharge your components and use them as edge tags
|
||||
|
||||
[![gh-workflow-image]][gh-workflow-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] [![synk-image]][synk-url]
|
||||
|
||||
Edge supercharged enables you to use your components as edge tags. It began by scanning all the templates stored inside the `./components` directory of your view root and make them available as tags.
|
||||
|
||||
## Usage
|
||||
Install the package from npm registry as follows
|
||||
|
||||
```sh
|
||||
npm i edge-supercharged
|
||||
|
||||
# yarn
|
||||
yarn add edge-supercharged
|
||||
```
|
||||
|
||||
And use it as follows
|
||||
|
||||
```ts
|
||||
const edge = require('edge.js').default
|
||||
const { Supercharged } = require('edge-supercharged')
|
||||
|
||||
const supercharged = new Supercharged()
|
||||
edge.use(supercharged.wire, {
|
||||
recurring: process.env.NODE_ENV === 'development'
|
||||
})
|
||||
```
|
||||
|
||||
During development, you must set the `recurring` option to true, so that edge reapplies the plugin on each render call. This will allow `edge-supercharged` to re-discover the components from the filesystem.
|
||||
|
||||
## Creating components
|
||||
|
||||
The components must live inside the `./components` directory relative to the views directory and then you can reference your components as tags.
|
||||
|
||||
Instead of using the component as follows
|
||||
|
||||
```edge
|
||||
@component('button', { type: 'submit' })
|
||||
<span> Submit form </span>
|
||||
@end
|
||||
```
|
||||
|
||||
You can use it as follows:
|
||||
|
||||
```edge
|
||||
@button({ type: 'submit' })
|
||||
<span> Submit form </span>
|
||||
@end
|
||||
```
|
||||
|
||||
#### [Learn more ➞](https://docs.adonisjs.com/guides/views/components#components-as-tags)
|
||||
|
||||
[gh-workflow-image]: https://img.shields.io/github/workflow/status/edge-js/edge-supercharged/test?style=for-the-badge
|
||||
[gh-workflow-url]: https://github.com/edge-js/edge-supercharged/actions/workflows/test.yml "Github action"
|
||||
|
||||
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
||||
[typescript-url]: "typescript"
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/edge-supercharged.svg?style=for-the-badge&logo=npm
|
||||
[npm-url]: https://npmjs.org/package/edge-supercharged "npm"
|
||||
|
||||
[license-image]: https://img.shields.io/npm/l/edge-supercharged?color=blueviolet&style=for-the-badge
|
||||
[license-url]: LICENSE.md "license"
|
||||
|
||||
[synk-image]: https://img.shields.io/snyk/vulnerabilities/github/edge-js/edge-supercharged?label=Synk%20Vulnerabilities&style=for-the-badge
|
||||
[synk-url]: https://snyk.io/test/github/edge-js/edge-supercharged?targetFile=package.json "synk"
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"name": "edge-supercharged",
|
||||
"version": "3.1.1",
|
||||
"description": "Supercharged components for Edge template engine",
|
||||
"scripts": {
|
||||
"mrm": "mrm --preset=@adonisjs/mrm-preset",
|
||||
"pretest": "npm run lint",
|
||||
"test": "node japaFile.js",
|
||||
"clean": "del build",
|
||||
"compile": "npm run lint && npm run clean && tsc",
|
||||
"build": "npm run compile",
|
||||
"prepublishOnly": "npm run build",
|
||||
"lint": "eslint . --ext=.ts",
|
||||
"format": "prettier --write .",
|
||||
"commit": "git-cz",
|
||||
"release": "np",
|
||||
"version": "npm run build",
|
||||
"sync-labels": "github-label-sync --labels ./node_modules/@adonisjs/mrm-preset/gh-labels.json edge-js/edge-supercharged"
|
||||
},
|
||||
"keywords": [
|
||||
"edge"
|
||||
],
|
||||
"author": "virk",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@adonisjs/mrm-preset": "^4.1.0",
|
||||
"@adonisjs/require-ts": "^2.0.4",
|
||||
"@poppinss/dev-utils": "^1.1.4",
|
||||
"@types/node": "^15.6.1",
|
||||
"del-cli": "^3.0.1",
|
||||
"doctoc": "^2.0.0",
|
||||
"edge.js": "^5.2.1",
|
||||
"eslint": "^7.27.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-adonis": "^1.3.1",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"github-label-sync": "^2.0.0",
|
||||
"husky": "^6.0.0",
|
||||
"japa": "^3.1.1",
|
||||
"js-stringify": "^1.0.2",
|
||||
"mrm": "^3.0.2",
|
||||
"np": "^7.5.0",
|
||||
"prettier": "^2.3.0",
|
||||
"typescript": "^4.4.0-dev.20210516"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md",
|
||||
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
|
||||
}
|
||||
},
|
||||
"nyc": {
|
||||
"exclude": [
|
||||
"test"
|
||||
],
|
||||
"extension": [
|
||||
".ts"
|
||||
]
|
||||
},
|
||||
"main": "build/index.js",
|
||||
"files": [
|
||||
"build/src",
|
||||
"build/index.d.ts",
|
||||
"build/index.js"
|
||||
],
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"np": {
|
||||
"contents": ".",
|
||||
"anyBranch": false
|
||||
},
|
||||
"dependencies": {
|
||||
"@poppinss/utils": "^3.1.3",
|
||||
"slash": "^3.0.0"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/edge-js/edge-supercharged.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/edge-js/edge-supercharged/issues"
|
||||
},
|
||||
"homepage": "https://github.com/edge-js/edge-supercharged#readme"
|
||||
}
|
||||
Reference in New Issue
Block a user