mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
Remove PostCSS 5 deprecated methods
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import CssSyntaxError from './css-syntax-error';
|
||||
import Stringifier from './stringifier';
|
||||
import stringify from './stringify';
|
||||
import warnOnce from './warn-once';
|
||||
|
||||
let cloneNode = function (obj, parent) {
|
||||
let cloned = new obj.constructor();
|
||||
@@ -238,30 +237,6 @@ class Node {
|
||||
return this;
|
||||
}
|
||||
|
||||
moveTo(newParent) {
|
||||
warnOnce('Node#moveTo was deprecated. Use Container#append.');
|
||||
this.cleanRaws(this.root() === newParent.root());
|
||||
this.remove();
|
||||
newParent.append(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
moveBefore(otherNode) {
|
||||
warnOnce('Node#moveBefore was deprecated. Use Node#before.');
|
||||
this.cleanRaws(this.root() === otherNode.root());
|
||||
this.remove();
|
||||
otherNode.parent.insertBefore(otherNode, this);
|
||||
return this;
|
||||
}
|
||||
|
||||
moveAfter(otherNode) {
|
||||
warnOnce('Node#moveAfter was deprecated. Use Node#after.');
|
||||
this.cleanRaws(this.root() === otherNode.root());
|
||||
this.remove();
|
||||
otherNode.parent.insertAfter(otherNode, this);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next child of the node’s parent.
|
||||
* Returns `undefined` if the current node is the last child.
|
||||
|
||||
Reference in New Issue
Block a user