rename insertOntoContainerStart to unshiftContainer
This commit is contained in:
parent
9a466d3ef9
commit
8ae4601177
@ -20,7 +20,7 @@ export default class CommonJSFormatter extends DefaultFormatter {
|
||||
if (this.file.isLoose("es6.modules")) templateName += "-loose";
|
||||
var declar = util.template(templateName, true);
|
||||
declar._blockHoist = 3;
|
||||
file.ast.program.body.unshift(declar);
|
||||
file.path.unshiftContainer("body", [declar]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -13,6 +13,6 @@ export function Program(program, parent, scope, file) {
|
||||
}
|
||||
}
|
||||
|
||||
program.body.unshift(directive);
|
||||
this.unshiftContainer("body", [directive]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ export default class TraversalPath {
|
||||
* Description
|
||||
*/
|
||||
|
||||
insertOntoContainerStart(containerKey, nodes) {
|
||||
unshiftContainer(containerKey, nodes) {
|
||||
nodes = this._verifyNodeList(nodes);
|
||||
|
||||
// get the first path and insert our nodes before it, if it doesn't exist then it
|
||||
@ -441,7 +441,7 @@ export default class TraversalPath {
|
||||
* Description
|
||||
*/
|
||||
|
||||
insertOntoContainerEnd(containerKey, nodes) {
|
||||
pushContainer(containerKey, nodes) {
|
||||
nodes = this._verifyNodeList(nodes);
|
||||
|
||||
// get an invisible path that represents the last node + 1 and replace it with our
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user