Skip to content

Instantly share code, notes, and snippets.

@tadatuta
tadatuta / make.js.diff
Created Nov 12, 2016
Run enb-closure-compiler-js if YENV=production
View make.js.diff
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'),
@tadatuta
tadatuta / enb-define.js
Created Dec 15, 2015
ENB version of webpack define plugin
View enb-define.js
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')
View 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'),
View gist:ce9a013691c91adebec0
{
"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"
],
View bemjson.js
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' }],
View gist:fcc6b7bd8523d453d0fd
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: [
View gist:7beb85c518237538bb7c
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: [
View footer.bemjson.js
@tadatuta
tadatuta / bemhtml.js
Created Nov 10, 2015
bem-xjst@4 basic templates
View bemhtml.js
/// -------------------------------------
/// --------- BEM-XJST Runtime Start ----
/// -------------------------------------
var BEMHTML = function(module, exports) {
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.bemhtml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.e
@tadatuta
tadatuta / make.js
Created Dec 10, 2014
enb conf for bemtree
View make.js
@@ -15,7 +15,7 @@ var techs = {
prependYm: require('enb-modules/techs/prepend-modules'),
// bemtree
- // bemtree: require('enb-bemxjst/techs/bemtree-old'),
+ bemtree: require('enb-bemxjst/techs/bemtree-old'),
// bemhtml
bemhtml: require('enb-bemxjst/techs/bemhtml-old'),
@@ -40,8 +40,7 @@ module.exports = function(config) {
You can’t perform that action at this time.