Convert a bunch of dirs to Webpack entries
foo
|- bar
| `- index.js
|- qux
`- baz
`- index.js
/** | |
* Depends on Underscore `extend`. | |
*/ | |
/** | |
* @namespace app | |
*/ | |
window.app = app || {}; | |
/** |
{ | |
"requireCurlyBraces": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"try", | |
"catch", | |
"case", |
Convert a bunch of dirs to Webpack entries
foo
|- bar
| `- index.js
|- qux
`- baz
`- index.js
const ucs2decode = require('transliteration/lib/node/utils').ucs2decode; | |
// getAlphabet is just function that returns array of required chars for transliteration | |
const transliterationRanges = getAlphabet('а', 'я') | |
// A little bit of magic from `transliteration` sources, that used | |
// for searching symbols by charmap.json | |
.map((char) => ucs2decode(char) >> 8) | |
// Leave only unique values | |
.filter((char, i, chars) => ( | |
chars.includes(char, Math.min(i + 1, chars.length)) === false |
Jinja2 | Nunjucks | Support | |
---|---|---|---|
Filters | 50 | 40 | 80% |
Fully compatible | 50 | 27 | 54% |
Jinja2 | Nunjucks | Compatible | Comment |
---|---|---|---|
abs | abs | ✔️ | abs /Math.abs alias |
attr | |||
batch | batch | ✔️ | same implementation |
require('./test.xml'); | |
fest.app(); |
npm i
npm run build -- index.js
mkdir webp && ls -p | grep -v / | sed -e 'p;s/\.[pj][pn]g$//' | xargs -n2 bash -c 'cwebp -q 90 -z 8 -m 6 $0 -o webp/$1.webp' |