sass.node.mjs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. import cjs from "./sass.node.js";
  2. export const compile = cjs.compile;
  3. export const compileAsync = cjs.compileAsync;
  4. export const compileString = cjs.compileString;
  5. export const compileStringAsync = cjs.compileStringAsync;
  6. export const Logger = cjs.Logger;
  7. export const SassArgumentList = cjs.SassArgumentList;
  8. export const SassBoolean = cjs.SassBoolean;
  9. export const SassCalculation = cjs.SassCalculation;
  10. export const CalculationOperation = cjs.CalculationOperation;
  11. export const CalculationInterpolation = cjs.CalculationInterpolation;
  12. export const SassColor = cjs.SassColor;
  13. export const SassFunction = cjs.SassFunction;
  14. export const SassList = cjs.SassList;
  15. export const SassMap = cjs.SassMap;
  16. export const SassMixin = cjs.SassMixin;
  17. export const SassNumber = cjs.SassNumber;
  18. export const SassString = cjs.SassString;
  19. export const Value = cjs.Value;
  20. export const CustomFunction = cjs.CustomFunction;
  21. export const ListSeparator = cjs.ListSeparator;
  22. export const sassFalse = cjs.sassFalse;
  23. export const sassNull = cjs.sassNull;
  24. export const sassTrue = cjs.sassTrue;
  25. export const Exception = cjs.Exception;
  26. export const PromiseOr = cjs.PromiseOr;
  27. export const info = cjs.info;
  28. export const render = cjs.render;
  29. export const renderSync = cjs.renderSync;
  30. export const TRUE = cjs.TRUE;
  31. export const FALSE = cjs.FALSE;
  32. export const NULL = cjs.NULL;
  33. export const types = cjs.types;
  34. let printedDefaultExportDeprecation = false;
  35. function defaultExportDeprecation() {
  36. if (printedDefaultExportDeprecation) return;
  37. printedDefaultExportDeprecation = true;
  38. console.error(
  39. "`import sass from 'sass'` is deprecated.\n" +
  40. "Please use `import * as sass from 'sass'` instead.");
  41. }
  42. export default {
  43. get compile() {
  44. defaultExportDeprecation();
  45. return cjs.compile;
  46. },
  47. get compileAsync() {
  48. defaultExportDeprecation();
  49. return cjs.compileAsync;
  50. },
  51. get compileString() {
  52. defaultExportDeprecation();
  53. return cjs.compileString;
  54. },
  55. get compileStringAsync() {
  56. defaultExportDeprecation();
  57. return cjs.compileStringAsync;
  58. },
  59. get Logger() {
  60. defaultExportDeprecation();
  61. return cjs.Logger;
  62. },
  63. get SassArgumentList() {
  64. defaultExportDeprecation();
  65. return cjs.SassArgumentList;
  66. },
  67. get SassBoolean() {
  68. defaultExportDeprecation();
  69. return cjs.SassBoolean;
  70. },
  71. get SassCalculation() {
  72. defaultExportDeprecation();
  73. return cjs.SassCalculation;
  74. },
  75. get CalculationOperation() {
  76. defaultExportDeprecation();
  77. return cjs.CalculationOperation;
  78. },
  79. get CalculationInterpolation() {
  80. defaultExportDeprecation();
  81. return cjs.CalculationInterpolation;
  82. },
  83. get SassColor() {
  84. defaultExportDeprecation();
  85. return cjs.SassColor;
  86. },
  87. get SassFunction() {
  88. defaultExportDeprecation();
  89. return cjs.SassFunction;
  90. },
  91. get SassList() {
  92. defaultExportDeprecation();
  93. return cjs.SassList;
  94. },
  95. get SassMap() {
  96. defaultExportDeprecation();
  97. return cjs.SassMap;
  98. },
  99. get SassMixin() {
  100. defaultExportDeprecation();
  101. return cjs.SassMixin;
  102. },
  103. get SassNumber() {
  104. defaultExportDeprecation();
  105. return cjs.SassNumber;
  106. },
  107. get SassString() {
  108. defaultExportDeprecation();
  109. return cjs.SassString;
  110. },
  111. get Value() {
  112. defaultExportDeprecation();
  113. return cjs.Value;
  114. },
  115. get CustomFunction() {
  116. defaultExportDeprecation();
  117. return cjs.CustomFunction;
  118. },
  119. get ListSeparator() {
  120. defaultExportDeprecation();
  121. return cjs.ListSeparator;
  122. },
  123. get sassFalse() {
  124. defaultExportDeprecation();
  125. return cjs.sassFalse;
  126. },
  127. get sassNull() {
  128. defaultExportDeprecation();
  129. return cjs.sassNull;
  130. },
  131. get sassTrue() {
  132. defaultExportDeprecation();
  133. return cjs.sassTrue;
  134. },
  135. get Exception() {
  136. defaultExportDeprecation();
  137. return cjs.Exception;
  138. },
  139. get PromiseOr() {
  140. defaultExportDeprecation();
  141. return cjs.PromiseOr;
  142. },
  143. get info() {
  144. defaultExportDeprecation();
  145. return cjs.info;
  146. },
  147. get render() {
  148. defaultExportDeprecation();
  149. return cjs.render;
  150. },
  151. get renderSync() {
  152. defaultExportDeprecation();
  153. return cjs.renderSync;
  154. },
  155. get TRUE() {
  156. defaultExportDeprecation();
  157. return cjs.TRUE;
  158. },
  159. get FALSE() {
  160. defaultExportDeprecation();
  161. return cjs.FALSE;
  162. },
  163. get NULL() {
  164. defaultExportDeprecation();
  165. return cjs.NULL;
  166. },
  167. get types() {
  168. defaultExportDeprecation();
  169. return cjs.types;
  170. },
  171. };