diff --git a/.postcssrc.js b/.postcssrc.js index 90d9fff..527e9b8 100644 --- a/.postcssrc.js +++ b/.postcssrc.js @@ -1,5 +1,8 @@ -module.exports = { - plugins: { - autoprefixer: {}, - }, -} +module.exports = ({ env, options }) => ({ + ...options, + plugins: [ + require('autoprefixer')({}), + // require('flex-gap-polyfill')() // bugly with vite + // require('stylelint')({}), // + ], +}) diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.stylelintignore @@ -0,0 +1 @@ +node_modules diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..186d789 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,10 @@ +{ + "plugins": [ + "stylelint-scss" + ], + "extends": "stylelint-config-standard", + "rules": { + "rule-empty-line-before": "never", + "indentation": 2 + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 2761ea7..c7af525 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { + "stylelint.enable": false, "php-docblocker.returnGap": true, "php-docblocker.qualifyClassNames": true, "php-docblocker.author": { diff --git a/app/functions.php b/app/functions.php index 8500532..6167c2f 100644 --- a/app/functions.php +++ b/app/functions.php @@ -5,7 +5,7 @@ define('SAKURA_VERSION', wp_get_theme()->get('Version')); define('SAKURA_TEXT_DOMAIN', wp_get_theme()->get('TextDomain')); -define('SAKURA_DEVEPLOMENT', false); +define('SAKURA_DEVEPLOMENT', true); define('SAKURA_DEVEPLOMENT_HOST', 'http://127.0.0.1:9000'); // PHP loaders diff --git a/package.json b/package.json index 28a6a5d..1bfe91c 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "vue-router": "^4.0.10" }, "devDependencies": { + "@amatlash/vite-plugin-stylelint": "^1.1.1", "@formatjs/cli": "^4.2.27", "@types/chroma-js": "^2.1.3", "@types/crypto-js": "^4.0.1", @@ -92,11 +93,15 @@ "eslint-plugin-formatjs": "^2.17.1", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^7.13.0", + "flex-gap-polyfill": "^4.0.6", "jest": "^27.0.6", "nodemon": "^2.0.12", "postcss-import": "^14.0.2", "prettier": "^2.3.2", "resize-observer-polyfill": "^1.5.1", + "stylelint": "^13.13.1", + "stylelint-config-standard": "^22.0.0", + "stylelint-scss": "^3.20.1", "svgo": "^2.3.1", "ts-jest": "^27.0.3", "type-fest": "^1.2.2", @@ -109,7 +114,7 @@ }, "engines": { "npm": "please-use-yarn", - "yarn": ">= 1.22.10", - "node": ">= 14.17.1" + "yarn": ">= 1.22.0", + "node": ">= 14.0.0" } } diff --git a/src/admin/Core.vue b/src/admin/Core.vue index cb44825..32e0779 100644 --- a/src/admin/Core.vue +++ b/src/admin/Core.vue @@ -147,6 +147,8 @@ export default defineComponent({ diff --git a/src/admin/components/MediaPicker.vue b/src/admin/components/MediaPicker.vue index 425eabf..8cd678d 100644 --- a/src/admin/components/MediaPicker.vue +++ b/src/admin/components/MediaPicker.vue @@ -1,23 +1,27 @@ - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + + + @@ -150,23 +154,24 @@ export default defineComponent({ diff --git a/src/layouts/components/header/HeaderMobile.vue b/src/layouts/components/header/HeaderMobile.vue index 75791c4..12e58d7 100644 --- a/src/layouts/components/header/HeaderMobile.vue +++ b/src/layouts/components/header/HeaderMobile.vue @@ -36,7 +36,7 @@ export default defineComponent({