Skip to content

Instantly share code, notes, and snippets.

module.exports = {
block : 'page',
title : 'Title of the page',
favicon : '/favicon.ico',
head : [
{ elem : 'meta', attrs : { name : 'description', content : '' } },
{ elem : 'meta', attrs : { name : 'viewport', content : 'width=device-width, initial-scale=1' } },
{ elem : 'css', url : 'index.min.css' }
],
scripts: [{ elem : 'js', url : 'index.min.js' }],
@tadatuta
tadatuta / enb.make.js
Last active February 5, 2017 19:52 — forked from innabelaya/enb.make.js
var techs = {
// essential
fileProvider: require('enb/techs/file-provider'),
fileMerge: require('enb/techs/file-merge'),
// optimization
borschik: require('enb-borschik/techs/borschik'),
// css
postcss: require('enb-postcss/techs/enb-postcss'),
@tadatuta
tadatuta / make.js.diff
Created November 12, 2016 22:48
Run enb-closure-compiler-js if YENV=production
diff --git a/.enb/make.js b/.enb/make.js
index bf95ff2..2d49bfc 100644
--- a/.enb/make.js
+++ b/.enb/make.js
@@ -5,6 +5,7 @@ var techs = {
// optimization
borschik: require('enb-borschik/techs/borschik'),
+ closure: require('enb-closure-compiler-js/techs/closure-compiler'),
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"
@tadatuta
tadatuta / BEM-XJST.md
Last active December 25, 2015 17:49
BEM-XJST синтаксис

BEM-XJST

Это БЭМ-ориентированные хелперы над стандартным XJST-синтаксисом. Сюда входит:

  • синтаксический сахар для подпредикатов про БЭМ предметную область
  • возможность писать вложенные шаблоны
  • синтаксический сахар для apply по какой-то mode (apply(this._mode = 'bla'))
  • ключевое слово applyCtx (синтаксический сахар для applyNext(this.ctx = { some: 'new' }))
Подпредикаты про БЭМ
@tadatuta
tadatuta / enb-define.js
Created December 15, 2015 19:45
ENB version of webpack define plugin
var vow = require('vow'),
enb = require('enb'),
buildFlow = enb.buildFlow || require('enb/lib/build-flow'),
vfs = enb.asyncFS || require('enb/lib/fs/async-fs'),
utils = require('enb-source-map/lib/utils'),
File = require('enb-source-map/lib/file');
module.exports = buildFlow.create()
.name('define')
.target('target', '?.js')
{
"name": "bem-project-stub",
"version": "1.4.0",
"description": "BEM project stub",
"bugs": "https://github.com/bem/project-stub/issues",
"ignore": [
".bem/cache",
"node_modules",
"libs"
],
module.exports = {
block: 'page',
title: 'Title of the page',
favicon: '/favicon.ico',
head: [
{ elem: 'meta', attrs: { name: 'description', content: '' }},
{ elem: 'css', url: 'index.min.css' }
],
scripts: [{ elem: 'js', url: 'index.min.js' }],
content: [
module.exports = {
block: 'page',
title: 'Title of the page',
favicon: '/favicon.ico',
head: [
{ elem: 'meta', attrs: { name: 'description', content: '' }},
{ elem: 'css', url: 'index.min.css' }
],
scripts: [{ elem: 'js', url: 'index.min.js' }],
content: [