From ac5849d4c750e9c232920148a49a0ae5047ef6b1 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Fri, 13 Nov 2020 15:46:47 +0200 Subject: [PATCH] Update docs --- DEVELOP.md | 23 +++++------------------ README.md | 10 ++++++---- package.json | 12 ++++++++---- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/DEVELOP.md b/DEVELOP.md index 1ebc4d1..a9ddbbf 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -4,31 +4,18 @@ Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/) -1. Install `mrs.developer` - $ npm install -g mrs.developer +1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer` -1. Install `@plone/create-volto-app` - - $ npm install -g @plone/create-volto-app + $ npm install -g yo + $ npm install -g @plone/generator-volto + $ npm install -g mrs-developer 1. Create new volto app - $ create-volto-app my-volto-project + $ yo @plone/volto my-volto-project --addon @eeacms/volto-block-style $ cd my-volto-project -1. Update `package.json` with the following information: - - { - "scripts": { - "develop": "missdev --config=jsconfig.json --output=addons" - }, - - "addons": [ - "@eeacms/volto-block-style" - ], - } - 1. Add the following to `mrs.developer.json`: { diff --git a/README.md b/README.md index 59d6bcb..b857a97 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A generic framework to style blocks and other components. To configure it, set `settings.pluggableStylesBlocksWhitelist` as a list of block types that you want to enable. By default it is enabled for all blocks. -Ideally it should be loaded as the last addon in Volto project configuration. +Ideally it should be **loaded as the last addon** in Volto project configuration. ### @@ -23,12 +23,14 @@ Ideally it should be loaded as the last addon in Volto project configuration. 1. Create new volto project if you don't already have one: ``` - $ npm install -g @plone/create-volto-app - $ create-volto-app my-volto-project + $ npm install -g yo @plone/generator-volto + $ yo @plone/volto my-volto-project --addon @eeacms/volto-block-style + $ cd my-volto-project + $ yarn add -W @eeacms/volto-block-style ``` -1. Update `package.json`: +1. If you already have a volto project, just update `package.json`: ```JSON "addons": [ diff --git a/package.json b/package.json index 4772812..fbf73a4 100644 --- a/package.json +++ b/package.json @@ -17,12 +17,16 @@ "type": "git", "url": "git@github.com:eea/volto-block-style.git" }, - "devDependencies": { - "release-it": "*" - }, "scripts": { "release": "release-it", - "bootstrap": "node bootstrap" + "bootstrap": "node bootstrap", + "stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'", + "stylelint:overrides": "../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'", + "stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix", + "prettier": "../../../node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'", + "prettier:fix": "../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'", + "lint": "../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'", + "lint:fix": "../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'" }, "dependencies": { "react-color": "~2.18.1"