Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* global MAKE:false */
- // process.env.YENV = 'production';
- var PATH = require('path');
- require('bem-tools-autoprefixer').extendMake(MAKE);
- MAKE.decl('Arch', {
- blocksLevelsRegexp : /^local\/blocks/,
- bundlesLevelsRegexp : /^local\/bundles$/,
- getBundlesLevels: function() {
- return [
- 'local/bundles'
- ];
- }
- });
- MAKE.decl('BundleNode', {
- getTechs : function() {
- return [
- 'bemjson.js',
- 'bemdecl.js',
- 'deps.js',
- 'bemhtml',
- 'browser.js+bemhtml',
- 'scss',
- 'sass',
- 'html'
- ];
- },
- getForkedTechs : function() {
- return this.__base().concat(['browser.js+bemhtml', 'sass', 'scss']);
- },
- getLevelsMap : function() {
- return {
- desktop : [
- 'local/blocks'
- ]
- };
- },
- getLevels : function() {
- var resolve = PATH.resolve.bind(PATH, this.root),
- buildLevel = this.getLevelPath().split('.')[0],
- levels = this.getLevelsMap()[buildLevel] || [];
- return levels
- .map(function(path) { return resolve(path); })
- .concat(resolve(PATH.dirname(this.getNodePrefix()), 'blocks'));
- },
- 'create-css-node' : function(tech, bundleNode, magicNode) {
- var source = this.getBundlePath('sass');
- if(this.ctx.arch.hasNode(source)) {
- return this.createAutoprefixerNode(tech, this.ctx.arch.getNode(source), bundleNode, magicNode);
- }
- }
- });
- MAKE.decl('AutoprefixerNode', {
- getBrowsers : function() {
- return [
- 'last 2 versions',
- 'ie 10',
- 'opera 12.16'
- ];
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement