diff --git a/.eslintrc.js b/.eslintrc.js index 26227a912..9e0de5ac0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -52,5 +52,5 @@ module.exports = { 'max-len': ['error', { code: 300 }], 'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }], }, - ignorePatterns: ['*/docs/api/*', 'dist'], + ignorePatterns: ['*/docs/api/*', 'dist', 'packages/cli/src/template/**/*.*', '*/locale/*', 'stats.json'], }; diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 89d87663e..b23cbc384 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -17,7 +17,5 @@ jobs: run: pnpm lint - name: Format Check run: pnpm format:check - - name: Test - run: pnpm test - name: Docs run: pnpm docs:api diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..f14aa9d2a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: GrapesJS Tests +on: + push: + branches: [dev] + pull_request: + branches: [dev] + +jobs: + test-core: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-project + - name: Core Tests + run: pnpm test + working-directory: ./packages/core + test-cli: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-project + - name: CLI Tests + run: pnpm test + working-directory: ./packages/cli diff --git a/.prettierignore b/.prettierignore index 19fba71ff..2a75b23ed 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,6 @@ docs/**/*.md dist/ -pnpm-lock.yaml \ No newline at end of file +pnpm-lock.yaml +packages/cli/src/template/**/*.* +**/locale/** +stats.json \ No newline at end of file diff --git a/docs/Home.md b/docs/Home.md index 7aae1c693..6df16ef3d 100644 --- a/docs/Home.md +++ b/docs/Home.md @@ -172,7 +172,7 @@ You could add other commands to enable interactions with blocks. Check [Built-in ## Style Manager -Any HTML structure requires, at some point, a proper style, so to meet this need the Style Manager was added as a built-in feature in GrapesJS. Style manager is composed by sectors, which group inside different types of CSS properties. So you can add, for instance, a `Dimension` sector for `width` and `height`, and another one as `Typography` for `font-size` and `color`. So it's up to you decide how organize sectors. +Any HTML structure requires, at some point, a proper style, so to meet this need the Style Manager was added as a built-in feature in GrapesJS. Style manager is composed by sectors, which group inside different types of CSS properties. So you can add, for instance, a `Dimension` sector for `width` and `height`, and another one as `Typography` for `font-size` and `color`. So it's up to you to decide how to organize sectors. To enable this module we rely on a built-in command `open-sm`, which shows up the Style Manager, which we gonna bind to another button in a separate panel @@ -228,7 +228,7 @@ Selecting one of the component will show up the Style Manager with default secto [[img/default-sm.jpg]] -As we exploring different configurations inside GrapesJS we gonna overwrite all the default sectors to create some custom one +As we explore different configurations inside GrapesJS we gonna overwrite all the default sectors to create some custom one Let's put a few sectors with use of `buildProps` which helps us building common properties @@ -356,7 +356,7 @@ styleManager : { ... ``` -As you can see using `buildProps` actually will save you a lot of work. You could also mix this techniques to obtain custom properties in less time. For example, let's see how can we setup the same width but with a different value of `min`: +As you can see using `buildProps` actually will save you a lot of work. You could also mix these techniques to obtain custom properties in less time. For example, let's see how we can setup the same width but with a different value of `min`: ```js ... @@ -402,7 +402,7 @@ var editor = grapesjs.init({ ... ``` -Worth noting the defaut `id` parameter which adds a prefix for all keys to store. If you check the localStorage inside your DOM panel you'll see something like `{ 'gjs-components': '