sass.node.mjs 5.4 KB

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