Skip to content

Commit 42f7bec

Browse files
authored
CI: housekeeping improvements (#61)
* ci(node): run checks on push and pull requests
1 parent 8880d1b commit 42f7bec

File tree

6 files changed

+95
-3
lines changed

6 files changed

+95
-3
lines changed

.editorconfig

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
# Change these settings to your own preference
10+
indent_style = space
11+
indent_size = 2
12+
quote_type = single
13+
# We recommend you to keep these unchanged
14+
end_of_line = lf
15+
charset = utf-8
16+
trim_trailing_whitespace = true
17+
insert_final_newline = true
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
[*.json]
23+
indent_size = 2
24+
25+
[*.{html,js,md}]
26+
block_comment_start = /**
27+
block_comment = *
28+
block_comment_end = */

.github/workflows/node.js.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [16.x, 18.x]
19+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- run: npm ci
28+
- run: npm run lint
29+
- run: npm run test
30+
- run: npm run build:e2e

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

package-lock.json

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@
1313
"build:docs:en:staging": "set NODE_ENV=staging && npx sassdoc ./sass -d docs",
1414
"build:e2e": "sass ./test/e2e/theme.scss ./test/e2e/theme.css",
1515
"build:json": "node scripts/buildJSON.mjs",
16-
"lint": "stylelint ./sass",
16+
"serve:docs": "npx http-server ./docs",
1717
"preview:palette": "node scripts/previewPalette.mjs",
18+
"lint": "stylelint ./sass",
1819
"test": "jest",
19-
"serve:docs": "npx http-server ./docs"
20+
"format": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .gitignore",
21+
"prepare": "husky install"
22+
},
23+
"lint-staged": {
24+
"**/*.{scss,css}": [
25+
"npm run format"
26+
]
2027
},
2128
"files": [
2229
"/sass",
@@ -52,6 +59,7 @@
5259
},
5360
"devDependencies": {
5461
"globby": "^13.1.2",
62+
"husky": "^8.0.2",
5563
"igniteui-sassdoc-theme": "^1.1.4",
5664
"jest": "^28.1.1",
5765
"lunr": "^2.3.9",

sass/color/_functions.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $_enhanced-accessibility: false;
3030
/// @group Palettes
3131
/// @param {Color} $primary - The primary color used to generate the primary color palette (required).
3232
/// @param {Color} $secondary - The secondary color used to generate the secondary color palette (required).
33-
/// @param {Color} $surface - The color used as a background in components, such as cards, sheets, and menus (required).
33+
/// @param {Color} $surface - The color used as a background in components (required).
3434
/// @param {Color} $gray [null] - The color used for generating the grayscale palette (optional).
3535
/// @param {Color} $info [#1377d5] - The information color used throughout the application (optional).
3636
/// @param {Color} $success [#4eb862] - The success color used throughout the application (optional).

0 commit comments

Comments
 (0)