sass.node.mjs 3.7 KB

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