sass.node.mjs 4.2 KB

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