sass.node.mjs 5.3 KB

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