Всем привет!
Делаю сборку проекта на node и gulp.
Файл config/styles.js:
module.exports = {
theme: {
skins: {
blue: "blue.css",
brown: "brown.css",
dark_cyan: "dark_cyan.css",
dark_gray: "dark_gray.css",
dark_red: "dark_red.css",
green: "green.css",
light_blue: "light_blue.css",
light_green: "light_green.css",
orange: "orange.css",
pink: "pink.css",
purple: "purple.css",
red: "red.css",
yellow: "yellow.css"
},
current: {
skin: this.theme.skins.blue
}
},
customization: {
src: "src/styles/*",
dist: "styles"
},
vendor: {
theme: {
bootstrap: "src/vendor/theme/html/bootstrap/css/bootstrap.css",
"font-awesome": "src/vendor/theme/html/fonts/font-awesome/css/font-awesome.css",
fontello: "src/vendor/theme/html/fonts/fontello/css/fontello.css",
"rs-plugin-settings": "src/vendor/theme/html/plugins/rs-plugin/css/settings.css",
"rs-plugin-extralayers": "src/vendor/theme/html/plugins/rs-plugin/css/extralayers.css",
"magnific-popup": "src/vendor/theme/html/plugins/magnific-popup/magnific-popup.css",
animations: "src/vendor/theme/html/css/animations.css",
"owl-carousel": "src/vendor/theme/html/plugins/owl-carousel/owl.carousel.css",
"core-style": "src/vendor/theme/html/css/style.css",
//skin: "src/vendor/theme/html/css/skins/" + this.theme.current.skin
}
},
templates: {
lp_v1: [
"bootstrap", "font-awesome", "fontello", "rs-plugin-settings", "rs-plugin-extralayers", "magnific-popup",
"animations", "owl-carousel", "core-style", "skin"
]
}
};
gulpfile.js:
var gulp = require('gulp');
var requireDir = require('require-dir');
var config = requireDir('./config');
gulp.task('console', function () {
console.log(config.styles);
});
Результат команды gulp console: TypeError: Cannot read property 'skins' of undefined
Помогите, объясните, пожалуйста, в чем ошибка?