@weapp-tailwindcss/cli 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -14,6 +14,7 @@ const postcssrc = require('gulp-postcss');
14
14
  const createSass = require('gulp-sass');
15
15
  const rename = require('gulp-rename');
16
16
  const less = require('gulp-less');
17
+ const postcssScssParser = require('postcss-scss');
17
18
  const cosmiconfig = require('cosmiconfig');
18
19
 
19
20
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
@@ -29,6 +30,7 @@ const postcssrc__default = /*#__PURE__*/_interopDefaultCompat(postcssrc);
29
30
  const createSass__default = /*#__PURE__*/_interopDefaultCompat(createSass);
30
31
  const rename__default = /*#__PURE__*/_interopDefaultCompat(rename);
31
32
  const less__default = /*#__PURE__*/_interopDefaultCompat(less);
33
+ const postcssScssParser__default = /*#__PURE__*/_interopDefaultCompat(postcssScssParser);
32
34
 
33
35
  function isPlainObject$2(value) {
34
36
  if (value === null || typeof value !== "object") {
@@ -86,7 +88,7 @@ function createDefu(merger) {
86
88
  }
87
89
  const defu = createDefu();
88
90
 
89
- const version = "1.0.4";
91
+ const version = "1.0.5";
90
92
 
91
93
  const debug = createDebug__default("weapp-tw-cli");
92
94
 
@@ -716,7 +718,17 @@ async function getTasks(options) {
716
718
  if (postcssOptions) {
717
719
  pipes.push(postcssrc__default(postcssOptions?.plugins, postcssOptions?.options));
718
720
  }
719
- pipes.push(transformWxss());
721
+ if (x === "scss") {
722
+ pipes.push(transformWxss({
723
+ postcssOptions: {
724
+ options: {
725
+ parser: postcssScssParser__default
726
+ }
727
+ }
728
+ }));
729
+ } else {
730
+ pipes.push(transformWxss());
731
+ }
720
732
  if (loadSass || loadLess) {
721
733
  pipes.push(rename__default({
722
734
  extname: ".wxss"
package/dist/index.mjs CHANGED
@@ -12,6 +12,7 @@ import postcssrc from 'gulp-postcss';
12
12
  import createSass from 'gulp-sass';
13
13
  import rename from 'gulp-rename';
14
14
  import less from 'gulp-less';
15
+ import postcssScssParser from 'postcss-scss';
15
16
  import { cosmiconfigSync } from 'cosmiconfig';
16
17
 
17
18
  function isPlainObject$2(value) {
@@ -70,7 +71,7 @@ function createDefu(merger) {
70
71
  }
71
72
  const defu = createDefu();
72
73
 
73
- const version = "1.0.4";
74
+ const version = "1.0.5";
74
75
 
75
76
  const debug = createDebug("weapp-tw-cli");
76
77
 
@@ -700,7 +701,17 @@ async function getTasks(options) {
700
701
  if (postcssOptions) {
701
702
  pipes.push(postcssrc(postcssOptions?.plugins, postcssOptions?.options));
702
703
  }
703
- pipes.push(transformWxss());
704
+ if (x === "scss") {
705
+ pipes.push(transformWxss({
706
+ postcssOptions: {
707
+ options: {
708
+ parser: postcssScssParser
709
+ }
710
+ }
711
+ }));
712
+ } else {
713
+ pipes.push(transformWxss());
714
+ }
704
715
  if (loadSass || loadLess) {
705
716
  pipes.push(rename({
706
717
  extname: ".wxss"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "The cli of weapp-tailwindcss",
5
5
  "author": "SonOfMagic <qq1324318532@gmail.com>",
6
6
  "license": "MIT",
@@ -68,7 +68,8 @@
68
68
  "local-pkg": "^0.5.0",
69
69
  "picocolors": "^1.0.1",
70
70
  "postcss": "^8.4.39",
71
- "postcss-load-config": "^6.0.1"
71
+ "postcss-load-config": "^6.0.1",
72
+ "postcss-scss": "^4.0.9"
72
73
  },
73
74
  "publishConfig": {
74
75
  "access": "public",