add initial marp implementation with sample content and build configuration
This commit is contained in:
30
node_modules/@marp-team/marpit/lib/postcss/import/suppress.js
generated
vendored
Normal file
30
node_modules/@marp-team/marpit/lib/postcss/import/suppress.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.importSuppress = exports.default = void 0;
|
||||
var _postcss_plugin = _interopRequireDefault(require("../../helpers/postcss_plugin"));
|
||||
var _parse = _interopRequireDefault(require("./parse"));
|
||||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
||||
/** @module */
|
||||
|
||||
/**
|
||||
* Marpit PostCSS import suppress plugin.
|
||||
*
|
||||
* Comment out `@import` / `@import-theme` rules that have imported theme.
|
||||
*
|
||||
* This plugin is useful to prevent the inline style's rolled-up theme import by
|
||||
* unexpected order.
|
||||
*
|
||||
* @function importSuppress
|
||||
* @param {ThemeSet} themeSet ThemeSet instance.
|
||||
*/
|
||||
const importSuppress = exports.importSuppress = (0, _postcss_plugin.default)('marpit-postcss-import-suppress', themeSet => ({
|
||||
plugins: [(0, _parse.default)(), (0, _postcss_plugin.default)('marpit-postcss-import-suppress', () => css => {
|
||||
css.walk(node => {
|
||||
if (node.marpitImportParse && themeSet.has(node.marpitImportParse)) node.replaceWith(`${node.raw('before')}/* ${node.toString()}; */`);
|
||||
});
|
||||
})()]
|
||||
}));
|
||||
var _default = exports.default = importSuppress;
|
||||
Reference in New Issue
Block a user