rename insertOntoContainerStart to unshiftContainer

This commit is contained in:
Sebastian McKenzie 2015-04-30 14:33:54 +01:00
parent 9a466d3ef9
commit 8ae4601177
3 changed files with 4 additions and 4 deletions

View File

@ -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]);
}
}

View File

@ -13,6 +13,6 @@ export function Program(program, parent, scope, file) {
}
}
program.body.unshift(directive);
this.unshiftContainer("body", [directive]);
}
}

View File

@ -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