stuff
This commit is contained in:
parent
bc92231240
commit
b8225c639e
11904 changed files with 1472749 additions and 133 deletions
32
node_modules/@marp-team/marpit/lib/helpers/postcss_plugin.js
generated
vendored
Normal file
32
node_modules/@marp-team/marpit/lib/helpers/postcss_plugin.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
exports.plugin = plugin;
|
||||
/** @module */
|
||||
|
||||
/**
|
||||
* Generate PostCSS plugin.
|
||||
*
|
||||
* This is a glue code generator to migrate existed plugins to support
|
||||
* PostCSS 8.
|
||||
*
|
||||
* @param {string} name Plugin name.
|
||||
* @param {(Function|Object)} func Function with PostCSS plugin interface.
|
||||
* @returns {Function} A PostCSS plugin.
|
||||
*/
|
||||
function plugin(name, func) {
|
||||
return Object.defineProperty(function interface_(...args) {
|
||||
const retFunc = func.apply(this, args);
|
||||
return Object.defineProperty(typeof retFunc === 'function' ? {
|
||||
Once: retFunc
|
||||
} : retFunc, 'postcssPlugin', {
|
||||
value: name
|
||||
});
|
||||
}, 'postcss', {
|
||||
value: true
|
||||
});
|
||||
}
|
||||
var _default = exports.default = plugin;
|
||||
Loading…
Add table
Add a link
Reference in a new issue