From 8b4e5b5f708ce5e9814c06db6181c40187da06b5 Mon Sep 17 00:00:00 2001 From: Xiaofan Wu Date: Fri, 15 Jul 2022 15:44:33 +1000 Subject: [PATCH] chore: prettier to handle md files --- package.json | 8 ++++---- www/containers/components/GettingStarted/Installation.md | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1150641c2..dc980981f 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "dist": "npm run clean && npm run copy-types && npm run dist:lib && npm run dist:es && npm run dist:prod && npm run generate-docs && npm run dist:demo", "lint:eslint": "eslint --ext .jsx,.js,.ts ./src && eslint --ext .jsx,.js ./www", "lint:stylelint": "stylelint '{src,www}/**/*.css'", - "lint:prettier": "prettier '{src,www,config}/**/*.{js,json,jsx,mdx,css}' --check", - "format": "prettier '{src,www,config}/**/*.{js,json,jsx,mdx,css}' --write", + "lint:prettier": "prettier '{src,www,config}/**/*.{js,json,jsx,md,mdx,css}' --check", + "format": "prettier '{src,www,config}/**/*.{js,json,jsx,md,mdx,css}' --write", "lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint", - "prettier": "prettier \"{src,www,config}/**/*.{js,json,jsx,mdx,css}\" --write", + "prettier": "prettier \"{src,www,config}/**/*.{js,json,jsx,md,mdx,css}\" --write", "svgo": "svgo --recursive --multipass --folder=src --config=svgo-config.js", "postversion": "git push -u origin $(git rev-parse --abbrev-ref HEAD) --follow-tags && npm publish && echo '…released.'", "preversion": "echo 'Releasing…' && ADBLOCK=true DISABLE_OPENCOLLECTIVE=true npm ci", @@ -59,7 +59,7 @@ "{src,www}/**/*.css": [ "stylelint --fix" ], - "{src,www,config}/**/*.{js,json,jsx,mdx,css}": [ + "{src,www,config}/**/*.{js,json,jsx,md,mdx,css}": [ "prettier --write" ], "**/*.ts": [ diff --git a/www/containers/components/GettingStarted/Installation.md b/www/containers/components/GettingStarted/Installation.md index 5565e18e9..9aac01c2d 100644 --- a/www/containers/components/GettingStarted/Installation.md +++ b/www/containers/components/GettingStarted/Installation.md @@ -3,23 +3,26 @@ Adslot UI is available as an npm package. ### npm + To install and save in your `package.json` dependencies, run: + ```bash npm install adslot-ui ``` ### Peer dependencies + - [moment.js](https://github.com/moment/moment) >= 1.0 - [react](https://github.com/facebook/react) >= 16.0 - [react-dom](https://github.com/facebook/react/tree/master/packages/react-dom) >= 16.0 - [lodash](https://github.com/lodash/lodash) >= 4.0 - ### Quick Start You can use any of the components as demonstrated in this documentation. Please refer to each component item to see how they are used. This is an example on how to use a component in your application + ```jsx import React from 'react'; import { AlertInput } from 'adslot-ui'; @@ -33,9 +36,7 @@ function MyComponent() { } function App() { - return ( - - ); + return ; } ReactDOM.render(, document.querySelector('#app'));