sass.node.mjs 5.0 KB

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