"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var dic_1 = require("../util/dic");
var logger_1 = __importDefault(require("../util/logger"));
var conf = require(dic_1.ROOT_PACKAGE_PATH('src/config.json'));
var fs = require('fs');
var generateIndexScss = /** @class */ (function () {
    function generateIndexScss() {
        var content = "$assetsPath:'./assets/';\n\t\t@import './styles/index.scss';";
        conf.packages.map(function (item) {
            var cptName = item.name.toLowerCase();
            content += "\n@import './packages/" + cptName + "/" + cptName + ".scss';";
        });
        var filePath = dic_1.ROOT_PACKAGE_PATH('dist/nutui.scss');
        ;
        fs.writeFile(filePath, content, function (err) {
            if (err)
                throw err;
            logger_1.default.success('generate nutui.scss file succeeded !');
        });
    }
    return generateIndexScss;
}());
exports.default = generateIndexScss;
//# sourceMappingURL=createIndexScss.js.map