[6a3a178] | 1 | var prepare = require('./prepare/index');
|
---|
| 2 | var mergeAtrule = require('./1-mergeAtrule');
|
---|
| 3 | var initialMergeRuleset = require('./2-initialMergeRuleset');
|
---|
| 4 | var disjoinRuleset = require('./3-disjoinRuleset');
|
---|
| 5 | var restructShorthand = require('./4-restructShorthand');
|
---|
| 6 | var restructBlock = require('./6-restructBlock');
|
---|
| 7 | var mergeRuleset = require('./7-mergeRuleset');
|
---|
| 8 | var restructRuleset = require('./8-restructRuleset');
|
---|
| 9 |
|
---|
| 10 | module.exports = function(ast, options) {
|
---|
| 11 | // prepare ast for restructing
|
---|
| 12 | var indexer = prepare(ast, options);
|
---|
| 13 | options.logger('prepare', ast);
|
---|
| 14 |
|
---|
| 15 | mergeAtrule(ast, options);
|
---|
| 16 | options.logger('mergeAtrule', ast);
|
---|
| 17 |
|
---|
| 18 | initialMergeRuleset(ast);
|
---|
| 19 | options.logger('initialMergeRuleset', ast);
|
---|
| 20 |
|
---|
| 21 | disjoinRuleset(ast);
|
---|
| 22 | options.logger('disjoinRuleset', ast);
|
---|
| 23 |
|
---|
| 24 | restructShorthand(ast, indexer);
|
---|
| 25 | options.logger('restructShorthand', ast);
|
---|
| 26 |
|
---|
| 27 | restructBlock(ast);
|
---|
| 28 | options.logger('restructBlock', ast);
|
---|
| 29 |
|
---|
| 30 | mergeRuleset(ast);
|
---|
| 31 | options.logger('mergeRuleset', ast);
|
---|
| 32 |
|
---|
| 33 | restructRuleset(ast);
|
---|
| 34 | options.logger('restructRuleset', ast);
|
---|
| 35 | };
|
---|