diff --git a/.github/workflows/azure-cdn-deploy.yml b/.github/workflows/azure-cdn-deploy.yml index 5fc89453..a70d6261 100644 --- a/.github/workflows/azure-cdn-deploy.yml +++ b/.github/workflows/azure-cdn-deploy.yml @@ -38,8 +38,9 @@ jobs: PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}-beta-${{ github.event.pull_request.number }}" run: | npm install + npm run lint npm run build - npm run build_demo + npm run build:demo npm run test --if-present - name: azure login uses: azure/login@v1 @@ -85,9 +86,10 @@ jobs: env: PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}-preview" run: | - npm install + npm install + npm run lint npm run build - npm run build_demo + npm run build:demo npm run test --if-present - name: azure login uses: azure/login@v1 diff --git a/.github/workflows/azure-static-web-apps-purple-glacier-0a500d203.yml b/.github/workflows/azure-static-web-apps-purple-glacier-0a500d203.yml index 89293c15..0577ac59 100644 --- a/.github/workflows/azure-static-web-apps-purple-glacier-0a500d203.yml +++ b/.github/workflows/azure-static-web-apps-purple-glacier-0a500d203.yml @@ -39,7 +39,7 @@ jobs: app_location: "." # App source code path api_location: "" # Api source code path - optional output_location: "./demo_build" # Built app content directory - optional - app_build_command: "npm run build_demo" + app_build_command: "npm run build:demo" ###### End of Repository/Build Configurations ###### build_deploy_rc: @@ -68,7 +68,7 @@ jobs: app_location: "." # App source code path api_location: "" # Api source code path - optional output_location: "./demo_build" # Built app content directory - optional - app_build_command: "npm run build_demo" + app_build_command: "npm run build:demo" ###### End of Repository/Build Configurations ###### build_deploy_release: @@ -98,7 +98,7 @@ jobs: app_location: "." # App source code path api_location: "" # Api source code path - optional output_location: "./demo_build" # Built app content directory - optional - app_build_command: "npm run build_demo" + app_build_command: "npm run build:demo" ###### End of Repository/Build Configurations ###### close_pull_request_job: diff --git a/.gitignore b/.gitignore index 1f99760e..d5974b4d 100644 --- a/.gitignore +++ b/.gitignore @@ -335,4 +335,5 @@ yarn.lock node_modules demo_build demo_temp -dist/*.map \ No newline at end of file +dist/*.map +.env diff --git a/.htmlnanorc b/.htmlnanorc index 93fb3c72..2a3f6027 100644 --- a/.htmlnanorc +++ b/.htmlnanorc @@ -1,15 +1,15 @@ { - "collapseAttributeWhitespace": false, - "collapseBooleanAttributes": false, - "collapseWhitespace": "conservative", - "custom": [], - "deduplicateAttributeValues": false, - "mergeScripts": false, - "mergeStyles": false, - "removeUnusedCss": false, - "minifyJson": true, - "minifySvg": true, - "removeEmptyAttributes": false, - "removeRedundantAttributes": false, - "removeComments": true -} \ No newline at end of file + "collapseAttributeWhitespace": false, + "collapseBooleanAttributes": false, + "collapseWhitespace": "conservative", + "custom": [], + "deduplicateAttributeValues": false, + "mergeScripts": false, + "mergeStyles": false, + "removeUnusedCss": false, + "minifyJson": true, + "minifySvg": true, + "removeEmptyAttributes": false, + "removeRedundantAttributes": false, + "removeComments": true +} diff --git a/.parcelrc b/.parcelrc index 0c526f92..dbcd3c4a 100644 --- a/.parcelrc +++ b/.parcelrc @@ -2,11 +2,12 @@ "extends": "@parcel/config-default", "transformers": { "*.css": [ + "@plasmohq/parcel-transformer-inject-env", "@parcel/transformer-css" ], "*.html": [ - "@plasmohq/parcel-transformer-inject-env", - "..." + "...", + "@plasmohq/parcel-transformer-inject-env" ] } } diff --git a/.sasslintrc b/.sasslintrc deleted file mode 100644 index 1392187c..00000000 --- a/.sasslintrc +++ /dev/null @@ -1,74 +0,0 @@ -######################### -## Sass Lint File -## See rules https://github.com/sasstools/sass-lint/tree/master/docs/rules -######################### -# Linter Options -options: - # Don't merge default rules - merge-default-rules: false -# File Options -files: - include: 'src/**/*.s+(a|c)ss' - ignore: - - 'node_modules/**/*.*' -# Rule Configuration -rules: - attribute-quotes: - - 2 - - - include: true - extends-before-mixins: 2 - extends-before-declarations: 2 - placeholder-in-extend: 2 - mixins-before-declarations: - - 2 - - - exclude: - - breakpoint - - mq - nesting-depth: - - 1 - - - max-depth: 2 - no-warn: 1 - no-debug: 1 - no-ids: 2 - no-duplicate-properties: 1 - no-trailing-whitespace: 2 - - leading-zero: - - 2 - - - include: false - no-vendor-prefixes: - - 2 - - - ignore-non-standard: true - no-important: 2 - hex-notation: - - 2 - - - style: lowercase - indentation: - - 2 - - - size: 'tab' - property-sort-order: - - 1 - - - order: 'alphabetical' - ignore-custom-properties: true - property-units: - - 1 - - - global: ['em', 'rem', '%'] - quotes: 2 - space-after-colon: 2 - space-after-comma: 2 - single-line-per-selector: 2 - variable-for-property: - - 2 - - - properties: - - color - zero-unit: 2 diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 00000000..40133002 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,16 @@ +{ + "extends": "stylelint-config-standard-scss", + "rules": { + "selector-class-pattern": [ + "^[a-z][a-z0-9]*(-{1,2}[a-z0-9]+)*$", + { + "message": "Expected class selector to be kebab-case or -- modifier" + } + ], + "property-no-vendor-prefix": null, + "scss/operator-no-unspaced": null, + "unit-allowed-list": ["rem", "%", "deg", "s", "vw", "vh"], + "max-nesting-depth": 3, + "selector-max-id": 0 + } +} diff --git a/demo/images/night-fog.svg b/demo/images/night-fog.svg new file mode 100644 index 00000000..4cc51c69 --- /dev/null +++ b/demo/images/night-fog.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/demo/images/screen-l.svg b/demo/images/screen-l.svg new file mode 100644 index 00000000..c202852a --- /dev/null +++ b/demo/images/screen-l.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/demo/images/screen-m.svg b/demo/images/screen-m.svg new file mode 100644 index 00000000..6853bec1 --- /dev/null +++ b/demo/images/screen-m.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/demo/images/screen-s.svg b/demo/images/screen-s.svg new file mode 100644 index 00000000..fb20c657 --- /dev/null +++ b/demo/images/screen-s.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/demo/images/screen-xl.svg b/demo/images/screen-xl.svg new file mode 100644 index 00000000..33340182 --- /dev/null +++ b/demo/images/screen-xl.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/demo/images/sun-fog.svg b/demo/images/sun-fog.svg new file mode 100644 index 00000000..c872b429 --- /dev/null +++ b/demo/images/sun-fog.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/demo/index.css b/demo/index.css index 44877399..ca09117a 100644 --- a/demo/index.css +++ b/demo/index.css @@ -64,6 +64,25 @@ header { .svg-icon-github { background-image: url("images/github.svg"); } +.svg-icon-night { + background-image: url("images/night-fog.svg"); +} +.svg-icon-sun { + background-image: url("images/sun-fog.svg"); +} + +.svg-icon-screen-s { + background-image: url("images/screen-s.svg"); +} +.svg-icon-screen-m { + background-image: url("images/screen-m.svg"); +} +.svg-icon-screen-l { + background-image: url("images/screen-l.svg"); +} +.svg-icon-screen-xl { + background-image: url("images/screen-xl.svg"); +} .grid-cel { font-weight: bold; diff --git a/demo/index.html b/demo/index.html index 69344f74..25f7395c 100644 --- a/demo/index.html +++ b/demo/index.html @@ -10,7 +10,7 @@ MgPlus | A micro CSS library. - + @@ -19,10 +19,10 @@