├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .travis.yml
├── LICENSE.md
├── README.md
├── appveyor.yml
├── lerna.json
├── package-lock.json
├── package.json
└── packages
├── accord
├── .editorconfig
├── .gitignore
├── .npmignore
├── .travis.yml
├── Makefile
├── contributing.md
├── docs
│ ├── babel.md
│ ├── base-adapter.md
│ ├── buble.md
│ ├── cjsx.md
│ ├── coco.md
│ ├── coffeescript.md
│ ├── csso.md
│ ├── dogescript.md
│ ├── dot.md
│ ├── eco.md
│ ├── ejs.md
│ ├── haml.md
│ ├── handlebars.md
│ ├── jade.md
│ ├── jsx.md
│ ├── less.md
│ ├── livescript.md
│ ├── marc.md
│ ├── markdown.md
│ ├── minify-css.md
│ ├── minify-html.md
│ ├── minify-js.md
│ ├── mustache.md
│ ├── myth.md
│ ├── postcss.md
│ ├── scss.md
│ ├── stylus.md
│ ├── swig.md
│ ├── toffee.md
│ └── typescript.md
├── lib
│ ├── adapter_base.js
│ ├── adapters
│ │ ├── LiveScript
│ │ │ ├── 1.x.js
│ │ │ └── index.js
│ │ ├── babel
│ │ │ ├── 4.x - 5.x.js
│ │ │ ├── 6.x.js
│ │ │ └── index.js
│ │ ├── buble
│ │ │ ├── 0.8.x - 0.15.x.js
│ │ │ └── index.js
│ │ ├── cjsx
│ │ │ ├── 3.x.js
│ │ │ ├── 4.x - 5.x.js
│ │ │ └── index.js
│ │ ├── coco
│ │ │ ├── 0.9.x.js
│ │ │ └── index.js
│ │ ├── coffee-script
│ │ │ ├── 1.x.js
│ │ │ └── index.js
│ │ ├── csso
│ │ │ ├── 1.0.x - 1.3.x.js
│ │ │ ├── 2.x - 3.x.js
│ │ │ ├── ^1.4.js
│ │ │ └── index.js
│ │ ├── dogescript
│ │ │ ├── 2.x.js
│ │ │ └── index.js
│ │ ├── dot
│ │ │ ├── 1.x.js
│ │ │ └── index.js
│ │ ├── eco
│ │ │ ├── 1.x.js
│ │ │ ├── =1.1.0-rc-3.js
│ │ │ └── index.js
│ │ ├── ejs
│ │ │ ├── 2.x.js
│ │ │ └── index.js
│ │ ├── escape-html
│ │ │ ├── 0.5.x.js
│ │ │ ├── 1.x.js
│ │ │ └── index.js
│ │ ├── haml
│ │ │ ├── 0.6.x.js
│ │ │ └── index.js
│ │ ├── handlebars
│ │ │ ├── 3.x - 4.x.js
│ │ │ └── index.js
│ │ ├── jade
│ │ │ ├── 1.x.js
│ │ │ └── index.js
│ │ ├── jsx
│ │ │ ├── 0.13.x.js
│ │ │ └── index.js
│ │ ├── less
│ │ │ ├── 2.x.js
│ │ │ └── index.js
│ │ ├── marc
│ │ │ ├── 0.1.x.js
│ │ │ └── index.js
│ │ ├── markdown
│ │ │ ├── 0.3.x.js
│ │ │ └── index.js
│ │ ├── minify-css
│ │ │ ├── 3.x - 4.x.js
│ │ │ └── index.js
│ │ ├── minify-html
│ │ │ ├── 0.7.x - 1.x.js
│ │ │ ├── 2.x - 3.x.js
│ │ │ └── index.js
│ │ ├── minify-js
│ │ │ ├── 2.x.js
│ │ │ └── index.js
│ │ ├── mustache
│ │ │ ├── 3.x.js
│ │ │ └── index.js
│ │ ├── myth
│ │ │ ├── 1.x.js
│ │ │ └── index.js
│ │ ├── postcss
│ │ │ ├── 4.x - 5.x.js
│ │ │ └── index.js
│ │ ├── pug
│ │ │ ├── 2.0.0-rc - 2.x.js
│ │ │ └── index.js
│ │ ├── scss
│ │ │ ├── 2.x.js
│ │ │ ├── 3.x - 4.x.js
│ │ │ └── index.js
│ │ ├── stylus
│ │ │ ├── 0.x.js
│ │ │ └── index.js
│ │ ├── swig
│ │ │ ├── 1.x.js
│ │ │ └── index.js
│ │ ├── toffee
│ │ │ ├── 0.1.x.js
│ │ │ └── index.js
│ │ └── typescript
│ │ │ ├── 1.x.js
│ │ │ ├── index.js
│ │ │ └── x.x.js
│ ├── index.js
│ └── sourcemaps.js
├── license.md
├── package-lock.json
├── package.json
├── readme.md
├── test
│ ├── fixtures
│ │ ├── babel
│ │ │ ├── basic.js
│ │ │ └── expected
│ │ │ │ ├── basic.js
│ │ │ │ └── string.js
│ │ ├── buble
│ │ │ ├── basic.js
│ │ │ └── expected
│ │ │ │ ├── basic.js
│ │ │ │ └── string.js
│ │ ├── cjsx
│ │ │ ├── basic.cjsx
│ │ │ └── expected
│ │ │ │ ├── basic.coffee
│ │ │ │ └── string.coffee
│ │ ├── coco
│ │ │ ├── basic.co
│ │ │ └── expected
│ │ │ │ ├── basic.js
│ │ │ │ └── string.js
│ │ ├── coffee
│ │ │ ├── basic.coffee
│ │ │ └── expected
│ │ │ │ ├── basic.js
│ │ │ │ └── string.js
│ │ ├── csso
│ │ │ ├── basic.css
│ │ │ ├── expected
│ │ │ │ ├── basic.css
│ │ │ │ ├── opts.css
│ │ │ │ └── string.css
│ │ │ └── opts.css
│ │ ├── dogescript
│ │ │ ├── basic.djs
│ │ │ └── expected
│ │ │ │ ├── basic.js
│ │ │ │ └── string.js
│ │ ├── dot
│ │ │ ├── basic.dot
│ │ │ ├── client-complex.dot
│ │ │ ├── client.dot
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client-complex.html
│ │ │ │ ├── client.html
│ │ │ │ ├── cstring.html
│ │ │ │ ├── partial.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── rstring.html
│ │ │ ├── partial.dot
│ │ │ └── precompile.dot
│ │ ├── eco
│ │ │ ├── basic.eco
│ │ │ ├── client.eco
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client.html
│ │ │ │ ├── cstring.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── rstring.html
│ │ │ └── precompile.eco
│ │ ├── ejs
│ │ │ ├── basic.ejs
│ │ │ ├── client-complex.ejs
│ │ │ ├── client.ejs
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client-complex.html
│ │ │ │ ├── client.html
│ │ │ │ ├── cstring.html
│ │ │ │ ├── partial.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── rstring.html
│ │ │ ├── includeme.ejs
│ │ │ ├── partial.ejs
│ │ │ └── precompile.ejs
│ │ ├── escape-html
│ │ │ ├── basic.html
│ │ │ ├── escapable.html
│ │ │ └── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── escapable.html
│ │ │ │ └── string.html
│ │ ├── haml
│ │ │ ├── basic.haml
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── rstring.html
│ │ │ └── precompile.haml
│ │ ├── handlebars
│ │ │ ├── basic.hbs
│ │ │ ├── client-complex.hbs
│ │ │ ├── client.hbs
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client-complex.html
│ │ │ │ ├── client.html
│ │ │ │ ├── cstring.html
│ │ │ │ ├── partial.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── rstring.html
│ │ │ ├── partial.hbs
│ │ │ └── precompile.hbs
│ │ ├── jade
│ │ │ ├── _partial_content.jade
│ │ │ ├── async.jade
│ │ │ ├── basic.jade
│ │ │ ├── client-complex.jade
│ │ │ ├── client.jade
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client-complex.html
│ │ │ │ ├── client.html
│ │ │ │ ├── cstring.html
│ │ │ │ ├── partial.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── rstring.html
│ │ │ ├── partial.jade
│ │ │ └── precompile.jade
│ │ ├── jsx
│ │ │ ├── basic.jsx
│ │ │ └── expected
│ │ │ │ ├── basic.js
│ │ │ │ └── string.js
│ │ ├── less
│ │ │ ├── _import.less
│ │ │ ├── basic.less
│ │ │ ├── expected
│ │ │ │ ├── basic.css
│ │ │ │ ├── external.css
│ │ │ │ └── string.css
│ │ │ └── external.less
│ │ ├── livescript
│ │ │ ├── basic.ls
│ │ │ └── expected
│ │ │ │ ├── basic.js
│ │ │ │ └── string.js
│ │ ├── marc
│ │ │ ├── basic.md
│ │ │ └── expected
│ │ │ │ └── basic.html
│ │ ├── markdown
│ │ │ ├── basic.md
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── opts.html
│ │ │ │ └── string.html
│ │ │ └── opts.md
│ │ ├── minify-css
│ │ │ ├── basic.css
│ │ │ ├── expected
│ │ │ │ ├── basic.css
│ │ │ │ ├── opts.css
│ │ │ │ └── string.css
│ │ │ └── opts.css
│ │ ├── minify-html
│ │ │ ├── basic.html
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── opts.html
│ │ │ │ └── string.html
│ │ │ └── opts.html
│ │ ├── minify-js
│ │ │ ├── basic.js
│ │ │ ├── expected
│ │ │ │ ├── basic.js
│ │ │ │ ├── opts.js
│ │ │ │ └── string.js
│ │ │ └── opts.js
│ │ ├── mustache
│ │ │ ├── basic.mustache
│ │ │ ├── client-complex.mustache
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client-complex.html
│ │ │ │ ├── partial.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── string.html
│ │ │ ├── partial.mustache
│ │ │ └── precompile.mustache
│ │ ├── myth
│ │ │ ├── basic.myth
│ │ │ ├── expected
│ │ │ │ ├── basic.css
│ │ │ │ ├── import.css
│ │ │ │ └── string.css
│ │ │ ├── import.myth
│ │ │ └── imported.myth
│ │ ├── postcss
│ │ │ ├── basic.css
│ │ │ ├── expected
│ │ │ │ ├── basic.css
│ │ │ │ ├── string.css
│ │ │ │ └── var.css
│ │ │ └── var.css
│ │ ├── pug
│ │ │ ├── _partial_content.pug
│ │ │ ├── async.pug
│ │ │ ├── basic.pug
│ │ │ ├── client-complex.pug
│ │ │ ├── client.pug
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client-complex.html
│ │ │ │ ├── client.html
│ │ │ │ ├── cstring.html
│ │ │ │ ├── partial.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── rstring.html
│ │ │ ├── partial.pug
│ │ │ └── precompile.pug
│ │ ├── scss
│ │ │ ├── _mixin_lib.scss
│ │ │ ├── basic.scss
│ │ │ ├── expected
│ │ │ │ ├── basic.css
│ │ │ │ ├── external.css
│ │ │ │ └── string.css
│ │ │ └── external.scss
│ │ ├── stylus
│ │ │ ├── basic.styl
│ │ │ ├── embedurl.styl
│ │ │ ├── expected
│ │ │ │ ├── basic.css
│ │ │ │ ├── defines.css
│ │ │ │ ├── embedurl-opts.css
│ │ │ │ ├── embedurl.css
│ │ │ │ ├── import1.css
│ │ │ │ ├── import2.css
│ │ │ │ ├── include1.css
│ │ │ │ ├── include2.css
│ │ │ │ ├── include_css.css
│ │ │ │ ├── plugins1.css
│ │ │ │ ├── plugins2.css
│ │ │ │ ├── rawdefine.css
│ │ │ │ └── string.css
│ │ │ ├── extra_plugin
│ │ │ │ └── index.styl
│ │ │ ├── img
│ │ │ │ ├── default.png
│ │ │ │ └── wow.jpg
│ │ │ ├── import1.styl
│ │ │ ├── import2.styl
│ │ │ ├── include1.styl
│ │ │ ├── include2.styl
│ │ │ ├── include_css.styl
│ │ │ ├── pluginz
│ │ │ │ ├── lib.styl
│ │ │ │ └── lib2.styl
│ │ │ ├── rawdefine.styl
│ │ │ └── to_include.css
│ │ ├── swig
│ │ │ ├── _layout.html
│ │ │ ├── basic.swig
│ │ │ ├── client-complex.swig
│ │ │ ├── client.swig
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── client-complex.html
│ │ │ │ ├── client.html
│ │ │ │ ├── cstring.html
│ │ │ │ ├── partial.html
│ │ │ │ ├── precompile.html
│ │ │ │ ├── pstring.html
│ │ │ │ └── string.html
│ │ │ ├── partial.swig
│ │ │ └── precompile.swig
│ │ ├── toffee
│ │ │ ├── basic.toffee
│ │ │ ├── expected
│ │ │ │ ├── basic.html
│ │ │ │ ├── my_templates-2.html
│ │ │ │ ├── my_templates.html
│ │ │ │ ├── no-header-templ.html
│ │ │ │ └── template.html
│ │ │ ├── my_templates-2.toffee
│ │ │ ├── my_templates.toffee
│ │ │ └── template.toffee
│ │ └── typescript
│ │ │ ├── basic.ts
│ │ │ └── expected
│ │ │ ├── basic.js
│ │ │ └── string.js
│ ├── mocha.opts
│ ├── npm-debug.log
│ ├── support
│ │ └── all.js
│ └── test.js
└── yarn.lock
├── cli
├── README.md
├── cli-run.js
├── cli.js
├── init
│ ├── index.js
│ ├── installDeps.js
│ ├── npmInit.js
│ ├── promptListWithHelpText.js
│ ├── renderLastInit.js
│ ├── scaffold.js
│ └── updatePkgScripts.js
├── package-lock.json
├── package.json
├── pingy-ascii.txt
└── test
│ ├── 1-test-simple.spec.js
│ ├── 2-test-advanced.spec.js
│ ├── 3-test-scaffold.spec.js
│ ├── assertions.js
│ └── fixtures
│ ├── _inner.ejs
│ ├── _inner.pug
│ ├── _inner.scss
│ ├── index.ejs
│ └── package.json
├── compile
├── .editorconfig
├── .gitignore
├── .jshintignore
├── .npmrc
├── .travis.yml
├── README.md
├── fixtures
│ ├── compiled
│ │ ├── autoprefixer
│ │ │ ├── unprefixed.css
│ │ │ ├── unprefixed.less
│ │ │ ├── unprefixed.myth
│ │ │ ├── unprefixed.scss
│ │ │ └── unprefixed.styl
│ │ ├── babel
│ │ │ ├── basic.js
│ │ │ └── string.js
│ │ ├── coco
│ │ │ ├── basic.js
│ │ │ └── string.js
│ │ ├── coffee
│ │ │ ├── basic.js
│ │ │ └── string.js
│ │ ├── csso
│ │ │ ├── basic.css
│ │ │ ├── opts.css
│ │ │ └── string.css
│ │ ├── dogescript
│ │ │ ├── basic.js
│ │ │ └── string.js
│ │ ├── ejs
│ │ │ ├── basic.html
│ │ │ ├── client-complex.html
│ │ │ ├── client.html
│ │ │ ├── cstring.html
│ │ │ ├── partial.html
│ │ │ ├── precompile.html
│ │ │ ├── pstring.html
│ │ │ └── rstring.html
│ │ ├── escape-html
│ │ │ ├── basic.html
│ │ │ ├── escapable.html
│ │ │ └── string.html
│ │ ├── haml
│ │ │ ├── basic.html
│ │ │ ├── precompile.html
│ │ │ ├── pstring.html
│ │ │ └── rstring.html
│ │ ├── handlebars
│ │ │ ├── basic.html
│ │ │ ├── client-complex.html
│ │ │ ├── client.html
│ │ │ ├── cstring.html
│ │ │ ├── partial.html
│ │ │ ├── precompile.html
│ │ │ ├── pstring.html
│ │ │ └── rstring.html
│ │ ├── jade
│ │ │ ├── basic.html
│ │ │ ├── client-complex.html
│ │ │ ├── client.html
│ │ │ ├── cstring.html
│ │ │ ├── partial.html
│ │ │ ├── precompile.html
│ │ │ ├── pstring.html
│ │ │ └── rstring.html
│ │ ├── less
│ │ │ ├── basic.css
│ │ │ ├── external.css
│ │ │ └── string.css
│ │ ├── livescript
│ │ │ ├── basic.js
│ │ │ └── string.js
│ │ ├── marc
│ │ │ └── basic.html
│ │ ├── markdown
│ │ │ ├── basic.html
│ │ │ ├── opts.html
│ │ │ └── string.html
│ │ ├── minify-css
│ │ │ ├── basic.css
│ │ │ ├── opts.css
│ │ │ └── string.css
│ │ ├── minify-html
│ │ │ ├── basic.html
│ │ │ ├── opts.html
│ │ │ └── string.html
│ │ ├── minify-js
│ │ │ ├── basic.js
│ │ │ ├── opts.js
│ │ │ └── string.js
│ │ ├── mustache
│ │ │ ├── basic.html
│ │ │ ├── client-complex.html
│ │ │ ├── partial.html
│ │ │ ├── precompile.html
│ │ │ ├── pstring.html
│ │ │ └── string.html
│ │ ├── myth
│ │ │ ├── basic.css
│ │ │ ├── import.css
│ │ │ └── string.css
│ │ ├── scss
│ │ │ ├── basic.css
│ │ │ ├── external.css
│ │ │ └── string.css
│ │ ├── stylus
│ │ │ ├── basic.css
│ │ │ ├── defines.css
│ │ │ ├── embedurl-opts.css
│ │ │ ├── embedurl.css
│ │ │ ├── import1.css
│ │ │ ├── import2.css
│ │ │ ├── include1.css
│ │ │ ├── include2.css
│ │ │ ├── include_css.css
│ │ │ ├── plugins1.css
│ │ │ ├── plugins2.css
│ │ │ └── string.css
│ │ ├── swig
│ │ │ ├── basic.html
│ │ │ ├── client-complex.html
│ │ │ ├── client.html
│ │ │ ├── cstring.html
│ │ │ ├── partial.html
│ │ │ ├── precompile.html
│ │ │ ├── pstring.html
│ │ │ └── string.html
│ │ └── toffee
│ │ │ ├── basic.html
│ │ │ ├── my_templates-2.html
│ │ │ ├── my_templates.html
│ │ │ ├── no-header-templ.html
│ │ │ └── template.html
│ └── source
│ │ ├── autoprefixer
│ │ ├── unprefixed.css
│ │ ├── unprefixed.less
│ │ ├── unprefixed.myth
│ │ ├── unprefixed.scss
│ │ └── unprefixed.styl
│ │ ├── babel
│ │ ├── .babelrc
│ │ ├── basic.babel.js
│ │ └── simplest.babel.js
│ │ ├── basic.css
│ │ ├── coco
│ │ └── basic.co
│ │ ├── coffee
│ │ └── basic.coffee
│ │ ├── csso
│ │ ├── basic.css
│ │ └── opts.css
│ │ ├── dogescript
│ │ └── basic.djs
│ │ ├── ejs
│ │ ├── basic.ejs
│ │ ├── client-complex.ejs
│ │ ├── client.ejs
│ │ ├── includeme.ejs
│ │ ├── partial.ejs
│ │ └── precompile.ejs
│ │ ├── escape-html
│ │ ├── basic.html
│ │ └── escapable.html
│ │ ├── haml
│ │ ├── basic.haml
│ │ └── precompile.haml
│ │ ├── handlebars
│ │ ├── basic.hbs
│ │ ├── client-complex.hbs
│ │ ├── client.hbs
│ │ ├── partial.hbs
│ │ └── precompile.hbs
│ │ ├── jade
│ │ ├── _partial_content.jade
│ │ ├── async.jade
│ │ ├── basic.jade
│ │ ├── client-complex.jade
│ │ ├── client.jade
│ │ ├── partial.jade
│ │ └── precompile.jade
│ │ ├── less
│ │ ├── _cache_partial.less
│ │ ├── _import.less
│ │ ├── basic.less
│ │ ├── cache.less
│ │ └── external.less
│ │ ├── livescript
│ │ └── basic.ls
│ │ ├── marc
│ │ └── basic.md
│ │ ├── markdown
│ │ ├── basic.md
│ │ └── opts.md
│ │ ├── minify-css
│ │ ├── basic.css
│ │ └── opts.css
│ │ ├── minify-html
│ │ ├── basic.html
│ │ └── opts.html
│ │ ├── minify-js
│ │ ├── basic.js
│ │ └── opts.js
│ │ ├── mustache
│ │ ├── basic.mustache
│ │ ├── client-complex.mustache
│ │ ├── partial.mustache
│ │ └── precompile.mustache
│ │ ├── myth
│ │ ├── basic.myth
│ │ ├── import.myth
│ │ └── imported.myth
│ │ ├── scss
│ │ ├── _cache_partial.scss
│ │ ├── _mixin_lib.scss
│ │ ├── autoprefix.scss
│ │ ├── basic.scss
│ │ ├── cache.scss
│ │ ├── external.scss
│ │ └── syntaxerror.scss
│ │ ├── stylus
│ │ ├── basic.styl
│ │ ├── cache.styl
│ │ ├── embedurl.styl
│ │ ├── extra_plugin
│ │ │ └── index.styl
│ │ ├── img
│ │ │ ├── default.png
│ │ │ └── wow.jpg
│ │ ├── import1.styl
│ │ ├── import2.styl
│ │ ├── include1.styl
│ │ ├── include2.styl
│ │ ├── include_css.styl
│ │ ├── pluginz
│ │ │ ├── lib.styl
│ │ │ └── lib2.styl
│ │ └── to_include.css
│ │ ├── swig
│ │ ├── _layout.html
│ │ ├── basic.swig
│ │ ├── client-complex.swig
│ │ ├── client.swig
│ │ ├── partial.swig
│ │ └── precompile.swig
│ │ ├── toffee
│ │ ├── basic.toffee
│ │ ├── my_templates-2.toffee
│ │ ├── my_templates.toffee
│ │ └── template.toffee
│ │ └── unchanged.txt
├── lib
│ ├── compile.js
│ └── minify.js
├── package-lock.json
├── package.json
└── test
│ └── compile.test.js
├── core
├── index.js
├── package-lock.json
└── package.json
├── export
├── .gitignore
├── .travis.yml
├── README.md
├── examples
│ ├── compile-site.js
│ └── site
│ │ ├── .babelrc
│ │ ├── about.html
│ │ ├── dont-compile
│ │ └── foo.coffee
│ │ ├── dont-copy
│ │ ├── _inner.styl
│ │ ├── bar.jade
│ │ └── foo.html
│ │ ├── index.jade
│ │ ├── scripts
│ │ ├── iterate.js
│ │ ├── log.babel.js
│ │ └── main.coffee
│ │ └── styles
│ │ ├── main.styl
│ │ └── typography.css
├── lib
│ ├── helpers.js
│ ├── index.js
│ └── preflight.js
├── package-lock.json
├── package.json
└── test
│ ├── compile.spec.js
│ └── exclusionsApi-compile.spec.js
├── init
├── .gitignore
├── .jshintrc
├── .npmignore
├── .travis.yml
├── LICENSE
├── README.md
├── compilerMap.json
├── index.js
├── package-lock.json
├── package.json
├── templates
│ ├── .babelrc
│ ├── index.ejs
│ ├── index.html
│ ├── index.jade
│ ├── index.pug
│ ├── scripts
│ │ ├── main.babel.js
│ │ ├── main.buble.js
│ │ ├── main.coffee
│ │ ├── main.djs
│ │ ├── main.js
│ │ ├── main.ls
│ │ └── main.ts
│ └── styles
│ │ ├── main.css
│ │ ├── main.less
│ │ ├── main.sass
│ │ ├── main.scss
│ │ └── main.styl
└── test
│ ├── helpers.js
│ └── test.js
├── instant
├── .eslintignore
├── .gitignore
├── .npmignore
├── .travis.yml
├── README.md
├── client
│ ├── .eslintrc
│ ├── add.js
│ ├── connectionLost.js
│ ├── find.js
│ ├── index.js
│ └── url.js
├── lib
│ ├── index.js
│ ├── inject.js
│ └── serve.js
├── package-lock.json
├── package.json
└── test
│ ├── fixture
│ ├── index.html
│ ├── main.css
│ └── main.js
│ └── index.js
├── middleware
├── .gitignore
├── .jshintrc
├── .travis.yml
├── README.md
├── examples
│ ├── basic-connect-server.js
│ ├── live-reload-server.js
│ └── site
│ │ ├── index.jade
│ │ ├── scripts
│ │ └── main.coffee
│ │ └── styles
│ │ ├── _headings.styl
│ │ └── main.styl
├── lib
│ ├── cache.js
│ ├── helpers.js
│ └── middleware.js
├── package-lock.json
├── package.json
└── test
│ ├── helpers-test.js
│ └── middleware-test.js
├── scaffold-middleware
├── client.js
├── index.js
├── package-lock.json
└── package.json
├── scaffold-primitive
├── dotPingyTmpl.js
├── helpers.js
├── index.js
├── package-lock.json
└── package.json
└── scaffold
├── index.js
├── package-lock.json
├── package.json
└── test
├── fixtures
├── a
│ └── pingy-scaffold.json
└── b
│ ├── package.json
│ └── pingy-scaffold.json
└── test.spec.js
/.eslintignore:
--------------------------------------------------------------------------------
1 | **/node_modules/**
2 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: ['airbnb-base', 'prettier'],
3 | env: {
4 | node: true,
5 | mocha: true,
6 | },
7 | plugins: ['import', 'mocha'],
8 | parserOptions: {
9 | ecmaVersion: 8,
10 | sourceType: 'script',
11 | ecmaFeatures: {
12 | modules: false,
13 | },
14 | },
15 | rules: {
16 | strict: ['error', 'global'],
17 | 'comma-dangle': [
18 | 'error',
19 | {
20 | arrays: 'never',
21 | objects: 'always-multiline',
22 | imports: 'never',
23 | exports: 'never',
24 | functions: 'ignore',
25 | },
26 | ],
27 | 'import/no-extraneous-dependencies': [
28 | 'error',
29 | { devDependencies: ['**/*.test.js', '**/*.spec.js'] },
30 | ],
31 | quotes: ['error', 'single', { avoidEscape: true }],
32 | },
33 | };
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | lerna-debug.log
2 | node_modules
3 | .env
4 | .idea
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | os:
2 | - linux
3 | language: node_js
4 | sudo: false
5 | node_js:
6 | - "8"
7 | - "9"
8 | addons:
9 | apt:
10 | packages:
11 | - google-chrome-stable
12 | env:
13 | global:
14 | secure: fQxPABC3XlnH6U2CUR/+s+yk5Oi1P6CLdfYSAbJlLcPc1Qzcfv5Q/vDra68rclJR2l1AZ9jmz1kGZ0XVjfwfg8smgKtUoR0Ipd8ucHhIZd1ruHkr611K7jmEsAf3EmmqwXzglpSeY1fIqfDvJQP67epy8SAPpr8HQlnRucYw+j2NBEjV3AsTc0+M0u0TeYCHgWfqIDsNrllP8Y5nBOLHy2snbWAGRhlGpchFP0IJ+aoY+FVVw+je8ej+UuW/j6hWjc2oBM3/mxJFTDOkCEZ/CCCVRl7al4DO8foiJ9R7lQiv6z2LO1b/nvC/ZIt4wpXY+2YqHtWMCAuxX6sMzioAtxY22+ibDQaInzsxLvzPo4afKr1fx6vlZl780MWoh2KVpr+Q1X0y2vmFfxN6WPdghZ1sf0n2kgUAUgMhF5I0i0gI2fQUrJIS6QP6bJLsd5h2gY6a9kj1vqSNjjkU9avPIM0k5jH8awRfAY/bBA9xXQWZ4QTb2+suLjNBi1X/sXOKWMNWL5d5svFZqY8baIokfGWKOGks1COe5gTK/qk6eJoL02DjqCPyRXJjL9dPBqSr6pGpgmCAiPkm4MM7t3yLlVyVLwi0GAPcu2lPEQnxV9vG8FJH1xorA26qpNWbr7DPRiH2T3hqqxDjxfHot00w4v0ig9IymkXMK9Ho7TMIeSw=
15 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2017 Pingy
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | environment:
2 | matrix:
3 | - nodejs_version: "7"
4 | - nodejs_version: "9"
5 | PINGY_GITHUB_TOKEN:
6 | secure: SVLm+MLbe5h3HXFxDF5HmHrhYm8RGh87f3u5puMzSTffgtn88a2+dkN+VgTz9zJL
7 |
8 | install:
9 | - ps: Install-Product node $env:nodejs_version
10 | - appveyor-retry call npm install
11 |
12 | test_script:
13 | - node --version
14 | - npm --version
15 | - npm test
16 |
17 | build: off
18 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "lerna": "2.7.1",
3 | "packages": ["packages/*"],
4 | "version": "independent"
5 | }
6 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pingy-cli",
3 | "private": true,
4 | "author": "Dave Jeffery ",
5 | "license": "MIT",
6 | "scripts": {
7 | "test": "lerna run test",
8 | "install": "lerna bootstrap"
9 | },
10 | "devDependencies": {
11 | "eslint": "^4.19.1",
12 | "eslint-config-airbnb-base": "^12.1.0",
13 | "eslint-config-prettier": "^2.9.0",
14 | "eslint-plugin-import": "^2.12.0",
15 | "eslint-plugin-mocha": "^4.11.0",
16 | "lerna": "^2.11.0"
17 | },
18 | "workspaces": [
19 | "packages/*"
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/packages/accord/.editorconfig:
--------------------------------------------------------------------------------
1 | # This file is for unifying the coding style for different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | indent_style = space
11 | indent_size = 2
12 |
--------------------------------------------------------------------------------
/packages/accord/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | polytest_*
4 | coverage
--------------------------------------------------------------------------------
/packages/accord/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | src
3 | .travis.yml
4 | Makefile
5 | docs
6 | coverage
7 | yarn.lock
8 | polytest_*
9 |
--------------------------------------------------------------------------------
/packages/accord/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | sudo: false
3 | node_js:
4 | - 4
5 | - 6
6 | after_script:
7 | - npm run coveralls
8 |
--------------------------------------------------------------------------------
/packages/accord/Makefile:
--------------------------------------------------------------------------------
1 | build:
2 | cp -R lib src
3 | ./node_modules/coffee-script/bin/coffee -c lib
4 | find lib -iname "*.coffee" -exec rm '{}' ';'
5 |
6 | unbuild:
7 | rm -rf lib
8 | mv src lib
9 |
10 | publish:
11 | make build
12 | npm publish .
13 | make unbuild
14 |
--------------------------------------------------------------------------------
/packages/accord/docs/babel.md:
--------------------------------------------------------------------------------
1 | # Babel
2 |
3 | Babel is a very nice, cleanly built es6 to es5 transpiler. It generates significantly more readable code than other popular transpilers like traceur, has full support for all ES6 additions, and is quite quick. You can find a full list of options that can be passed to this adapter [here](https://babeljs.io/docs/usage/options/). It also includes support for jsx.
4 |
5 | ## Supported Methods
6 |
7 | - render
8 |
9 | ## Source Maps
10 |
11 | Source maps are well supported by Babel. Just pass in `sourcemap: true` as an option and you will get back `sourcemap` on the response object.
--------------------------------------------------------------------------------
/packages/accord/docs/base-adapter.md:
--------------------------------------------------------------------------------
1 | # Base Adapter
2 | All accord adapters inherit from a base adapter. So, the options documented here will work with all the other adapters (unless otherwise noted).
3 |
4 | ## Supported Methods
5 | Not all compilers implement the full list of methods, but these are the ones they _can_ support. Check the docs for the specific adapter to find out what methods it supports.
6 | - `render`
7 | - `compile`
8 | - `compileClient`
9 | - `clientHelpers`
10 |
11 | In addition, anything that supports a particular method (other than `clientHelpers`) will automatically support the "file" version of that method. For example, if it supports `render`, it will support `renderFile`.
12 |
13 | ## Options
14 | ### Filename
15 | - key: `filename`
16 | - type: `String`
17 | - default: The filename that's passed to `compileFile`, otherwise `undefined`.
18 |
19 | If you use the `compile` or `render` function, but you also happen to know the filename of the file that's being compiled, you can pass it in the `options` object as `filename`. By providing the filename, it will usually improve error reporting, but it varies depending on the compiler.
20 |
21 | If you pass the filename to the function (as with `renderFile`, `compileFile`, and `compileFileClient`) then `filename` will be set for you.
22 |
--------------------------------------------------------------------------------
/packages/accord/docs/buble.md:
--------------------------------------------------------------------------------
1 | # Bublé
2 |
3 | Bublé is an ES2015 compiler. It takes your ES2015 JavaScript code and turns it into code that can run in today's environments, including old versions of Node.js and Internet Explorer.
4 |
5 | As the name suggests, Bublé is heavily inspired by (and indebted to) Babel – but there are some key differences:
6 |
7 | * Bublé limits itself to ES2015 that can be compiled to compact, performant ES5
8 | * There are no plugins or presets – less extensibility, but also zero configuration
9 | * Code is only altered where necessary – your formatting and code style remain intact
10 | * It's comparatively tiny and much faster
11 |
12 | ## Supported Methods
13 |
14 | - render
15 |
16 | ## Source Maps
17 |
18 | Source maps are not optional in Bublé. You will always get back `sourcemap` on the response object.
19 |
--------------------------------------------------------------------------------
/packages/accord/docs/cjsx.md:
--------------------------------------------------------------------------------
1 | # CJSX
2 |
3 | Transforms jsx syntax in coffeescript files into valid coffeescript. Does not transform all the way down to javascript, you must also compile the resulting coffeescript code after this if you are targeting js.
4 |
5 | Does not accept any options, and does not geneerate sourcemaps, although that feature is currently in progress according to the author at time of writing.
6 |
7 | ## Supported Methods
8 |
9 | - render
--------------------------------------------------------------------------------
/packages/accord/docs/coco.md:
--------------------------------------------------------------------------------
1 | # Coco
2 | Coco is a fork of CoffeeScript that tries to eliminate some pain points. It has a very similar compiler to that of CoffeeScript, with even fewer options. The options are not documented anywhere explicitly, but I found just two being used in the source, documented below:
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | Coco does not support source maps, unfortunately. If they do add support we would be happy to add it to accord.
10 |
11 | ## Additional Options
12 | ### Bare
13 | - key: `bare`
14 | - type: `Boolean`
15 | - default: `false`
16 |
17 | Compile without function closure.
18 |
--------------------------------------------------------------------------------
/packages/accord/docs/coffeescript.md:
--------------------------------------------------------------------------------
1 | # CoffeeScript
2 | The CoffeeScript adapter API is almost exactly the same as the CoffeeScript JS API, making this an easy transition. The CoffeeScript JS API options are notoriously difficult to find anywhere online, so I've taken the liberty of listing out all the ones I could find here for you.
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | Source maps are supported by the coffeescript adapter. Just pass in `sourcemap: true` as an option and you will get back both `sourcemap` and `v2sourcemap`, on the response object.
10 |
11 | ## Additional Options
12 | ### Bare
13 | - key: `bare`
14 | - type: `Boolean`
15 | - default: `false`
16 |
17 | Compile without function closure
18 |
19 | ### Header
20 | - key: `header`
21 | - type: ``
22 | - default: ``
23 |
24 | Inject a comment with the CoffeeScript version into all compiled files
25 |
26 | ### SourceMap
27 | - key: `sourceMap`
28 | - type: ``
29 | - default: ``
30 |
31 | Generate a sourcemap on compile. requires `filename`
32 |
33 | ## Other Options I Don't Understand
34 | While browsing the source, I cam across a few other options I didn't really get, and they are not documented anywhere. If anyone knows what these are, please contribute an explanation!
35 |
36 | - `sandbox`
37 | - `modulename`
38 | - `shiftLine`
39 | - `execPath`
40 |
--------------------------------------------------------------------------------
/packages/accord/docs/csso.md:
--------------------------------------------------------------------------------
1 | # CSSO
2 | CSSO is a great tool for optimizing CSS. It's public API is very simple, sometimes to a fault, where it becomes difficult to track down errors. Although we're considering building in some extra error tracking in the future, for now just be careful.
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | CSSO does not have support for source maps, unfortunately. There is an open issue for it [here](https://github.com/css/csso/issues/173). If they do add support we'd be happy to integrate it with accord.
10 |
11 | ## Additional Options
12 |
13 | ### Restructuring
14 | - key: `restructuring`
15 | - type: `Boolean`
16 | - default: `true`
17 |
18 | If set to false it disables structure minimization. Structure minimization is a feature that merges together blocks that have the same selector.
19 |
20 | ### Debug
21 | - key: `debug`
22 | - type: `Boolean`
23 | - default: `false`
24 |
25 | Emits additional information for debugging if set to true.
--------------------------------------------------------------------------------
/packages/accord/docs/dogescript.md:
--------------------------------------------------------------------------------
1 | # Dogescript
2 | Dogescript is potentially the greatest language on the internet. Not that this has anything to do with these docs, just couldn't resist adding it. It has a very simple and straightforward compiler that only takes two options, documented [here](https://github.com/remixz/dogescript#javascript) - only difference is that accord takes these via an options object rather than direct parameters, as usual.
3 |
4 | Full options in an example:
5 |
6 | ```js
7 | dogescript = accord.load('dogescript');
8 | dogescript.render('wow', { beauty: true, trueDoge: true })
9 | ```
10 |
11 | ## Supported Methods
12 | - render
13 |
14 | ## Source Maps
15 |
16 | Dogescript does not support sourcemaps. Honestly, I doubt it ever will. If you are writing dogescript, you probably don't need sourcemaps anyway because you are too boss for that kind of stuff.
17 |
--------------------------------------------------------------------------------
/packages/accord/docs/dot.md:
--------------------------------------------------------------------------------
1 | # doT
2 | A Javascript templating engine designed to emphasis performance under V8 and nodejs. Showing promise for both server and client side implementations.
3 |
4 | doT's interface is similar to EJS's. The engine takes an object of options. The github can be found [here](https://github.com/olado/doT). While the actual documentation can be found [here](http://olado.github.io/doT/)
5 |
6 | ## Supported Methods
7 | - render
8 | - compile
9 | - compileClient
10 | - clientHelpers
11 |
--------------------------------------------------------------------------------
/packages/accord/docs/eco.md:
--------------------------------------------------------------------------------
1 | # ECO
2 | ECO is very similar to ERB but instead allows coffeescript inside `<% ... %>`. Usage can be found [here](https://github.com/sstephenson/eco#usage).
3 |
4 | ## Supported Methods
5 | - render
6 | - compile
7 |
--------------------------------------------------------------------------------
/packages/accord/docs/ejs.md:
--------------------------------------------------------------------------------
1 | # EJS
2 | EJS's interface, like Jade's, is almost the exact same as accord's. It simply takes an object of options. You can see those options [here](https://github.com/visionmedia/ejs#options).
3 |
4 | ## Supported Methods
5 | - render
6 | - compile
7 | - compileClient
8 | - clientHelpers
9 |
--------------------------------------------------------------------------------
/packages/accord/docs/haml.md:
--------------------------------------------------------------------------------
1 | # HAML
2 | The haml compiler is very simple and fairly weak in comparison to other JavaScript templating engines (like Jade). It does not support any sort of layout system or includes, and it does not support client-side templates (yet). Its compile options are not documented, but here's what I could find in the source:
3 |
4 | ## Supported Methods
5 | - render
6 | - compile
7 |
8 | ## Additional Options
9 | ### Cache
10 | - key: `no_restructure`
11 | - type: `Boolean`
12 | - default: `false`
13 |
14 | Used to cache templates; `filename` is required to use this.
15 |
16 | ## Extending HAML
17 | HAML also allows you to [extend it](https://github.com/visionmedia/haml.js#extending-haml) with custom filters and doctypes, although this functionality has not yet been added to the accord adapter due to low demand. If there is a need, open an issue and/or pull request and adding it should not be too much work.
18 |
--------------------------------------------------------------------------------
/packages/accord/docs/jade.md:
--------------------------------------------------------------------------------
1 | # Jade
2 | The jade adapter is used in just about the exact same as the jade public api, making this adapter a very easy transition. Jade takes the [options listed here under "options"](http://jade-lang.com/api/) and they are fed through directly.
3 |
4 | ## Supported Methods
5 | - render
6 | - compile
7 | - compileClient
8 | - clientHelpers
9 |
10 | ## Source Maps
11 |
12 | Jade does not support source maps and has no plans of doing so in the near future. See [this issue](https://github.com/jadejs/jade/issues/941) for discussion.
13 |
--------------------------------------------------------------------------------
/packages/accord/docs/jsx.md:
--------------------------------------------------------------------------------
1 | # JSX
2 |
3 | Transforms React's jsx syntax into normal javascript. Very simple, only a few options, which [can be found here](https://www.npmjs.com/package/react-tools#transforminputstring-options). Disregard the *sourceMap* and *sourceFilename* options, just pass *sourcemap: true* and everything will be configured for you. At the time of writing, the valid options are:
4 |
5 | - `harmony`: enable es6 features
6 | - `stripTypes`: strips out type annotations
7 |
8 | ## Supported Methods
9 |
10 | - render
11 |
12 | ## Source Maps
13 |
14 | Source maps are supported by the jsx adapter. Just pass in `sourcemap: true` as an option and you will get back `sourcemap` on the response object.
--------------------------------------------------------------------------------
/packages/accord/docs/less.md:
--------------------------------------------------------------------------------
1 | # LESS
2 | LESS has a very simple public API with just a couple options, which [can be found here](https://github.com/less/less.js/#configuration). The accord adapter takes all the same options other than the minify option, which is redundant as it can be provided through [minify-css](minify-css.md). Filename is automatically filled in when using `renderFile`, so no need to provide it. Full example below:
3 |
4 | ```js
5 | less = accord.load('less');
6 | less.render('some less code', {
7 | paths: ['/path/to/folder/for/includes'],
8 | filename: 'foo.less'
9 | });
10 | ```
11 |
12 | ## Supported Methods
13 | - render
14 |
15 | ## Source Maps
16 |
17 | The less adapter does have support for sourcemaps. You can pass in `sourceMap: true` as an option and receive a map back on the response object as `sourcemap`.
18 |
19 | ## Compile time included imports
20 |
21 | The less adapter returns an array of files included via `@import`. This array will be available as `imports` on the response object.
22 |
--------------------------------------------------------------------------------
/packages/accord/docs/livescript.md:
--------------------------------------------------------------------------------
1 | # LiveScript
2 | LiveScript is a fork of Coco, which is a fork of CoffeeScript. More info on changes and additons can be found [here](http://livescript.net/).
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | Livescript does not yet have support for source maps. You can see an open issue for this feature [here](https://github.com/gkz/LiveScript/issues/452).
10 |
11 | ## Additional Options
12 | Its compiler is unsurprisingly very similar to both CoffeeScript and Coco, and has only 2 unique options, explained below.
13 |
14 | ### Bare
15 | - key: `bare`
16 | - type: `Boolean`
17 | - default: `false`
18 |
19 | Compile without function closure.
20 |
21 | ### Const
22 | - key: `const`
23 | - type: `Boolean`
24 | - default: `false`
25 |
26 | Compile all variables as constants
27 |
--------------------------------------------------------------------------------
/packages/accord/docs/minify-css.md:
--------------------------------------------------------------------------------
1 | # Minify CSS
2 | CSS is minified with the fantastic [clean-css](https://github.com/GoalSmashers/clean-css) library. The direct compiler takes a hash of options just like accord does. You can see the [options that can be passed here](https://github.com/GoalSmashers/clean-css#how-to-use-clean-css-programmatically).
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | Clean CSS does not yet have support for source maps, but it is [in the works](https://github.com/jakubpawlowicz/clean-css/issues/125) at the time of writing. We will re-examine if/when this feature is fully implemented.
10 |
--------------------------------------------------------------------------------
/packages/accord/docs/minify-html.md:
--------------------------------------------------------------------------------
1 | # Minify HTML
2 | The html minifier uses [html-minifier](https://github.com/kangax/html-minifier), which accepts a hash of options, a familiar interface. All options with explanations of what they do can be [found here](http://perfectionkills.com/experimenting-with-html-minifier/#options).
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Additional Options
8 | # Remove Comments
9 | - key: `removeComments`
10 | - type: `Boolean`
11 | - default: `true`
12 |
13 | # Collapse Whitespace
14 | - key: `collapseWhitespace`
15 | - type: `Boolean`
16 | - default: `true`
17 |
18 | # Remove Empty Attributes
19 | - key: `removeEmptyAttributes`
20 | - type: `Boolean`
21 | - default: `true`
22 |
--------------------------------------------------------------------------------
/packages/accord/docs/minify-js.md:
--------------------------------------------------------------------------------
1 | # Minify JS
2 | Uses [uglifyjs2](https://github.com/mishoo/UglifyJS2) to minify javascript code. The interface matches that of uglifyjs2, you can see some options that can be passed in [listed out here](https://github.com/mishoo/UglifyJS2#the-simple-way).
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | Although UglifyJS has sourcemap support, unfortunately it forces you to write them to a specific file rather than simply returning the map so you can do with it what you want. Since accord does not write files and simply executes transforms then returns the text, we do not support this in any special way. You can pass `sourceMap` as an option with the path to a file and presumably it will be written. This is not tested or officially supported and will not be until UglifyJS allows us to return the sourcemap as a string or object.
10 |
--------------------------------------------------------------------------------
/packages/accord/docs/myth.md:
--------------------------------------------------------------------------------
1 | # Myth
2 | Essentially a polyfill for the css future spec. Check the [features](https://github.com/segmentio/myth#features) to see what you can do with it.
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | Myth does support sourcemaps, but automatically inlines them. If call the adapter with `sourcemap: true` as an option, it will return a compiled result with an inline sourcemap.
10 |
--------------------------------------------------------------------------------
/packages/accord/docs/postcss.md:
--------------------------------------------------------------------------------
1 | # PostCSS
2 | This is the compiler interface to [PostCSS](https://github.com/postcss/postcss). PostCSS is a tool for transforming CSS with JS plugins. These plugins can support variables and mixins, transpile future CSS syntax, inline images, and more.
3 |
4 | ## Supported Methods
5 | - render
6 |
7 | ## Source Maps
8 |
9 | Source maps are supported by the PostCSS adapter. Just pass in a `map` option [as described in the docs](https://github.com/postcss/postcss#source-map), and it will come back as `sourcemap` on the response object.
10 |
11 | ## Additional Options
12 | ### [Use](https://github.com/postcss/postcss/blob/master/API.md#processoruseplugin)
13 |
14 | - key: `use`
15 | - type: `Array|Function|Object`
16 | - default: `[]`
17 |
18 | Adds one or more plugins to be used as a CSS processor.
19 |
20 | ```coffee
21 | pcss = accord.load('postcss')
22 | varPlugin = require('postcss-simple-vars')
23 |
24 | pcss.render(
25 | '$color: green;\n\n.test { background: $color; }'
26 | use: [varPlugin]
27 | ).catch(
28 | (err) -> console.error err
29 | ).done(
30 | (res) -> console.log res.result
31 | )
32 | ```
33 |
34 |
--------------------------------------------------------------------------------
/packages/accord/docs/toffee.md:
--------------------------------------------------------------------------------
1 | Toffee
2 | ===
3 |
4 | Based on the simplicity and beauty of CoffeeScript, Toffee proveds a templating language with a slick syntax!
5 | Be sure to checkout the [toffee docs](//github.com/malgorithms/toffee/blob/master/README.md)!
6 |
7 | ## Basic Usage
8 |
9 | ```coffeescript
10 | # load toffee adaptor
11 | toffee = accord.load('toffee')
12 |
13 | # render a string
14 | toffee.render('''
15 | {#
16 | for supply in supplies {:#{supply} :}
17 | #}
18 | ''',
19 | supplies: ['mop', 'trash bin', 'flashlight']
20 | ).catch(console.error.bind(console))
21 | .done((res) -> console.log.bind(console))
22 |
23 | # render a file
24 | toffee.renderFile('hello.toffee', {supplies: ['mop', 'trash bin', 'flashlight']})
25 | .catch(console.error.bind(console))
26 | .done((res) -> console.log.bind(console))
27 |
28 | # compile a string
29 | toffee.render('''
30 | {#
31 | for supply in supplies {:#{supply} :}
32 | #}
33 | ''',
34 | supplies: ['mop', 'trash bin', 'flashlight']
35 | ).catch(console.error.bind(console))
36 | .done((res) -> console.log.bind(console)
37 |
38 | # compile a file
39 | toffee.renderFile('hello.toffee', {place: "world"})
40 | .catch(console.error.bind(console))
41 | .done((res) -> console.log.bind(console))
42 |
43 | ```
44 |
--------------------------------------------------------------------------------
/packages/accord/docs/typescript.md:
--------------------------------------------------------------------------------
1 | # TypeScript
2 | TypeScript is a superset of Javascript that compile to plain JavaScript. TypeScript offers classes, modules, and interfaces to help you build robust components. More information can be found on [typescriptlang.org](http://www.typescriptlang.org/).
3 |
4 | The adapter uses [typescript's](https://github.com/Microsoft/TypeScript) `transpileModule` method. This means that you can configurate it's behavior by passing `tsc` option to `pingy.json`. By example, this version of config allows you to transpile output files to ES5 with AMD modules:
5 | ```
6 | {
7 | "name": "pingy",
8 | "exportDir": "dist",
9 | "minify": true,
10 | "compile": true,
11 | "exclusions": [
12 | {
13 | "path": "node_modules",
14 | "action": "exclude",
15 | "type": "dir"
16 | }
17 | ],
18 | "tsc": {
19 | "module": "AMD",
20 | "target": "es5"
21 | },
22 | "port": 49947
23 | }
24 | ```
25 | All `tsc` options covered by [official documentation](https://www.typescriptlang.org/docs/handbook/compiler-options.html).
26 | You can control version of typescript package, because adapter uses project's package inside `/node_modules`
27 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/LiveScript/1.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var LiveScript = (function() {
5 | let compile = undefined;
6 | LiveScript = class LiveScript extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'LiveScript';
9 | this.prototype.extensions = ['ls'];
10 | this.prototype.output = 'js';
11 | this.prototype.isolated = true;
12 |
13 | // private
14 |
15 | compile = function(fn) {
16 | let res;
17 | try { res = fn(); }
18 | catch (err) { return W.reject(err); }
19 | return W.resolve({result: res});
20 | };
21 | }
22 |
23 | _render(str, options) {
24 | return compile(() => this.engine.compile(str, options));
25 | }
26 | };
27 | LiveScript.initClass();
28 | return LiveScript;
29 | })();
30 |
31 | module.exports = LiveScript;
32 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/LiveScript/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/babel/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./6.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/buble/0.8.x - 0.15.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let path = require('path');
3 | const W = require('when');
4 | let sourcemaps = require('../../sourcemaps');
5 |
6 | var Buble = (function() {
7 | let compile = undefined;
8 | Buble = class Buble extends Adapter {
9 | static initClass() {
10 | this.prototype.name = 'buble';
11 | this.prototype.extensions = ['js'];
12 | this.prototype.output = 'js';
13 | this.prototype.isolated = true;
14 |
15 | // private
16 |
17 | compile = function(fn) {
18 | let res;
19 | try { res = fn(); }
20 | catch (err) { return W.reject(err); }
21 |
22 | let data = { result: res.code };
23 | if (res.map) {
24 | return sourcemaps.inline_sources(res.map).then(function(map) {
25 | data.sourcemap = map;
26 | return data;
27 | });
28 | } else {
29 | return W.resolve(data);
30 | }
31 | };
32 | }
33 |
34 | _render(str, options) {
35 | options.source = options.filename;
36 | return compile(() => this.engine.transform(str, options));
37 | }
38 | };
39 | Buble.initClass();
40 | return Buble;
41 | })();
42 |
43 | module.exports = Buble;
44 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/buble/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.8.x - 0.15.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/cjsx/3.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let sourcemaps = require('../../sourcemaps');
3 | let path = require('path');
4 | const W = require('when');
5 |
6 | var CJSX = (function() {
7 | let compile = undefined;
8 | CJSX = class CJSX extends Adapter {
9 | static initClass() {
10 | this.prototype.name = 'cjsx';
11 | this.prototype.extensions = ['cjsx'];
12 | this.prototype.output = 'coffee';
13 | this.prototype.supportedEngines = ['coffee-react-transform'];
14 | this.prototype.isolated = true;
15 |
16 | // private
17 |
18 | compile = function(fn) {
19 | let res;
20 | try { res = fn(); }
21 | catch (err) { return W.reject(err); }
22 | return W.resolve({result: res});
23 | };
24 | }
25 |
26 | _render(str, options) {
27 | let { filename } = options;
28 | return compile(() => this.engine(str));
29 | }
30 | };
31 | CJSX.initClass();
32 | return CJSX;
33 | })();
34 |
35 | module.exports = CJSX;
36 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/cjsx/4.x - 5.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let sourcemaps = require('../../sourcemaps');
3 | let path = require('path');
4 | const W = require('when');
5 |
6 | var CJSX = (function() {
7 | let compile = undefined;
8 | CJSX = class CJSX extends Adapter {
9 | static initClass() {
10 | this.prototype.name = 'cjsx';
11 | this.prototype.extensions = ['cjsx'];
12 | this.prototype.output = 'coffee';
13 | this.prototype.supportedEngines = ['coffee-react-transform'];
14 | this.prototype.isolated = true;
15 |
16 | // private
17 |
18 | compile = function(fn) {
19 | let res;
20 | try { res = fn(); }
21 | catch (err) { return W.reject(err); }
22 | return W.resolve({result: res});
23 | };
24 | }
25 |
26 | _render(str, options) {
27 | let { filename } = options;
28 | return compile(() => this.engine(str));
29 | }
30 | };
31 | CJSX.initClass();
32 | return CJSX;
33 | })();
34 |
35 | module.exports = CJSX;
36 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/cjsx/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./4.x - 5.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/coco/0.9.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var Coco = (function() {
5 | let compile = undefined;
6 | Coco = class Coco extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'coco';
9 | this.prototype.extensions = ['co'];
10 | this.prototype.output = 'js';
11 | this.prototype.isolated = true;
12 |
13 | // private
14 |
15 | compile = function(fn) {
16 | let res;
17 | try { res = fn(); }
18 | catch (err) { return W.reject(err); }
19 | return W.resolve({result: res});
20 | };
21 | }
22 |
23 | _render(str, options) {
24 | return compile(() => this.engine.compile(str, options));
25 | }
26 | };
27 | Coco.initClass();
28 | return Coco;
29 | })();
30 |
31 | module.exports = Coco;
32 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/coco/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.9.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/coffee-script/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/csso/1.0.x - 1.3.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var CSSO = (function() {
5 | let compile = undefined;
6 | CSSO = class CSSO extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'csso';
9 | this.prototype.extensions = ['css'];
10 | this.prototype.output = 'css';
11 | this.prototype.isolated = true;
12 |
13 | // private
14 |
15 | compile = function(fn) {
16 | let res;
17 | try { res = fn(); }
18 | catch (err) { return W.reject(err); }
19 | return W.resolve({result: res});
20 | };
21 | }
22 |
23 | _render(str, options) {
24 | if (options.noRestructure == null) { options.noRestructure = false; }
25 | return compile(() => this.engine.justDoIt(str, options.noRestructure));
26 | }
27 | };
28 | CSSO.initClass();
29 | return CSSO;
30 | })();
31 |
32 | module.exports = CSSO;
33 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/csso/2.x - 3.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var CSSO = (function() {
5 | let compile = undefined;
6 | CSSO = class CSSO extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'csso';
9 | this.prototype.extensions = ['css'];
10 | this.prototype.output = 'css';
11 | this.prototype.isolated = true;
12 |
13 | // private
14 |
15 | compile = function(fn) {
16 | let res;
17 | try { res = fn(); }
18 | catch (err) { return W.reject(err); }
19 | return W.resolve({result: res});
20 | };
21 | }
22 |
23 | _render(str, options) {
24 | if (options.restructuring == null) { options.restructuring = true; }
25 | if (options.debug == null) { options.debug = false; }
26 |
27 | return compile(() => this.engine.minify(str, options).css);
28 | }
29 | };
30 | CSSO.initClass();
31 | return CSSO;
32 | })();
33 |
34 | module.exports = CSSO;
35 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/csso/^1.4.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var CSSO = (function() {
5 | let compile = undefined;
6 | CSSO = class CSSO extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'csso';
9 | this.prototype.extensions = ['css'];
10 | this.prototype.output = 'css';
11 | this.prototype.isolated = true;
12 |
13 | // private
14 |
15 | compile = function(fn) {
16 | let res;
17 | try { res = fn(); }
18 | catch (err) { return W.reject(err); }
19 | return W.resolve({result: res});
20 | };
21 | }
22 |
23 | _render(str, options) {
24 | if (options.restructuring == null) { options.restructuring = true; }
25 | if (options.debug == null) { options.debug = false; }
26 |
27 | return compile(() => this.engine.minify(str, options));
28 | }
29 | };
30 | CSSO.initClass();
31 | return CSSO;
32 | })();
33 |
34 | module.exports = CSSO;
35 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/csso/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./2.x - 3.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/dogescript/2.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | class DogeScript extends Adapter {
5 | static initClass() {
6 | this.prototype.name = 'dogescript';
7 | this.prototype.extensions = ['djs'];
8 | this.prototype.output = 'js';
9 | this.prototype.isolated = true;
10 | }
11 |
12 | _render(str, options) {
13 | return W.resolve({result: this.engine(str, options.beauty, options.trueDoge)});
14 | }
15 | }
16 | DogeScript.initClass();
17 |
18 | module.exports = DogeScript;
19 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/dogescript/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./2.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/dot/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/eco/1.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let path = require('path');
3 | let fs = require('fs');
4 | const W = require('when');
5 |
6 | var Eco = (function() {
7 | let compile = undefined;
8 | Eco = class Eco extends Adapter {
9 | static initClass() {
10 | this.prototype.name = 'eco';
11 | this.prototype.extensions = ['eco'];
12 | this.prototype.output = 'html';
13 |
14 | compile = function(fn) {
15 | let res;
16 | try { res = fn(); }
17 | catch (err) { return W.reject(err); }
18 | return W.resolve({result: res});
19 | };
20 | }
21 |
22 | _render(str,options) {
23 | return compile(() => this.engine.render(str,options));
24 | }
25 |
26 | _compile(str,options) {
27 | return compile(() => this.engine.compile(str,options))
28 | .then(function(res) { res.result = eval(res.result); return res; });
29 | }
30 |
31 | _compileClient(str,options) {
32 | return compile(() => this.engine.compile(str,options).toString().trim() + '\n');
33 | }
34 | };
35 | Eco.initClass();
36 | return Eco;
37 | })();
38 |
39 | module.exports = Eco;
40 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/eco/=1.1.0-rc-3.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let path = require('path');
3 | let fs = require('fs');
4 | const W = require('when');
5 |
6 | var Eco = (function() {
7 | let compile = undefined;
8 | Eco = class Eco extends Adapter {
9 | static initClass() {
10 | this.prototype.name = 'eco';
11 | this.prototype.extensions = ['eco'];
12 | this.prototype.output = 'html';
13 |
14 | compile = function(fn) {
15 | let res;
16 | try { res = fn(); }
17 | catch (err) { return W.reject(err); }
18 | return W.resolve({result: res});
19 | };
20 | }
21 |
22 | _render(str,options) {
23 | return compile(() => this.engine.render(str,options));
24 | }
25 |
26 | _compile(str,options) {
27 | return compile(() => this.engine.compile(str,options));
28 | }
29 |
30 | _compileClient(str,options) {
31 | return compile(() => this.engine.compile(str,options).toString().trim() + '\n');
32 | }
33 | };
34 | Eco.initClass();
35 | return Eco;
36 | })();
37 |
38 | module.exports = Eco;
39 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/eco/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/ejs/2.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let path = require('path');
3 | let fs = require('fs');
4 | const W = require('when');
5 |
6 | var EJS = (function() {
7 | let compile = undefined;
8 | EJS = class EJS extends Adapter {
9 | static initClass() {
10 | this.prototype.name = 'ejs';
11 | this.prototype.extensions = ['ejs'];
12 | this.prototype.output = 'html';
13 |
14 | // private
15 |
16 | compile = function(fn) {
17 | let res;
18 | try { res = fn(); }
19 | catch (err) { return W.reject(err); }
20 | return W.resolve({result: res});
21 | };
22 | }
23 |
24 | _render(str, options) {
25 | return compile(() => this.engine.render(str, options));
26 | }
27 |
28 | _compile(str, options) {
29 | return compile(() => this.engine.compile(str, options));
30 | }
31 |
32 | _compileClient(str, options) {
33 | options.client = true;
34 | return compile(() => this.engine.compile(str, options).toString());
35 | }
36 |
37 | clientHelpers(str, options) {
38 | let runtime_path = path.join(this.engine.__accord_path, 'ejs.min.js');
39 | return fs.readFileSync(runtime_path, 'utf8');
40 | }
41 | };
42 | EJS.initClass();
43 | return EJS;
44 | })();
45 |
46 | module.exports = EJS;
47 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/ejs/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./2.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/escape-html/0.5.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 | let defaults = require('lodash.defaults');
4 |
5 | var EscapeHTML = (function() {
6 | let compile = undefined;
7 | EscapeHTML = class EscapeHTML extends Adapter {
8 | static initClass() {
9 | this.prototype.name = 'escape-html';
10 | this.prototype.extensions = ['html'];
11 | this.prototype.output = 'html';
12 | this.prototype.supportedEngines = ['he'];
13 |
14 | this.prototype.isolated = true;
15 |
16 | // private
17 |
18 | compile = function(fn) {
19 | let res;
20 | try { res = fn(); }
21 | catch (err) { return W.reject(err); }
22 | return W.resolve({result: res});
23 | };
24 | }
25 |
26 | _render(str, options) {
27 | options = defaults(options,
28 | {allowUnsafeSymbols: true});
29 |
30 | return compile(() => this.engine.encode(str, options));
31 | }
32 | };
33 | EscapeHTML.initClass();
34 | return EscapeHTML;
35 | })();
36 |
37 | module.exports = EscapeHTML;
38 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/escape-html/1.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 | let defaults = require('lodash.defaults');
4 |
5 | var EscapeHTML = (function() {
6 | let compile = undefined;
7 | EscapeHTML = class EscapeHTML extends Adapter {
8 | static initClass() {
9 | this.prototype.name = 'escape-html';
10 | this.prototype.extensions = ['html'];
11 | this.prototype.output = 'html';
12 | this.prototype.supportedEngines = ['he'];
13 |
14 | this.prototype.isolated = true;
15 |
16 | // private
17 |
18 | compile = function(fn) {
19 | let res;
20 | try { res = fn(); }
21 | catch (err) { return W.reject(err); }
22 | return W.resolve({result: res});
23 | };
24 | }
25 |
26 | _render(str, options) {
27 | options = defaults(options,
28 | {allowUnsafeSymbols: true});
29 |
30 | return compile(() => this.engine.encode(str, options));
31 | }
32 | };
33 | EscapeHTML.initClass();
34 | return EscapeHTML;
35 | })();
36 |
37 | module.exports = EscapeHTML;
38 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/escape-html/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/haml/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.6.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/handlebars/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./3.x - 4.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/jade/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/jsx/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.13.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/less/2.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let sourcemaps = require('../../sourcemaps');
3 | const W = require('when');
4 |
5 | class Less extends Adapter {
6 | static initClass() {
7 | this.prototype.name = 'less';
8 | this.prototype.extensions = ['less'];
9 | this.prototype.output = 'css';
10 |
11 | /**
12 | * LESS has import rules for other LESS stylesheets
13 | */
14 | this.prototype.isolated = false;
15 | }
16 |
17 | _render(str, options) {
18 | let deferred = W.defer();
19 |
20 | if (options.sourcemap === true) { options.sourceMap = true; }
21 |
22 | this.engine.render(str, options, function(err, res) {
23 | if (err) { return deferred.reject(err); }
24 | let obj = {
25 | result: res.css,
26 | imports: res.imports
27 | };
28 | if (options.sourceMap && res.map) {
29 | obj.sourcemap = JSON.parse(res.map);
30 | return sourcemaps.inline_sources(obj.sourcemap).then(function(map) {
31 | obj.sourcemap = map;
32 | return deferred.resolve(obj);
33 | });
34 | } else {
35 | return deferred.resolve(obj);
36 | }
37 | });
38 |
39 | return deferred.promise;
40 | }
41 | }
42 | Less.initClass();
43 |
44 | module.exports = Less;
45 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/less/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./2.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/marc/0.1.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | class Marc extends Adapter {
5 | static initClass() {
6 | this.prototype.name = 'marc';
7 | this.prototype.extensions = ['md'];
8 | this.prototype.output = 'html';
9 | }
10 |
11 | _render(str, options) {
12 | // marc mutates the compiler, so we need to keep the original fresh
13 | let v;
14 | let base = this.engine();
15 |
16 | // use marc's functions to configure the compiler
17 | for (var k in options['data']) { v = options['data'][k]; base.set(k, v); }
18 | delete options['data'];
19 | for (k in options['partial']) { v = options['partial'][k]; base.partial(k, v); }
20 | delete options['partial'];
21 | for (k in options['filter']) { v = options['filter'][k]; base.filter(k, v); }
22 | delete options['filter'];
23 |
24 | // all the remaining options are options for marked
25 | base.config(options);
26 | return W.resolve({result: base(str, true)});
27 | }
28 | }
29 | Marc.initClass();
30 |
31 | module.exports = Marc;
32 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/marc/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/markdown/0.3.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let nodefn = require('when/node/function');
3 |
4 | class Markdown extends Adapter {
5 | static initClass() {
6 | this.prototype.name = 'markdown';
7 | this.prototype.extensions = ['md', 'mdown', 'markdown'];
8 | this.prototype.output = 'html';
9 | this.prototype.supportedEngines = ['marked'];
10 | this.prototype.isolated = true;
11 | }
12 |
13 | _render(str, options) {
14 | return nodefn.call(this.engine.bind(this.engine), str, options)
15 | .then(res => ({result: res}));
16 | }
17 | }
18 | Markdown.initClass();
19 |
20 | module.exports = Markdown;
21 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/markdown/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.3.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/minify-css/3.x - 4.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var MinifyCSS = (function() {
5 | let compile = undefined;
6 | MinifyCSS = class MinifyCSS extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'minify-css';
9 | this.prototype.extensions = ['css'];
10 | this.prototype.output = 'css';
11 | this.prototype.supportedEngines = ['clean-css'];
12 |
13 | /**
14 | * It is sometimes isolated, but not always because you can get it to process
15 | `import` rules with `processImport`
16 | */
17 | this.prototype.isolated = false;
18 |
19 | // private
20 |
21 | compile = function(fn) {
22 | let res;
23 | try { res = fn(); }
24 | catch (err) { return W.reject(err); }
25 | if (res.errors.length > 0) { W.reject(res); }
26 | return W.resolve({result: res.styles, warnings: res.warnings, stats: res.stats});
27 | };
28 | }
29 |
30 | _render(str, options) {
31 | return compile(() => (new this.engine(options)).minify(str));
32 | }
33 | };
34 | MinifyCSS.initClass();
35 | return MinifyCSS;
36 | })();
37 |
38 | module.exports = MinifyCSS;
39 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/minify-css/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./3.x - 4.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/minify-html/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./2.x - 3.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/minify-js/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./2.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/mustache/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./3.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/myth/1.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | let convert = require('convert-source-map');
3 | const W = require('when');
4 |
5 | var Myth = (function() {
6 | let compile = undefined;
7 | Myth = class Myth extends Adapter {
8 | static initClass() {
9 | this.prototype.name = 'myth';
10 | this.prototype.extensions = ['myth', 'mcss'];
11 | this.prototype.output = 'css';
12 |
13 | // private
14 |
15 | compile = function(sourcemap, fn) {
16 | let res;
17 | try { res = fn(); }
18 | catch (err) { return W.reject(err); }
19 |
20 | let data = { result: res };
21 |
22 | if (sourcemap) {
23 | let map = convert.fromSource(res).sourcemap;
24 | let src = convert.removeComments(res);
25 | data = { result: src, sourcemap: map };
26 | }
27 |
28 | return W.resolve(data);
29 | };
30 | }
31 |
32 | _render(str, options) {
33 | options.source = options.filename;
34 | delete options.filename;
35 | return compile(options.sourcemap, (() => this.engine(str, options)));
36 | }
37 | };
38 | Myth.initClass();
39 | return Myth;
40 | })();
41 |
42 | module.exports = Myth;
43 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/myth/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/postcss/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./4.x - 5.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/pug/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./2.0.0-rc - 2.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/scss/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./3.x - 4.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/stylus/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/swig/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/toffee/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./0.1.x');
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/typescript/1.x.js:
--------------------------------------------------------------------------------
1 | let Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var TypeScript = (function() {
5 | let compile = undefined;
6 | TypeScript = class TypeScript extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'typescript';
9 | this.prototype.engineName = 'typescript-compiler';
10 | this.prototype.supportedEngines = ['typescript-compiler'];
11 | this.prototype.extensions = ['ts'];
12 | this.prototype.output = 'js';
13 | this.prototype.isolated = true;
14 |
15 | // private
16 |
17 | compile = function(fn) {
18 | let res;
19 | try { res = fn(); }
20 | catch (err) { return W.reject(err); }
21 | return W.resolve({result: res});
22 | };
23 | }
24 |
25 | _render(str, options) {
26 | let throwOnError = function(err) {
27 | throw err;
28 | };
29 |
30 | return compile(() => this.engine.compileString(str, undefined, options, throwOnError));
31 | }
32 | };
33 | TypeScript.initClass();
34 | return TypeScript;
35 | })();
36 |
37 | module.exports = TypeScript;
38 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/typescript/index.js:
--------------------------------------------------------------------------------
1 | // the index exports the most recent version of the engine
2 | module.exports = require('./x.x');
3 |
--------------------------------------------------------------------------------
/packages/accord/lib/adapters/typescript/x.x.js:
--------------------------------------------------------------------------------
1 | const Adapter = require('../../adapter_base');
2 | const W = require('when');
3 |
4 | var TypeScript = (function() {
5 | let compile;
6 | TypeScript = class TypeScript extends Adapter {
7 | static initClass() {
8 | this.prototype.name = 'typescript';
9 | this.prototype.engineName = 'typescript-compiler';
10 | this.prototype.supportedEngines = ['typescript-compiler'];
11 | this.prototype.extensions = ['ts'];
12 | this.prototype.output = 'js';
13 | this.prototype.isolated = true;
14 |
15 | // private
16 |
17 | compile = function(fn) {
18 | let res;
19 | try {
20 | res = fn();
21 | } catch (err) {
22 | return W.reject(err);
23 | }
24 | return W.resolve({ result: res.outputText });
25 | };
26 | }
27 |
28 | _render(str, options) {
29 | const throwOnError = function(err) {
30 | throw err;
31 | };
32 |
33 | return compile(() =>
34 | this.engine.transpileModule(str, { compilerOptions: options.tsc })
35 | );
36 | }
37 | };
38 | TypeScript.initClass();
39 | return TypeScript;
40 | })();
41 |
42 | module.exports = TypeScript;
43 |
--------------------------------------------------------------------------------
/packages/accord/lib/sourcemaps.js:
--------------------------------------------------------------------------------
1 | const W = require('when');
2 | let node = require('when/node');
3 | let fs = require('fs');
4 |
5 | /**
6 | * Reads a source map's sources and inlines them in the `sourcesContents` key,
7 | * returning the full map.
8 | *
9 | * @param {Object} map - source map v3
10 | * @return {Promise} a promise for the sourcemap updated with contents
11 | */
12 |
13 | exports.inline_sources = function(map) {
14 | if (map.sourcesContent) { return W.resolve(map); }
15 |
16 | return W.map(map.sources, source => node.call(fs.readFile.bind(fs), source, 'utf8')).then(function(contents) {
17 | map.sourcesContent = contents;
18 | return map;}).catch(() =>
19 | // sources could not be read means no inline maps
20 | map
21 | );
22 | };
23 |
--------------------------------------------------------------------------------
/packages/accord/license.md:
--------------------------------------------------------------------------------
1 | License (MIT)
2 | -------------
3 |
4 | Copyright (c) 2013 Jeff Escalante
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 |
10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/babel/basic.js:
--------------------------------------------------------------------------------
1 | export default class Test {
2 | constructor (greeting) {
3 | this.greeting = greeting
4 | }
5 |
6 | static defaultGreeting () {
7 | return 'hello there!'
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/babel/expected/basic.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8 |
9 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10 |
11 | var Test = function () {
12 | function Test(greeting) {
13 | _classCallCheck(this, Test);
14 |
15 | this.greeting = greeting;
16 | }
17 |
18 | _createClass(Test, null, [{
19 | key: 'defaultGreeting',
20 | value: function defaultGreeting() {
21 | return 'hello there!';
22 | }
23 | }]);
24 |
25 | return Test;
26 | }();
27 |
28 | exports.default = Test;
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/babel/expected/string.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | console.log('foo');
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/buble/basic.js:
--------------------------------------------------------------------------------
1 | class Test extends TestClass {
2 | constructor(greeting) {
3 | super();
4 | this.greeting = greeting;
5 | }
6 |
7 | static defaultGreeting() {
8 | return 'hello there!'
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/buble/expected/basic.js:
--------------------------------------------------------------------------------
1 | var Test = (function (TestClass) {
2 | function Test(greeting) {
3 | TestClass.call(this);
4 | this.greeting = greeting;
5 | }
6 |
7 | if ( TestClass ) Test.__proto__ = TestClass;
8 | Test.prototype = Object.create( TestClass && TestClass.prototype );
9 | Test.prototype.constructor = Test;
10 |
11 | Test.defaultGreeting = function defaultGreeting () {
12 | return 'hello there!'
13 | };
14 |
15 | return Test;
16 | }(TestClass));
17 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/buble/expected/string.js:
--------------------------------------------------------------------------------
1 | console.log('foo');
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/cjsx/basic.cjsx:
--------------------------------------------------------------------------------
1 | Car = React.createClass
2 | render: ->
3 |
4 |
5 |
6 | Which seat can I take? {@props?.seat or 'none'}
7 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/cjsx/expected/basic.coffee:
--------------------------------------------------------------------------------
1 | Car = React.createClass
2 | render: ->
3 | React.createElement(Vehicle, {"doors": (4), "locked": (isLocked()), "data-colour": "red", "on": true},
4 | React.createElement(Parts.FrontSeat, null),
5 | React.createElement(Parts.BackSeat, null),
6 | React.createElement("p", {"className": "seat"}, "Which seat can I take? ", (@props?.seat or 'none'))
7 | )
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/cjsx/expected/string.coffee:
--------------------------------------------------------------------------------
1 | React.createElement("div", {"className": "foo"})
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/coco/basic.co:
--------------------------------------------------------------------------------
1 | mixin = (...objects) ->
2 | for objects => @ <<< &
3 | this
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/coco/expected/basic.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | var mixin, slice$ = [].slice;
3 | mixin = function(){
4 | var objects, i$, x0$, len$;
5 | objects = slice$.call(arguments);
6 | for (i$ = 0, len$ = objects.length; i$ < len$; ++i$) {
7 | x0$ = objects[i$];
8 | import$(this, x0$);
9 | }
10 | return this;
11 | };
12 | function import$(obj, src){
13 | var own = {}.hasOwnProperty;
14 | for (var key in src) if (own.call(src, key)) obj[key] = src[key];
15 | return obj;
16 | }
17 | }).call(this);
18 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/coco/expected/string.js:
--------------------------------------------------------------------------------
1 | function test(){
2 | return console.log('foo');
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/coffee/basic.coffee:
--------------------------------------------------------------------------------
1 | console.log 5 + 10
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/coffee/expected/basic.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | console.log(5 + 10);
3 |
4 | }).call(this);
5 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/coffee/expected/string.js:
--------------------------------------------------------------------------------
1 | console.log("test");
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/csso/basic.css:
--------------------------------------------------------------------------------
1 | /*! keep this comment */
2 | /* wow, such optimize */
3 |
4 | .hello {
5 | margin: 0px;
6 | color: #c0c0c0;
7 | }
8 |
9 | .hello {
10 | border: 1px solid;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/csso/expected/basic.css:
--------------------------------------------------------------------------------
1 | /*! keep this comment */
2 | .hello{margin:0;color:silver;border:1px solid}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/csso/expected/opts.css:
--------------------------------------------------------------------------------
1 | .hello{color:red}.hello{padding:10px}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/csso/expected/string.css:
--------------------------------------------------------------------------------
1 | .hello{foo:bar;color:green}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/csso/opts.css:
--------------------------------------------------------------------------------
1 | .hello {
2 | color: red;
3 | }
4 |
5 | .hello {
6 | padding: 10px;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dogescript/basic.djs:
--------------------------------------------------------------------------------
1 | very doge is 'wow'
2 |
3 | rly doge
4 | console dose loge with doge
5 | but
6 | console dose loge with 'no doge'
7 | wow
8 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dogescript/expected/basic.js:
--------------------------------------------------------------------------------
1 | var doge = 'wow';
2 |
3 | if (doge ) {
4 | console.log(doge);
5 | } else {
6 | console.log('no doge');
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dogescript/expected/string.js:
--------------------------------------------------------------------------------
1 | console.log('wow');
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/basic.dot:
--------------------------------------------------------------------------------
1 | Hi {{=it.name}}!
2 | {{=it.age || ''}}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/client-complex.dot:
--------------------------------------------------------------------------------
1 | Hi {{=it.name}}!
2 | {{=it.age || ''}}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/client.dot:
--------------------------------------------------------------------------------
1 | Hi {{=it.name}}!
2 | {{=it.age || ''}}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/basic.html:
--------------------------------------------------------------------------------
1 | Hi Jake!
31
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/client-complex.html:
--------------------------------------------------------------------------------
1 | Hi Jake!
31
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/client.html:
--------------------------------------------------------------------------------
1 | function anonymous(it
2 | /**/) {
3 | var out='Hi '+(it.name)+'!
'+(it.age || '')+'
';return out;
4 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/cstring.html:
--------------------------------------------------------------------------------
1 | function anonymous(it
2 | /**/) {
3 | var out='';if(it.name){out+='Oh, I love your name, '+(it.name)+'!
';}else if(it.age === 0){out+='Guess nobody named you yet!
';}else{out+='You are '+(it.age)+' and still don\'t have a name?';}return out;
4 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/partial.html:
--------------------------------------------------------------------------------
1 | Jake
31
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/precompile.html:
--------------------------------------------------------------------------------
1 | precompilez
wow opts
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/pstring.html:
--------------------------------------------------------------------------------
1 | precompilez
wow opts
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/expected/rstring.html:
--------------------------------------------------------------------------------
1 | Hi Jake!
31
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/partial.dot:
--------------------------------------------------------------------------------
1 | {{##def.snippet:
2 | {{=it.name}}
3 | #}}
4 |
5 | {{#def.snippet}}{{=it.age}}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/dot/precompile.dot:
--------------------------------------------------------------------------------
1 | {{=it.title}}
{{=it.message || ''}}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/basic.eco:
--------------------------------------------------------------------------------
1 | wow such html
<%= @foo %>
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/client.eco:
--------------------------------------------------------------------------------
1 | Woah look, a <%= thing %>
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/expected/basic.html:
--------------------------------------------------------------------------------
1 | wow such html
wow opts
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/expected/client.html:
--------------------------------------------------------------------------------
1 | module.exports = function(__obj) {
2 | var _safe = function(value) {
3 | if (typeof value === 'undefined' && value == null)
4 | value = '';
5 | var result = new String(value);
6 | result.ecoSafe = true;
7 | return result;
8 | };
9 | return (function() {
10 | var __out = [], __self = this, _print = function(value) {
11 | if (typeof value !== 'undefined' && value != null)
12 | __out.push(value.ecoSafe ? value : __self.escape(value));
13 | }, _capture = function(callback) {
14 | var out = __out, result;
15 | __out = [];
16 | callback.call(this);
17 | result = __out.join('');
18 | __out = out;
19 | return _safe(result);
20 | };
21 | (function() {
22 | _print(_safe('Woah look, a '));
23 |
24 | _print(thing);
25 |
26 | }).call(this);
27 |
28 | return __out.join('');
29 | }).call((function() {
30 | var obj = {
31 | escape: function(value) {
32 | return ('' + value)
33 | .replace(/&/g, '&')
34 | .replace(//g, '>')
36 | .replace(/"/g, '"');
37 | },
38 | safe: _safe
39 | }, key;
40 | for (key in __obj) obj[key] = __obj[key];
41 | return obj;
42 | })());
43 | };
44 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/expected/cstring.html:
--------------------------------------------------------------------------------
1 | module.exports = function(__obj) {
2 | var _safe = function(value) {
3 | if (typeof value === 'undefined' && value == null)
4 | value = '';
5 | var result = new String(value);
6 | result.ecoSafe = true;
7 | return result;
8 | };
9 | return (function() {
10 | var __out = [], __self = this, _print = function(value) {
11 | if (typeof value !== 'undefined' && value != null)
12 | __out.push(value.ecoSafe ? value : __self.escape(value));
13 | }, _capture = function(callback) {
14 | var out = __out, result;
15 | __out = [];
16 | callback.call(this);
17 | result = __out.join('');
18 | __out = out;
19 | return _safe(result);
20 | };
21 | (function() {
22 | _print(_safe('Woah look, a '));
23 |
24 | _print(thing);
25 |
26 | }).call(this);
27 |
28 | return __out.join('');
29 | }).call((function() {
30 | var obj = {
31 | escape: function(value) {
32 | return ('' + value)
33 | .replace(/&/g, '&')
34 | .replace(//g, '>')
36 | .replace(/"/g, '"');
37 | },
38 | safe: _safe
39 | }, key;
40 | for (key in __obj) obj[key] = __obj[key];
41 | return obj;
42 | })());
43 | };
44 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/expected/precompile.html:
--------------------------------------------------------------------------------
1 | welcome to pen island
wow opts
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/expected/pstring.html:
--------------------------------------------------------------------------------
1 | precompilez
wow opts
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/expected/rstring.html:
--------------------------------------------------------------------------------
1 | eco yah
wow opts
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/eco/precompile.eco:
--------------------------------------------------------------------------------
1 | welcome to pen island
<%= @foo %>
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/basic.ejs:
--------------------------------------------------------------------------------
1 | wow such html
<%= foo %>
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/client-complex.ejs:
--------------------------------------------------------------------------------
1 | Here's a client side template. And <%= foo %>
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/client.ejs:
--------------------------------------------------------------------------------
1 | Wow look a client side template <%= foo %>>
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/expected/basic.html:
--------------------------------------------------------------------------------
1 | wow such html
wow opts
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/expected/client-complex.html:
--------------------------------------------------------------------------------
1 | Here's a client side template. And local
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/expected/partial.html:
--------------------------------------------------------------------------------
1 | here's a partial my friends:
2 | look ma i made it to the partial!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/expected/precompile.html:
--------------------------------------------------------------------------------
1 | welcome to pen island
wow opts
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/expected/pstring.html:
--------------------------------------------------------------------------------
1 | precompilez
wow opts
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/expected/rstring.html:
--------------------------------------------------------------------------------
1 | ejs yah
wow opts
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/includeme.ejs:
--------------------------------------------------------------------------------
1 | look ma i made it to the partial!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/partial.ejs:
--------------------------------------------------------------------------------
1 | here's a partial my friends:
2 | <% include includeme %>
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/ejs/precompile.ejs:
--------------------------------------------------------------------------------
1 | welcome to pen island
<%= foo %>
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/escape-html/basic.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/escape-html/escapable.html:
--------------------------------------------------------------------------------
1 |
2 | § wow © ":;
3 |
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/escape-html/expected/basic.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/escape-html/expected/escapable.html:
--------------------------------------------------------------------------------
1 |
2 | § wow © ":;
3 |
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/escape-html/expected/string.html:
--------------------------------------------------------------------------------
1 | §
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/haml/basic.haml:
--------------------------------------------------------------------------------
1 | %div.article.first
2 | article text here
3 | and here
4 | #wow= compiler
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/haml/expected/basic.html:
--------------------------------------------------------------------------------
1 |
2 | article text here and here
3 | haml
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/haml/expected/precompile.html:
--------------------------------------------------------------------------------
1 |
2 | Here I am chilling with my friend doge
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/haml/expected/pstring.html:
--------------------------------------------------------------------------------
1 |
2 | Hello there my friend
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/haml/expected/rstring.html:
--------------------------------------------------------------------------------
1 |
2 | Whats up mang
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/haml/precompile.haml:
--------------------------------------------------------------------------------
1 | %section= "Here I am chilling with my friend " + friend
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/basic.hbs:
--------------------------------------------------------------------------------
1 | Look, it's a file with {{ compiler }} stuff in it!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/client-complex.hbs:
--------------------------------------------------------------------------------
1 | This is a test. And here's a local: {{ wow }}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/client.hbs:
--------------------------------------------------------------------------------
1 | Under the {{ body_of_water }}
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/basic.html:
--------------------------------------------------------------------------------
1 | Look, it's a file with handlebars stuff in it!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/client-complex.html:
--------------------------------------------------------------------------------
1 | This is a test. And here's a local: local
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/client.html:
--------------------------------------------------------------------------------
1 | Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
2 | var helper;
3 |
4 | return "Under the "
5 | + container.escapeExpression(((helper = (helper = helpers.body_of_water || (depth0 != null ? depth0.body_of_water : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"body_of_water","hash":{},"data":data}) : helper)))
6 | + " \n";
7 | },"useData":true});
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/cstring.html:
--------------------------------------------------------------------------------
1 | Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
2 | var helper;
3 |
4 | return "Here comes the "
5 | + container.escapeExpression(((helper = (helper = helpers.thing || (depth0 != null ? depth0.thing : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"thing","hash":{},"data":data}) : helper)));
6 | },"useData":true});
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/partial.html:
--------------------------------------------------------------------------------
1 | Introducing Partials!
2 | hello from a partial!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/precompile.html:
--------------------------------------------------------------------------------
1 | Here's a precompiled file with me special friend r kelly
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/pstring.html:
--------------------------------------------------------------------------------
1 | Hello there my friend
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/expected/rstring.html:
--------------------------------------------------------------------------------
1 | Hello there homie
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/partial.hbs:
--------------------------------------------------------------------------------
1 | Introducing Partials!
2 | {{> foo }}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/handlebars/precompile.hbs:
--------------------------------------------------------------------------------
1 | Here's a precompiled file with me special friend {{ friend }}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/_partial_content.jade:
--------------------------------------------------------------------------------
1 | p this is whats in the partial
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/async.jade:
--------------------------------------------------------------------------------
1 | strong IMMA FIRIN MAH LAZERS
2 | p= wow.such
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/basic.jade:
--------------------------------------------------------------------------------
1 | strong IMMA FIRIN MAH LAZERS
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/client-complex.jade:
--------------------------------------------------------------------------------
1 | - foo = [1,2,3,4]
2 | each item in foo
3 | p= item
4 | p!= item
5 |
6 | div(class=foo[0])
7 | .hello such #{wow}
8 |
9 | mixin foo(arg)
10 | p= arg
11 |
12 | .test
13 | .foo('hello')
14 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/client.jade:
--------------------------------------------------------------------------------
1 | p look at my browser-compatibility
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/basic.html:
--------------------------------------------------------------------------------
1 | IMMA FIRIN MAH LAZERS such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/client-complex.html:
--------------------------------------------------------------------------------
1 | 1
1
2
2
3
3
4
4
such local
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/client.html:
--------------------------------------------------------------------------------
1 | function template(locals) {
2 | var buf = [];
3 | var jade_mixins = {};
4 | var jade_interp;
5 | ;var locals_for_with = (locals || {});(function (foo) {
6 | buf.push("look at my browser-compatibility
" + (jade.escape(null == (jade_interp = foo) ? "" : jade_interp)) + "
");}.call(this,"foo" in locals_for_with?locals_for_with.foo:typeof foo!=="undefined"?foo:undefined));;return buf.join("");
7 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/cstring.html:
--------------------------------------------------------------------------------
1 | function template(locals) {
2 | var buf = [];
3 | var jade_mixins = {};
4 | var jade_interp;
5 | ;var locals_for_with = (locals || {});(function (foo) {
6 | buf.push("imma firin mah lazer!
" + (jade.escape(null == (jade_interp = foo) ? "" : jade_interp)) + "
");}.call(this,"foo" in locals_for_with?locals_for_with.foo:typeof foo!=="undefined"?foo:undefined));;return buf.join("");
7 | }
8 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/partial.html:
--------------------------------------------------------------------------------
1 | heres a partial
this is whats in the partial
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/precompile.html:
--------------------------------------------------------------------------------
1 | spooderman such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/pstring.html:
--------------------------------------------------------------------------------
1 | why cant I shot web?
such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/expected/rstring.html:
--------------------------------------------------------------------------------
1 | BLAHHHHH
such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/partial.jade:
--------------------------------------------------------------------------------
1 | p heres a partial
2 | include _partial_content
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jade/precompile.jade:
--------------------------------------------------------------------------------
1 | h1 spooderman
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jsx/basic.jsx:
--------------------------------------------------------------------------------
1 | var Test = React.createClass({
2 | render: function(){
3 | return (
4 | {this.props.bar}
5 | );
6 | }
7 | });
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jsx/expected/basic.js:
--------------------------------------------------------------------------------
1 | var Test = React.createClass({displayName: "Test",
2 | render: function(){
3 | return (
4 | React.createElement("div", {className: "foo"}, this.props.bar)
5 | );
6 | }
7 | });
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/jsx/expected/string.js:
--------------------------------------------------------------------------------
1 | React.createElement("div", {className: "foo"}, this.props.bar)
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/less/_import.less:
--------------------------------------------------------------------------------
1 | .bar {
2 | wow: 'foo';
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/less/basic.less:
--------------------------------------------------------------------------------
1 | @color: #428bca;
2 |
3 | .test {
4 | color: @color;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/less/expected/basic.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #428bca;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/less/expected/external.css:
--------------------------------------------------------------------------------
1 | .bar {
2 | wow: 'foo';
3 | }
4 | .foo {
5 | color: red;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/less/expected/string.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | width: 120;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/less/external.less:
--------------------------------------------------------------------------------
1 | @import "_import.less";
2 |
3 | .foo {
4 | color: red;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/livescript/basic.ls:
--------------------------------------------------------------------------------
1 | x = 10
2 | do ->
3 | x := 5
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/livescript/expected/basic.js:
--------------------------------------------------------------------------------
1 | // Generated by LiveScript 1.3.1
2 | (function(){
3 | var x;
4 | x = 10;
5 | (function(){
6 | return x = 5;
7 | })();
8 | }).call(this);
9 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/livescript/expected/string.js:
--------------------------------------------------------------------------------
1 | // Generated by LiveScript 1.3.1
2 | var test, this$ = this;
3 | test = function(){
4 | return console.log('foo');
5 | };
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/marc/basic.md:
--------------------------------------------------------------------------------
1 | I am using __markdown__ with {{label}}!
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/marc/expected/basic.html:
--------------------------------------------------------------------------------
1 | I am using markdown with marc!
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/markdown/basic.md:
--------------------------------------------------------------------------------
1 | Here's an [awesome link](http://google.com)
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/markdown/expected/basic.html:
--------------------------------------------------------------------------------
1 | Here's an awesome link
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/markdown/expected/opts.html:
--------------------------------------------------------------------------------
1 | <p>heres <em>some</em> html<p>
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/markdown/expected/string.html:
--------------------------------------------------------------------------------
1 | hello world
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/markdown/opts.md:
--------------------------------------------------------------------------------
1 | heres some html
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-css/basic.css:
--------------------------------------------------------------------------------
1 | .sunny-spots {
2 | color: golden;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-css/expected/basic.css:
--------------------------------------------------------------------------------
1 | .sunny-spots{color:golden}
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-css/expected/opts.css:
--------------------------------------------------------------------------------
1 | .selector1{wow:such styles}.two{ermahgerd:red}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-css/expected/string.css:
--------------------------------------------------------------------------------
1 | .test{foo:bar}
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-css/opts.css:
--------------------------------------------------------------------------------
1 | .selector1 {
2 | wow: such styles;
3 | }
4 |
5 | .two {
6 | ermahgerd: red;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-html/basic.html:
--------------------------------------------------------------------------------
1 |
2 |
wowlaween
3 |
4 | nested!
5 |
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-html/expected/basic.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-html/expected/opts.html:
--------------------------------------------------------------------------------
1 |
2 |
look at my biceps!
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-html/expected/string.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-html/opts.html:
--------------------------------------------------------------------------------
1 |
2 |
look at my biceps!
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-js/basic.js:
--------------------------------------------------------------------------------
1 | var stuff = [1,2,3,4,5]
2 | for (var i = 0; i < stuff.length; i++) {
3 | console.log(stuff[i]);
4 | }
5 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/minify-js/expected/basic.js:
--------------------------------------------------------------------------------
1 | for(var stuff=[1,2,3,4,5],i=0;iOk here we go with the local: {{ wow }}
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/expected/basic.html:
--------------------------------------------------------------------------------
1 | Hello there, fine doge!
2 |
3 | You just won 5 million dogecoins!
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/expected/client-complex.html:
--------------------------------------------------------------------------------
1 | Ok here we go with the local: local
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/expected/partial.html:
--------------------------------------------------------------------------------
1 | foo bar
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/expected/precompile.html:
--------------------------------------------------------------------------------
1 | Hello there, fine foo!
2 |
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/expected/pstring.html:
--------------------------------------------------------------------------------
1 | Wow, such compile
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/expected/string.html:
--------------------------------------------------------------------------------
1 | Why hello, dogeudle!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/partial.mustache:
--------------------------------------------------------------------------------
1 | {{> partial }}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/mustache/precompile.mustache:
--------------------------------------------------------------------------------
1 | Hello there, fine {{ name }}! {{! a comment }}
2 |
3 | {{# winner }}
4 | You just won 5 million dogecoins!
5 | {{/ winner }}
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/myth/basic.myth:
--------------------------------------------------------------------------------
1 | :root {
2 | --purple: #847AD1;
3 | }
4 |
5 | a {
6 | color: var(--purple);
7 | }
8 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/myth/expected/basic.css:
--------------------------------------------------------------------------------
1 | a {
2 | color: #847AD1;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/myth/expected/import.css:
--------------------------------------------------------------------------------
1 | html {
2 | background: blue;
3 | }
4 |
5 | body {
6 | color: red;
7 | }
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/myth/expected/string.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | -webkit-transition: all 1s ease;
3 | transition: all 1s ease;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/myth/import.myth:
--------------------------------------------------------------------------------
1 | @import "imported.myth";
2 |
3 | body {
4 | color: red
5 | }
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/myth/imported.myth:
--------------------------------------------------------------------------------
1 | html {
2 | background: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/postcss/basic.css:
--------------------------------------------------------------------------------
1 | .test2 {
2 | color: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/postcss/expected/basic.css:
--------------------------------------------------------------------------------
1 | .test2 {
2 | color: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/postcss/expected/string.css:
--------------------------------------------------------------------------------
1 | .test { color: green; }
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/postcss/expected/var.css:
--------------------------------------------------------------------------------
1 | .test {
2 | background: green;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/postcss/var.css:
--------------------------------------------------------------------------------
1 | $color: green;
2 |
3 | .test {
4 | background: $color;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/_partial_content.pug:
--------------------------------------------------------------------------------
1 | p this is whats in the partial
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/async.pug:
--------------------------------------------------------------------------------
1 | strong IMMA FIRIN MAH LAZERS
2 | p= wow.such
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/basic.pug:
--------------------------------------------------------------------------------
1 | strong IMMA FIRIN MAH LAZERS
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/client-complex.pug:
--------------------------------------------------------------------------------
1 | - foo = [1,2,3,4]
2 | each item in foo
3 | p= item
4 | p!= item
5 |
6 | div(class=foo[0])
7 | .hello such #{wow}
8 |
9 | mixin foo(arg)
10 | p= arg
11 |
12 | .test
13 | .foo('hello')
14 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/client.pug:
--------------------------------------------------------------------------------
1 | p look at my browser-compatibility
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/basic.html:
--------------------------------------------------------------------------------
1 | IMMA FIRIN MAH LAZERS such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/client-complex.html:
--------------------------------------------------------------------------------
1 | 1
1
2
2
3
3
4
4
such local
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/client.html:
--------------------------------------------------------------------------------
1 | look at my browser-compatibility
such options
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/cstring.html:
--------------------------------------------------------------------------------
1 | imma firin mah lazer!
such options
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/partial.html:
--------------------------------------------------------------------------------
1 | heres a partial
this is whats in the partial
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/precompile.html:
--------------------------------------------------------------------------------
1 | spooderman such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/pstring.html:
--------------------------------------------------------------------------------
1 | why cant I shot web?
such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/expected/rstring.html:
--------------------------------------------------------------------------------
1 | BLAHHHHH
such options
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/partial.pug:
--------------------------------------------------------------------------------
1 | p heres a partial
2 | include _partial_content
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/pug/precompile.pug:
--------------------------------------------------------------------------------
1 | h1 spooderman
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/scss/_mixin_lib.scss:
--------------------------------------------------------------------------------
1 | @mixin set_color($color) {
2 | color: $color;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/scss/basic.scss:
--------------------------------------------------------------------------------
1 | $foo: 'bar';
2 |
3 | .test {
4 | content: $foo;
5 |
6 | .foo {
7 | color: blue;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/scss/expected/basic.css:
--------------------------------------------------------------------------------
1 | .test {
2 | content: "bar"; }
3 | .test .foo {
4 | color: blue; }
5 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/scss/expected/external.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | color: "red"; }
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/scss/expected/string.css:
--------------------------------------------------------------------------------
1 | foo {
2 | bar: "red"; }
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/scss/external.scss:
--------------------------------------------------------------------------------
1 | @import "_mixin_lib";
2 |
3 | .foo {
4 | @include set_color('red');
5 | }
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/basic.styl:
--------------------------------------------------------------------------------
1 | .lazers
2 | firing: 'very yes'
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/embedurl.styl:
--------------------------------------------------------------------------------
1 | .embedded
2 | background: embedurl('img/default.png')
3 |
4 | .not-embedded
5 | background: embedurl('img/wow.jpg')
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/basic.css:
--------------------------------------------------------------------------------
1 | .lazers {
2 | firing: 'very yes';
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/defines.css:
--------------------------------------------------------------------------------
1 | .test {
2 | test: 'bar';
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/import1.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/import2.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | color: #00f;
4 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/include1.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/include2.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | color: #008000;
4 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/include_css.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | color: green;
3 | }
4 |
5 | .red {
6 | color: #00f;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/plugins1.css:
--------------------------------------------------------------------------------
1 | .test {
2 | foo: 500;
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/plugins2.css:
--------------------------------------------------------------------------------
1 | .test {
2 | foo: 500;
3 | bar: 200;
4 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/rawdefine.css:
--------------------------------------------------------------------------------
1 | .testing {
2 | background-color: #0000FF;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/expected/string.css:
--------------------------------------------------------------------------------
1 | .test {
2 | foo: bar;
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/extra_plugin/index.styl:
--------------------------------------------------------------------------------
1 | print_green()
2 | color: green
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/img/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pingyhq/pingy-cli/53721434b698f53ba195c4824ca8d1f87ea8b60c/packages/accord/test/fixtures/stylus/img/default.png
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/img/wow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pingyhq/pingy-cli/53721434b698f53ba195c4824ca8d1f87ea8b60c/packages/accord/test/fixtures/stylus/img/wow.jpg
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/import1.styl:
--------------------------------------------------------------------------------
1 | .test
2 | print_red()
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/import2.styl:
--------------------------------------------------------------------------------
1 | .test
2 | print_red()
3 | print_blue()
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/include1.styl:
--------------------------------------------------------------------------------
1 | @import 'pluginz/lib'
2 |
3 | .test
4 | print_red()
5 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/include2.styl:
--------------------------------------------------------------------------------
1 | @import 'pluginz/lib'
2 | @import 'extra_plugin'
3 |
4 | .test
5 | print_red()
6 | print_green()
7 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/include_css.styl:
--------------------------------------------------------------------------------
1 | @import 'to_include.css'
2 |
3 | .red
4 | color: blue
5 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/pluginz/lib.styl:
--------------------------------------------------------------------------------
1 | print_red()
2 | color: red
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/pluginz/lib2.styl:
--------------------------------------------------------------------------------
1 | print_blue()
2 | color: blue
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/rawdefine.styl:
--------------------------------------------------------------------------------
1 | .testing
2 | background-color: unquote(rdefine.blue1)
3 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/stylus/to_include.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | color: green;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/_layout.html:
--------------------------------------------------------------------------------
1 | {% block title %}Default Title{% endblock %}
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/basic.swig:
--------------------------------------------------------------------------------
1 | {{ author }}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/client-complex.swig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pingyhq/pingy-cli/53721434b698f53ba195c4824ca8d1f87ea8b60c/packages/accord/test/fixtures/swig/client-complex.swig
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/client.swig:
--------------------------------------------------------------------------------
1 | {% if foo %}Bar{% endif %}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/expected/basic.html:
--------------------------------------------------------------------------------
1 | Jeff Escalante
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/expected/client.html:
--------------------------------------------------------------------------------
1 | function anonymous(_swig,_ctx,_filters,_utils,_fn
2 | /**/) {
3 | var _ext = _swig.extensions,
4 | _output = "";
5 | _output += "";
6 | if ((((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) !== null ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) : "" )) {
7 | _output += "Bar";
8 |
9 | }_output += " ";
10 |
11 | return _output;
12 |
13 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/expected/cstring.html:
--------------------------------------------------------------------------------
1 | function anonymous(_swig,_ctx,_filters,_utils,_fn
2 | /**/) {
3 | var _ext = _swig.extensions,
4 | _output = "";
5 | _output += "";
6 | if ((((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) !== null ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) : "" )) {
7 | _output += "Bar";
8 |
9 | }_output += " ";
10 |
11 | return _output;
12 |
13 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/expected/partial.html:
--------------------------------------------------------------------------------
1 | Hello!
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/expected/precompile.html:
--------------------------------------------------------------------------------
1 | Hello!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/expected/pstring.html:
--------------------------------------------------------------------------------
1 | Hello!
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/expected/string.html:
--------------------------------------------------------------------------------
1 | Bar
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/partial.swig:
--------------------------------------------------------------------------------
1 | {% extends "./_layout.html" %}
2 | {% block title %}Hello!{% endblock %}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/swig/precompile.swig:
--------------------------------------------------------------------------------
1 | {{ title }}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/toffee/basic.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/toffee/expected/basic.html:
--------------------------------------------------------------------------------
1 | mop trash bin flashlight
2 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/toffee/expected/template.html:
--------------------------------------------------------------------------------
1 | function (x) {
2 | return v.run(x);
3 | }
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/toffee/my_templates-2.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/toffee/my_templates.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
4 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/toffee/template.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/typescript/basic.ts:
--------------------------------------------------------------------------------
1 | function getNumber(): number {
2 | var numberAsString:string = "27"
3 | return parseInt(numberAsString)
4 | }
5 |
6 |
7 | console.log(getNumber())
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/typescript/expected/basic.js:
--------------------------------------------------------------------------------
1 | function getNumber() {
2 | var numberAsString = "27";
3 | return parseInt(numberAsString);
4 | }
5 | console.log(getNumber());
6 |
--------------------------------------------------------------------------------
/packages/accord/test/fixtures/typescript/expected/string.js:
--------------------------------------------------------------------------------
1 | var n = 42;
2 | console.log(n);
3 |
--------------------------------------------------------------------------------
/packages/accord/test/mocha.opts:
--------------------------------------------------------------------------------
1 | --reporter spec
2 | --compilers coffee:coffee-script/register
3 | --require test/support/all
4 | --require coffee-coverage/register-istanbul
5 | --timeout 5000
6 |
--------------------------------------------------------------------------------
/packages/accord/test/support/all.js:
--------------------------------------------------------------------------------
1 | var chai = require('chai');
2 | var W = require('when');
3 | var path = require('path');
4 | var fs = require('fs');
5 | var accord = require('../..');
6 |
7 | global.should = chai.should();
8 | global.accord = accord;
9 | global.W = W;
10 |
11 | global.should.match_expected = function (compiler, content, epath) {
12 | // console.log(content);
13 | var parser;
14 | switch (compiler.output) {
15 | case 'html':
16 | parser = require('parse5').parse;
17 | break;
18 | case 'css':
19 | parser = require('css-parse');
20 | break;
21 | case 'js':
22 | parser = require('acorn').parse;
23 | break;
24 | default:
25 | parser = function (str) {
26 | return str;
27 | };
28 | }
29 |
30 | var expected_path = path.join(
31 | path.dirname(epath),
32 | 'expected',
33 | path.basename(epath, compiler.extensions[0]) + compiler.output
34 | );
35 |
36 | fs.existsSync(expected_path).should.be.ok;
37 |
38 | var expected = parser(fs.readFileSync(expected_path, 'utf8').trim());
39 | var results = parser(content.trim());
40 |
41 | expected.should.deep.eql(results);
42 | };
43 |
--------------------------------------------------------------------------------
/packages/cli/README.md:
--------------------------------------------------------------------------------
1 | [Readme available here](https://github.com/pingyhq/pingy-cli/blob/master/README.md)
2 | ====
3 |
--------------------------------------------------------------------------------
/packages/cli/cli.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | 'use strict';
4 |
5 | const semver = require('semver');
6 | const path = require('upath');
7 |
8 | const cliRunName = './cli-run';
9 | const pkgName = './package';
10 | const localCliPath = path.join(process.cwd(), 'node_modules', '@pingy', 'cli');
11 |
12 | const run = type => {
13 | try {
14 | const cliPath = type === 'local' ? localCliPath : null;
15 | /* eslint-disable global-require, import/no-dynamic-require */
16 | const cli = require(cliPath ? path.join(cliPath, cliRunName) : cliRunName);
17 | const pkg = require(cliPath ? path.join(cliPath, pkgName) : pkgName);
18 | /* eslint-enable global-require, import/no-dynamic-require */
19 | console.log(`${pkg.version} (${type})`);
20 | cli.run();
21 | } catch (err) {
22 | if (semver.lt(process.version, '8') && err.name === 'SyntaxError') {
23 | console.log(
24 | `Pingy CLI is compatible with Node v8+. You are running ${
25 | process.version
26 | }. Please upgrade Node.`
27 | );
28 | } else {
29 | throw err;
30 | }
31 | }
32 | };
33 |
34 | try {
35 | // Try and run local version of Pingy CLI
36 | run('local');
37 | } catch (e) {
38 | // Fallback to global
39 | run('global');
40 | }
41 |
--------------------------------------------------------------------------------
/packages/cli/init/npmInit.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const ora = require('ora');
4 | const spawn = require('cross-spawn');
5 | const { npmInit } = require('@pingy/scaffold-primitive');
6 |
7 | function npmInitCLI() {
8 | const spinner = ora('Creating package.json').start();
9 | return npmInit(process.cwd()).then((initCmd) => {
10 | if (!initCmd) {
11 | spinner.succeed('Package.json already exists');
12 | return null;
13 | }
14 |
15 | const spawnCmd = spawn(initCmd.cmd, initCmd.args, { stdio: ['pipe', 'pipe', process.stdout] });
16 | return new Promise((resolve, reject) => {
17 | spawnCmd.on('exit', (code) => {
18 | if (code === 0) {
19 | spinner.succeed('Created package.json');
20 | return resolve(code);
21 | }
22 | spinner.fail('Failed to create package.json');
23 | return reject(new Error(`npm init failed with code: ${code}`));
24 | });
25 | });
26 | });
27 | }
28 |
29 | module.exports = npmInitCLI;
30 |
--------------------------------------------------------------------------------
/packages/cli/init/promptListWithHelpText.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const chalk = require('chalk');
4 | const util = require('util');
5 | const inquirer = require('inquirer');
6 |
7 | const Base = inquirer.prompt.prompts.list;
8 | function Prompt(...args) {
9 | this.firstRender = false;
10 | Base.apply(this, args);
11 | this.firstRender = false;
12 | }
13 | util.inherits(Prompt, Base);
14 |
15 | Prompt.prototype.getQuestion = function getQuestion() {
16 | let message = `${this.opt.prefix} ${chalk.bold(this.opt.message)}${this.opt.suffix}${chalk.reset(
17 | ' '
18 | )}`;
19 |
20 | if (this.opt.helpText && this.status !== 'answered') {
21 | message += `\n \n${this.opt.helpText}\n`;
22 | }
23 |
24 | // Append the default if available, and if question isn't answered
25 | // if (this.opt.default != null && this.status !== 'answered') {
26 | // message += chalk.dim(`(${this.opt.default}) `);
27 | // }
28 | return message;
29 | };
30 |
31 | module.exports = Prompt;
32 |
--------------------------------------------------------------------------------
/packages/cli/init/renderLastInit.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const chalk = require('chalk');
4 | const compilerMap = require('@pingy/init/compilerMap');
5 |
6 | const valToName = (type, ext) =>
7 | (compilerMap[type].find(x => x.extension === ext) || {}).name || ext.toUpperCase();
8 |
9 | module.exports = (lastInit) => {
10 | const lines = [];
11 | if (lastInit.html) {
12 | lines.push(` ${chalk.reset('Documents')}: ${chalk.bold(valToName('docs', lastInit.html))}`);
13 | }
14 | if (lastInit.scripts) {
15 | lines.push(
16 | ` ${chalk.reset('Scripts')}: ${chalk.bold(valToName('scripts', lastInit.scripts))}`
17 | );
18 | }
19 | if (lastInit.styles) {
20 | lines.push(` ${chalk.reset('Styles')}: ${chalk.bold(valToName('styles', lastInit.styles))}`);
21 | }
22 | if (lastInit.whitespace) {
23 | lines.push(
24 | ` ${chalk.reset('Whitespace format')}: ${chalk.bold(
25 | lastInit.whitespace.length === 1 ? `${lastInit.whitespace} spaces` : 'Tabs'
26 | )}`
27 | );
28 | }
29 | return `${lines.join('\n')}\n`;
30 | };
31 |
--------------------------------------------------------------------------------
/packages/cli/init/updatePkgScripts.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const ora = require('ora');
4 | const { updatePkgJsonAndPingyJson } = require('@pingy/core');
5 | const { version } = require('../package.json');
6 |
7 | async function update(scaffoldOptions, options) {
8 | let pkgJsonSpinner;
9 | let pingyJsonSpinner;
10 | try {
11 | pkgJsonSpinner = ora('Updating package.json').start();
12 | const doPingyJson = await updatePkgJsonAndPingyJson(
13 | version,
14 | scaffoldOptions,
15 | options
16 | );
17 | pkgJsonSpinner.succeed('Updated package.json');
18 | pingyJsonSpinner = ora('Creating pingy.json').start();
19 | await doPingyJson();
20 | pingyJsonSpinner.succeed('Created pingy.json');
21 | } catch (err) {
22 | (pingyJsonSpinner || pkgJsonSpinner).fail(err.stack);
23 | }
24 | }
25 |
26 | module.exports = update;
27 |
--------------------------------------------------------------------------------
/packages/cli/pingy-ascii.txt:
--------------------------------------------------------------------------------
1 | ____ _
2 | | _ \(_)_ __ __ _ _ _
3 | | |_) | | '_ \ / _` | | | |
4 | | __/| | | | | (_| | |_| |
5 | |_| |_|_| |_|\__, |\__, |
6 | |___/ |___/
7 |
--------------------------------------------------------------------------------
/packages/cli/test/assertions.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const { existsSync, readFileSync } = require('fs');
4 |
5 | module.exports = (expect) => {
6 | expect.addAssertion(' [not] to exist', (ex, subject) => {
7 | ex.errorMode = 'default';
8 | ex(existsSync(subject), '[not] to be true');
9 | });
10 |
11 | expect.addAssertion(' [not] to have file content ', (ex, subject, cmp) => {
12 | ex.errorMode = 'default';
13 | ex(readFileSync(subject, 'utf8'), '[not] to contain', cmp);
14 | });
15 | };
16 |
--------------------------------------------------------------------------------
/packages/cli/test/fixtures/_inner.ejs:
--------------------------------------------------------------------------------
1 | What is up?
2 |
--------------------------------------------------------------------------------
/packages/cli/test/fixtures/_inner.pug:
--------------------------------------------------------------------------------
1 | div(id='included') HELLO from included file
2 |
--------------------------------------------------------------------------------
/packages/cli/test/fixtures/_inner.scss:
--------------------------------------------------------------------------------
1 | h1 {
2 | background: green;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/cli/test/fixtures/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World
4 |
--------------------------------------------------------------------------------
/packages/cli/test/fixtures/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fixtures",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "start": "pingy dev",
9 | "export": "pingy export"
10 | },
11 | "keywords": [],
12 | "author": "Dave Jeffery ",
13 | "license": "ISC"
14 | }
--------------------------------------------------------------------------------
/packages/compile/.editorconfig:
--------------------------------------------------------------------------------
1 | ; EditorConfig is awesome: http://EditorConfig.org
2 |
3 | ; top-most EditorConfig file
4 | root = true
5 |
6 | [*]
7 | charset = utf-8
8 |
9 | trim_trailing_whitespace = true
10 |
11 | ; Unix style line endings
12 | end_of_line = lf
13 |
14 | ; Always end file on newline
15 | insert_final_newline = true
16 |
17 | ; Indentation
18 | indent_style = space
19 | indent_size = 2
20 |
--------------------------------------------------------------------------------
/packages/compile/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | coverage
3 |
--------------------------------------------------------------------------------
/packages/compile/.jshintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | fixtures
3 | coverage
4 |
--------------------------------------------------------------------------------
/packages/compile/.npmrc:
--------------------------------------------------------------------------------
1 | save-exact=true
2 |
--------------------------------------------------------------------------------
/packages/compile/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | sudo: false
3 | node_js:
4 | - "4"
5 | - "node"
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/autoprefixer/unprefixed.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: -webkit-box;
3 | display: -webkit-flex;
4 | display: -moz-box;
5 | display: -ms-flexbox;
6 | display: flex;
7 | -webkit-transition: all 0.2s ease-in-out;
8 | -moz-transition: all 0.2s ease-in-out;
9 | -o-transition: all 0.2s ease-in-out;
10 | transition: all 0.2s ease-in-out;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/autoprefixer/unprefixed.less:
--------------------------------------------------------------------------------
1 | body {
2 | display: -webkit-box;
3 | display: -webkit-flex;
4 | display: -moz-box;
5 | display: -ms-flexbox;
6 | display: flex;
7 | -webkit-transition: all 0.2s ease-in-out;
8 | -moz-transition: all 0.2s ease-in-out;
9 | -o-transition: all 0.2s ease-in-out;
10 | transition: all 0.2s ease-in-out;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/autoprefixer/unprefixed.myth:
--------------------------------------------------------------------------------
1 | body {
2 | display: -webkit-flex;
3 | display: -ms-flexbox;
4 | display: -webkit-box;
5 | display: -moz-box;
6 | display: flex;
7 | -webkit-transition: all 0.2s ease-in-out;
8 | -moz-transition: all 0.2s ease-in-out;
9 | -o-transition: all 0.2s ease-in-out;
10 | transition: all 0.2s ease-in-out;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/autoprefixer/unprefixed.scss:
--------------------------------------------------------------------------------
1 | body {
2 | display: -webkit-box;
3 | display: -webkit-flex;
4 | display: -moz-box;
5 | display: -ms-flexbox;
6 | display: flex;
7 | -webkit-transition: all 0.2s ease-in-out;
8 | -moz-transition: all 0.2s ease-in-out;
9 | -o-transition: all 0.2s ease-in-out;
10 | transition: all 0.2s ease-in-out; }
11 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/autoprefixer/unprefixed.styl:
--------------------------------------------------------------------------------
1 | body {
2 | display: -webkit-box;
3 | display: -webkit-flex;
4 | display: -moz-box;
5 | display: -ms-flexbox;
6 | display: flex;
7 | -webkit-transition: all 0.2s ease-in-out;
8 | -moz-transition: all 0.2s ease-in-out;
9 | -o-transition: all 0.2s ease-in-out;
10 | transition: all 0.2s ease-in-out;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/babel/basic.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };
4 |
5 | var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
6 |
7 | var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
8 |
9 | var Test = (function (TestClass) {
10 | function Test(greeting) {
11 | _classCallCheck(this, Test);
12 |
13 | this.greeting = greeting;
14 | }
15 |
16 | _inherits(Test, TestClass);
17 |
18 | _prototypeProperties(Test, {
19 | defaultGreeting: {
20 | value: function defaultGreeting() {
21 | return "hello there!";
22 | },
23 | writable: true,
24 | configurable: true
25 | }
26 | });
27 |
28 | return Test;
29 | })(TestClass);
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/babel/string.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | console.log("foo");
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/coco/basic.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | var mixin, slice$ = [].slice;
3 | mixin = function(){
4 | var objects, i$, x0$, len$;
5 | objects = slice$.call(arguments);
6 | for (i$ = 0, len$ = objects.length; i$ < len$; ++i$) {
7 | x0$ = objects[i$];
8 | import$(this, x0$);
9 | }
10 | return this;
11 | };
12 | function import$(obj, src){
13 | var own = {}.hasOwnProperty;
14 | for (var key in src) if (own.call(src, key)) obj[key] = src[key];
15 | return obj;
16 | }
17 | }).call(this);
18 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/coco/string.js:
--------------------------------------------------------------------------------
1 | function test(){
2 | return console.log('foo');
3 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/coffee/basic.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | console.log(5 + 10);
3 |
4 | }).call(this);
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/coffee/string.js:
--------------------------------------------------------------------------------
1 | console.log("test");
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/csso/basic.css:
--------------------------------------------------------------------------------
1 | /*! keep this comment */.hello{margin:0;color:silver;border:1px solid}
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/csso/opts.css:
--------------------------------------------------------------------------------
1 | .hello{color:red}.hello{padding:10px}
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/csso/string.css:
--------------------------------------------------------------------------------
1 | .hello{foo:bar;color:green}
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/dogescript/basic.js:
--------------------------------------------------------------------------------
1 | var doge = 'wow';
2 |
3 | if (doge ) {
4 | console.log(doge);
5 | } else {
6 | console.log('no doge');
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/dogescript/string.js:
--------------------------------------------------------------------------------
1 | console.log('wow');
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/ejs/basic.html:
--------------------------------------------------------------------------------
1 | wow such html
wow opts
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/ejs/client-complex.html:
--------------------------------------------------------------------------------
1 | Here's a client side template. And local
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/ejs/partial.html:
--------------------------------------------------------------------------------
1 | here's a partial my friends:
2 | look ma i made it to the partial!
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/ejs/precompile.html:
--------------------------------------------------------------------------------
1 | welcome to pen island
wow opts
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/ejs/pstring.html:
--------------------------------------------------------------------------------
1 | precompilez
wow opts
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/ejs/rstring.html:
--------------------------------------------------------------------------------
1 | ejs yah
wow opts
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/escape-html/basic.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/escape-html/escapable.html:
--------------------------------------------------------------------------------
1 |
2 | § wow © ":;
3 |
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/escape-html/string.html:
--------------------------------------------------------------------------------
1 | §
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/haml/basic.html:
--------------------------------------------------------------------------------
1 |
2 | article text here and here
3 | haml
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/haml/precompile.html:
--------------------------------------------------------------------------------
1 |
2 | Here I am chilling with my friend doge
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/haml/pstring.html:
--------------------------------------------------------------------------------
1 |
2 | Hello there my friend
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/haml/rstring.html:
--------------------------------------------------------------------------------
1 |
2 | Whats up mang
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/basic.html:
--------------------------------------------------------------------------------
1 | Look, it's a file with handlebars stuff in it!
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/client-complex.html:
--------------------------------------------------------------------------------
1 | This is a test. And here's a local: local
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/client.html:
--------------------------------------------------------------------------------
1 | Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
2 | var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
3 | return "Under the "
4 | + escapeExpression(((helper = (helper = helpers.body_of_water || (depth0 != null ? depth0.body_of_water : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"body_of_water","hash":{},"data":data}) : helper)))
5 | + " ";
6 | },"useData":true});
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/cstring.html:
--------------------------------------------------------------------------------
1 | Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
2 | var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
3 | return "Here comes the "
4 | + escapeExpression(((helper = (helper = helpers.thing || (depth0 != null ? depth0.thing : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"thing","hash":{},"data":data}) : helper)));
5 | },"useData":true});
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/partial.html:
--------------------------------------------------------------------------------
1 | Introducing Partials!
2 | hello from a partial!
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/precompile.html:
--------------------------------------------------------------------------------
1 | Here's a precompiled file with me special friend r kelly
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/pstring.html:
--------------------------------------------------------------------------------
1 | Hello there my friend
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/handlebars/rstring.html:
--------------------------------------------------------------------------------
1 | Hello there homie
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/basic.html:
--------------------------------------------------------------------------------
1 | IMMA FIRIN MAH LAZERS such options
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/client-complex.html:
--------------------------------------------------------------------------------
1 | 1
1
2
2
3
3
4
4
such local
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/client.html:
--------------------------------------------------------------------------------
1 | function template(locals) {
2 | var buf = [];
3 | var jade_mixins = {};
4 | var jade_interp;
5 | ;var locals_for_with = (locals || {});(function (foo) {
6 | buf.push("look at my browser-compatibility
" + (jade.escape(null == (jade_interp = foo) ? "" : jade_interp)) + "
");}.call(this,"foo" in locals_for_with?locals_for_with.foo:typeof foo!=="undefined"?foo:undefined));;return buf.join("");
7 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/cstring.html:
--------------------------------------------------------------------------------
1 | function template(locals) {
2 | var buf = [];
3 | var jade_mixins = {};
4 | var jade_interp;
5 | ;var locals_for_with = (locals || {});(function (foo) {
6 | buf.push("look at my browser-compatibility
" + (jade.escape(null == (jade_interp = foo) ? "" : jade_interp)) + "
");}.call(this,"foo" in locals_for_with?locals_for_with.foo:typeof foo!=="undefined"?foo:undefined));;return buf.join("");
7 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/partial.html:
--------------------------------------------------------------------------------
1 | heres a partial
this is whats in the partial
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/precompile.html:
--------------------------------------------------------------------------------
1 | spooderman such options
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/pstring.html:
--------------------------------------------------------------------------------
1 | why cant I shot web?
such options
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/jade/rstring.html:
--------------------------------------------------------------------------------
1 | BLAHHHHH
such options
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/less/basic.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #428bca;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/less/external.css:
--------------------------------------------------------------------------------
1 | .bar {
2 | wow: 'foo';
3 | }
4 | .foo {
5 | color: red;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/less/string.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | width: 120;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/livescript/basic.js:
--------------------------------------------------------------------------------
1 | // Generated by LiveScript 1.3.1
2 | (function(){
3 | var x;
4 | x = 10;
5 | (function(){
6 | return x = 5;
7 | })();
8 | }).call(this);
9 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/livescript/string.js:
--------------------------------------------------------------------------------
1 | // Generated by LiveScript 1.3.1
2 | var test, this$ = this;
3 | test = function(){
4 | return console.log('foo');
5 | };
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/marc/basic.html:
--------------------------------------------------------------------------------
1 | I am using markdown with marc!
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/markdown/basic.html:
--------------------------------------------------------------------------------
1 | Here's an awesome link
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/markdown/opts.html:
--------------------------------------------------------------------------------
1 | <p>heres <em>some</em> html<p>
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/markdown/string.html:
--------------------------------------------------------------------------------
1 | hello world
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/minify-css/basic.css:
--------------------------------------------------------------------------------
1 | .sunny-spots{color:golden}
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/minify-css/opts.css:
--------------------------------------------------------------------------------
1 | .selector1{wow:such styles}
2 | .two{ermahgerd:red}
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/minify-css/string.css:
--------------------------------------------------------------------------------
1 | .test{foo:bar}
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/minify-html/basic.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/minify-html/opts.html:
--------------------------------------------------------------------------------
1 |
2 |
look at my biceps!
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/minify-html/string.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/minify-js/basic.js:
--------------------------------------------------------------------------------
1 | for(var stuff=[1,2,3,4,5],i=0;iOk here we go with the local: local
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/mustache/partial.html:
--------------------------------------------------------------------------------
1 | foo bar
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/mustache/precompile.html:
--------------------------------------------------------------------------------
1 | Hello there, fine foo!
2 |
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/mustache/pstring.html:
--------------------------------------------------------------------------------
1 | Wow, such compile
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/mustache/string.html:
--------------------------------------------------------------------------------
1 | Why hello, dogeudle!
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/myth/basic.css:
--------------------------------------------------------------------------------
1 | a {
2 | color: #847AD1;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/myth/import.css:
--------------------------------------------------------------------------------
1 | html {
2 | background: blue;
3 | }
4 |
5 | body {
6 | color: red;
7 | }
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/myth/string.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | -webkit-transition: all 1s ease;
3 | transition: all 1s ease;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/scss/basic.css:
--------------------------------------------------------------------------------
1 | .test {
2 | content: 'bar'; }
3 | .test .foo {
4 | color: blue; }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/scss/external.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | color: 'red'; }
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/scss/string.css:
--------------------------------------------------------------------------------
1 | foo {
2 | bar: 'red'; }
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/basic.css:
--------------------------------------------------------------------------------
1 | .lazers {
2 | firing: 'very yes';
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/defines.css:
--------------------------------------------------------------------------------
1 | .test {
2 | test: 'bar';
3 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/embedurl-opts.css:
--------------------------------------------------------------------------------
1 | .embedded {
2 | background: url("img/default.png");
3 | }
4 | .not-embedded {
5 | background: url("img/wow.jpg");
6 | }
7 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/embedurl.css:
--------------------------------------------------------------------------------
1 | .embedded {
2 | background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAICAYAAAAFiPQnAAAA7ElEQVQoFZ2SsQ0CMQxFAw0SEgUFFU0qOjpGoKW9mpqengFYgAVYgAluAza4ERgB/tP5RylzfOmf7Tj+cXJOKaVO7EVjL+crrmJhJvsRtxGfZcmbWT6YpHNQAQILKgUaIEYEuAkOv4rkjuJSfES8kZ2ik+ZRiBDwDd5jmF6yT5FDyd3FGqzRTKtOqeUAhH2rnXzEeGJsFn0ot6tBrRts0Sm1J3mIu2sS+ENYYh/KrWqw7xYLLTqllv9JMVzHah9x/Zz47MkiTVxEYl4GtOqMu/UdRKbU4B8j6Kn1uoeHHPQsON+q4/3NlqGBf+EH1sdV9+hmDKUAAAAASUVORK5CYII=");
3 | }
4 | .not-embedded {
5 | background: url("img/wow.jpg");
6 | }
7 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/import1.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/import2.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | color: #00f;
4 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/include1.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/include2.css:
--------------------------------------------------------------------------------
1 | .test {
2 | color: #f00;
3 | color: #008000;
4 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/include_css.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | color: green;
3 | }
4 | .red {
5 | color: #00f;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/plugins1.css:
--------------------------------------------------------------------------------
1 | .test {
2 | foo: 500;
3 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/plugins2.css:
--------------------------------------------------------------------------------
1 | .test {
2 | foo: 500;
3 | bar: 200;
4 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/stylus/string.css:
--------------------------------------------------------------------------------
1 | .test {
2 | foo: bar;
3 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/swig/basic.html:
--------------------------------------------------------------------------------
1 | Jeff Escalante
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/swig/client.html:
--------------------------------------------------------------------------------
1 | function anonymous(_swig,_ctx,_filters,_utils,_fn) {
2 | var _ext = _swig.extensions,
3 | _output = "";
4 | _output += "";
5 | if (((typeof _ctx.foo !== "undefined") ? ((typeof _ctx.foo !== "undefined") ? _ctx.foo : "") : ((typeof foo !== "undefined") ? foo : ""))) {
6 | _output += "Bar";
7 |
8 | }_output += " ";
9 |
10 | return _output;
11 |
12 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/swig/cstring.html:
--------------------------------------------------------------------------------
1 | function anonymous(_swig,_ctx,_filters,_utils,_fn) {
2 | var _ext = _swig.extensions,
3 | _output = "";
4 | _output += "";
5 | if (((typeof _ctx.foo !== "undefined") ? ((typeof _ctx.foo !== "undefined") ? _ctx.foo : "") : ((typeof foo !== "undefined") ? foo : ""))) {
6 | _output += "Bar";
7 |
8 | }_output += " ";
9 |
10 | return _output;
11 |
12 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/swig/partial.html:
--------------------------------------------------------------------------------
1 | Hello!
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/swig/precompile.html:
--------------------------------------------------------------------------------
1 | Hello!
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/swig/pstring.html:
--------------------------------------------------------------------------------
1 | Hello!
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/swig/string.html:
--------------------------------------------------------------------------------
1 | Bar
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/toffee/basic.html:
--------------------------------------------------------------------------------
1 | mop trashbin flashlight
--------------------------------------------------------------------------------
/packages/compile/fixtures/compiled/toffee/template.html:
--------------------------------------------------------------------------------
1 | function (x) {
2 | return v.run(x);
3 | }
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/autoprefixer/unprefixed.css:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | transition: all 0.2s ease-in-out;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/autoprefixer/unprefixed.less:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | transition: all 0.2s ease-in-out;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/autoprefixer/unprefixed.myth:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | transition: all 0.2s ease-in-out;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/autoprefixer/unprefixed.scss:
--------------------------------------------------------------------------------
1 | $time: 0.2s;
2 |
3 | body {
4 | display: flex;
5 | transition: all $time ease-in-out;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/autoprefixer/unprefixed.styl:
--------------------------------------------------------------------------------
1 | body {
2 | display: flex;
3 | transition: all 0.2s ease-in-out;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/babel/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015"]
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/babel/basic.babel.js:
--------------------------------------------------------------------------------
1 | class Test extends TestClass {
2 | constructor(greeting) {
3 | this.greeting = greeting;
4 | }
5 |
6 | static defaultGreeting() {
7 | return 'hello there!'
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/babel/simplest.babel.js:
--------------------------------------------------------------------------------
1 | const foo = 'bar';
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/basic.css:
--------------------------------------------------------------------------------
1 | body {
2 | transform: rotate(-1deg);
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/coco/basic.co:
--------------------------------------------------------------------------------
1 | mixin = (...objects) ->
2 | for objects => @ <<< &
3 | this
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/coffee/basic.coffee:
--------------------------------------------------------------------------------
1 | console.log 5 + 10
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/csso/basic.css:
--------------------------------------------------------------------------------
1 | /*! keep this comment */
2 | /* wow, such optimize */
3 |
4 | .hello {
5 | margin: 0px;
6 | color: #c0c0c0;
7 | }
8 |
9 | .hello {
10 | border: 1px solid;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/csso/opts.css:
--------------------------------------------------------------------------------
1 | .hello {
2 | color: red;
3 | }
4 |
5 | .hello {
6 | padding: 10px;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/dogescript/basic.djs:
--------------------------------------------------------------------------------
1 | very doge is 'wow'
2 |
3 | rly doge
4 | console dose loge with doge
5 | but
6 | console dose loge with 'no doge'
7 | wow
8 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/ejs/basic.ejs:
--------------------------------------------------------------------------------
1 | wow such html
<%= foo %>
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/ejs/client-complex.ejs:
--------------------------------------------------------------------------------
1 | Here's a client side template. And <%= foo %>
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/ejs/client.ejs:
--------------------------------------------------------------------------------
1 | Wow look a client side template <%= foo %>>
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/ejs/includeme.ejs:
--------------------------------------------------------------------------------
1 | look ma i made it to the partial!
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/ejs/partial.ejs:
--------------------------------------------------------------------------------
1 | here's a partial my friends:
2 | <% include includeme %>
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/ejs/precompile.ejs:
--------------------------------------------------------------------------------
1 | welcome to pen island
<%= foo %>
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/escape-html/basic.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/escape-html/escapable.html:
--------------------------------------------------------------------------------
1 |
2 | § wow © ":;
3 |
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/haml/basic.haml:
--------------------------------------------------------------------------------
1 | %div.article.first
2 | article text here
3 | and here
4 | #wow= compiler
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/haml/precompile.haml:
--------------------------------------------------------------------------------
1 | %section= "Here I am chilling with my friend " + friend
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/handlebars/basic.hbs:
--------------------------------------------------------------------------------
1 | Look, it's a file with {{ compiler }} stuff in it!
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/handlebars/client-complex.hbs:
--------------------------------------------------------------------------------
1 | This is a test. And here's a local: {{ wow }}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/handlebars/client.hbs:
--------------------------------------------------------------------------------
1 | Under the {{ body_of_water }}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/handlebars/partial.hbs:
--------------------------------------------------------------------------------
1 | Introducing Partials!
2 | {{> foo }}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/handlebars/precompile.hbs:
--------------------------------------------------------------------------------
1 | Here's a precompiled file with me special friend {{ friend }}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/jade/_partial_content.jade:
--------------------------------------------------------------------------------
1 | p this is whats in the partial
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/jade/async.jade:
--------------------------------------------------------------------------------
1 | strong IMMA FIRIN MAH LAZERS
2 | p= wow.such
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/jade/basic.jade:
--------------------------------------------------------------------------------
1 | strong IMMA FIRIN MAH LAZERS
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/jade/client-complex.jade:
--------------------------------------------------------------------------------
1 | - foo = [1,2,3,4]
2 | each item in foo
3 | p= item
4 | p!= item
5 |
6 | div(class=foo[0])
7 | .hello such #{wow}
8 |
9 | mixin foo(arg)
10 | p= arg
11 |
12 | .test
13 | .foo('hello')
14 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/jade/client.jade:
--------------------------------------------------------------------------------
1 | p look at my browser-compatibility
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/jade/partial.jade:
--------------------------------------------------------------------------------
1 | p heres a partial
2 | include _partial_content
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/jade/precompile.jade:
--------------------------------------------------------------------------------
1 | h1 spooderman
2 | p= foo
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/less/_cache_partial.less:
--------------------------------------------------------------------------------
1 | .bar {
2 | wow: 'foo';
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/less/_import.less:
--------------------------------------------------------------------------------
1 | .bar {
2 | wow: 'foo';
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/less/basic.less:
--------------------------------------------------------------------------------
1 | @color: #428bca;
2 |
3 | .test {
4 | color: @color;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/less/cache.less:
--------------------------------------------------------------------------------
1 | @import "_cache_partial.less";
2 |
3 | .foo {
4 | color: red;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/less/external.less:
--------------------------------------------------------------------------------
1 | @import "_import.less";
2 |
3 | .foo {
4 | color: red;
5 | display: flex;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/livescript/basic.ls:
--------------------------------------------------------------------------------
1 | x = 10
2 | do ->
3 | x := 5
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/marc/basic.md:
--------------------------------------------------------------------------------
1 | I am using __markdown__ with {{label}}!
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/markdown/basic.md:
--------------------------------------------------------------------------------
1 | Here's an [awesome link](http://google.com)
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/markdown/opts.md:
--------------------------------------------------------------------------------
1 | heres some html
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/minify-css/basic.css:
--------------------------------------------------------------------------------
1 | .sunny-spots {
2 | color: golden;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/minify-css/opts.css:
--------------------------------------------------------------------------------
1 | .selector1 {
2 | wow: such styles;
3 | }
4 |
5 | .two {
6 | ermahgerd: red;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/minify-html/basic.html:
--------------------------------------------------------------------------------
1 |
2 |
wowlaween
3 |
4 | nested!
5 |
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/minify-html/opts.html:
--------------------------------------------------------------------------------
1 |
2 |
look at my biceps!
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/minify-js/basic.js:
--------------------------------------------------------------------------------
1 | var stuff = [1,2,3,4,5]
2 | for (var i = 0; i < stuff.length; i++) {
3 | console.log(stuff[i]);
4 | }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/minify-js/opts.js:
--------------------------------------------------------------------------------
1 | var stuff = [1,2,3,4,5]
2 | for (var i = 0; i < stuff.length; i++) {
3 | console.log(stuff[i]);
4 | }
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/mustache/basic.mustache:
--------------------------------------------------------------------------------
1 | Hello there, fine {{ name }}! {{! a comment }}
2 |
3 | {{# winner }}
4 | You just won 5 million dogecoins!
5 | {{/ winner }}
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/mustache/client-complex.mustache:
--------------------------------------------------------------------------------
1 | Ok here we go with the local: {{ wow }}
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/mustache/partial.mustache:
--------------------------------------------------------------------------------
1 | {{> partial }}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/mustache/precompile.mustache:
--------------------------------------------------------------------------------
1 | Hello there, fine {{ name }}! {{! a comment }}
2 |
3 | {{# winner }}
4 | You just won 5 million dogecoins!
5 | {{/ winner }}
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/myth/basic.myth:
--------------------------------------------------------------------------------
1 | :root {
2 | --purple: #847AD1;
3 | }
4 |
5 | a {
6 | color: var(--purple);
7 | }
8 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/myth/import.myth:
--------------------------------------------------------------------------------
1 | @import "imported.myth";
2 |
3 | body {
4 | color: red
5 | }
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/myth/imported.myth:
--------------------------------------------------------------------------------
1 | html {
2 | background: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/scss/_cache_partial.scss:
--------------------------------------------------------------------------------
1 | @mixin set_color($color) {
2 | color: $color;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/scss/_mixin_lib.scss:
--------------------------------------------------------------------------------
1 | @mixin set_color($color) {
2 | color: $color;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/scss/autoprefix.scss:
--------------------------------------------------------------------------------
1 | $degrees: -1deg;
2 |
3 | body {
4 | transform: rotate($degrees);
5 | }
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/scss/basic.scss:
--------------------------------------------------------------------------------
1 | $foo: 'bar';
2 |
3 | .test {
4 | content: $foo;
5 |
6 | .foo {
7 | color: blue;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/scss/cache.scss:
--------------------------------------------------------------------------------
1 | @import "_cache_partial";
2 |
3 | .foo {
4 | @include set_color('red');
5 | }
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/scss/external.scss:
--------------------------------------------------------------------------------
1 | @import "_mixin_lib";
2 |
3 | .foo {
4 | @include set_color('red');
5 | }
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/scss/syntaxerror.scss:
--------------------------------------------------------------------------------
1 | body {
2 | color hotpink
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/basic.styl:
--------------------------------------------------------------------------------
1 | .lazers
2 | firing: 'very yes'
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/cache.styl:
--------------------------------------------------------------------------------
1 | .lazers
2 | firing: 'very yes'
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/embedurl.styl:
--------------------------------------------------------------------------------
1 | .embedded
2 | background: embedurl('img/default.png')
3 |
4 | .not-embedded
5 | background: embedurl('img/wow.jpg')
6 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/extra_plugin/index.styl:
--------------------------------------------------------------------------------
1 | print_green()
2 | color: green
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/img/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pingyhq/pingy-cli/53721434b698f53ba195c4824ca8d1f87ea8b60c/packages/compile/fixtures/source/stylus/img/default.png
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/img/wow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pingyhq/pingy-cli/53721434b698f53ba195c4824ca8d1f87ea8b60c/packages/compile/fixtures/source/stylus/img/wow.jpg
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/import1.styl:
--------------------------------------------------------------------------------
1 | .test
2 | print_red()
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/import2.styl:
--------------------------------------------------------------------------------
1 | .test
2 | print_red()
3 | print_blue()
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/include1.styl:
--------------------------------------------------------------------------------
1 | @import 'pluginz/lib'
2 |
3 | .test
4 | print_red()
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/include2.styl:
--------------------------------------------------------------------------------
1 | @import 'pluginz/lib'
2 | @import 'extra_plugin'
3 |
4 | .test
5 | print_red()
6 | print_green()
7 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/include_css.styl:
--------------------------------------------------------------------------------
1 | @import 'to_include.css'
2 |
3 | .red
4 | color: blue
5 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/pluginz/lib.styl:
--------------------------------------------------------------------------------
1 | print_red()
2 | color: red
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/pluginz/lib2.styl:
--------------------------------------------------------------------------------
1 | print_blue()
2 | color: blue
3 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/stylus/to_include.css:
--------------------------------------------------------------------------------
1 | .foo {
2 | color: green;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/swig/_layout.html:
--------------------------------------------------------------------------------
1 | {% block title %}Default Title{% endblock %}
2 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/swig/basic.swig:
--------------------------------------------------------------------------------
1 | {{ author }}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/swig/client-complex.swig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pingyhq/pingy-cli/53721434b698f53ba195c4824ca8d1f87ea8b60c/packages/compile/fixtures/source/swig/client-complex.swig
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/swig/client.swig:
--------------------------------------------------------------------------------
1 | {% if foo %}Bar{% endif %}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/swig/partial.swig:
--------------------------------------------------------------------------------
1 | {% extends "./_layout.html" %}
2 | {% block title %}Hello!{% endblock %}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/swig/precompile.swig:
--------------------------------------------------------------------------------
1 | {{ title }}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/toffee/basic.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/toffee/my_templates-2.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/toffee/my_templates.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
4 |
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/toffee/template.toffee:
--------------------------------------------------------------------------------
1 | {#
2 | for supply in supplies {:#{supply} :}
3 | #}
--------------------------------------------------------------------------------
/packages/compile/fixtures/source/unchanged.txt:
--------------------------------------------------------------------------------
1 | I am the same
2 |
--------------------------------------------------------------------------------
/packages/core/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@pingy/core",
3 | "version": "1.0.3",
4 | "description": "Core connector of Pingy modules",
5 | "main": "index.js",
6 | "files": [
7 | "index.js"
8 | ],
9 | "author": "Dave Jeffery ",
10 | "license": "MIT",
11 | "publishConfig": {
12 | "access": "public"
13 | },
14 | "dependencies": {
15 | "@pingy/export": "^5.0.7",
16 | "@pingy/instant": "^3.4.0",
17 | "@pingy/middleware": "^4.3.0",
18 | "@pingy/scaffold-middleware": "^1.0.0",
19 | "@pingy/scaffold-primitive": "^3.0.0",
20 | "connect": "^3.6.5",
21 | "express": "^4.16.2",
22 | "express-autoprefixer": "^5.3.0",
23 | "find-up": "^2.1.0",
24 | "get-port": "^3.2.0",
25 | "serve-static": "^1.13.1",
26 | "server-destroy": "^1.0.1",
27 | "upath": "^1.0.2"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/packages/export/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | examples/output
3 |
--------------------------------------------------------------------------------
/packages/export/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | sudo: false
3 | node_js:
4 | - "4"
5 | - "node"
6 |
--------------------------------------------------------------------------------
/packages/export/examples/compile-site.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var baconize = require('../');
4 | var path = require('path');
5 |
6 | var input = path.join(__dirname, '/site/');
7 | var output = path.join(__dirname, '/output/');
8 |
9 | baconize(input, output, {compile: true, minify: true, sourcemaps: true})
10 | .then(function(numFiles) {
11 | console.log('Baconized Successfully. Copied ' + numFiles + ' files.');
12 | }, function(err) {
13 | console.error('Baconize Failed', err);
14 | });
15 |
--------------------------------------------------------------------------------
/packages/export/examples/site/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015"]
3 | }
4 |
--------------------------------------------------------------------------------
/packages/export/examples/site/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Some Page
6 |
7 |
8 | Just some page
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/export/examples/site/dont-compile/foo.coffee:
--------------------------------------------------------------------------------
1 | console.log "This file should be copied but not compiled"
2 |
--------------------------------------------------------------------------------
/packages/export/examples/site/dont-copy/_inner.styl:
--------------------------------------------------------------------------------
1 | h1
2 | color: darkgreen
3 | display: flex
4 |
--------------------------------------------------------------------------------
/packages/export/examples/site/dont-copy/bar.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html(lang="en")
3 | head
4 | title This file shouldn't be copied
5 | body
6 | h1 This file shouldn't be copied
7 |
--------------------------------------------------------------------------------
/packages/export/examples/site/dont-copy/foo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | This file shouldn't be copied
6 |
7 |
8 | This file shouldn't be copied
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/export/examples/site/index.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html(lang="en")
3 | head
4 | title Piggy In The Middle
5 | link(rel="stylesheet", href="styles/main.css")
6 | link(rel="stylesheet", href="styles/typography.css")
7 | body
8 | h1 Piggy In The Middle
9 | p Yo, this is Jade speaking.
10 | p.
11 | Check out the hotpink background powered by Stylus and
12 | check your console to see Coffeescript saying 'hello'.
13 |
14 | script(src="scripts/main.js")
15 | script(src="scripts/iterate.js")
16 |
--------------------------------------------------------------------------------
/packages/export/examples/site/scripts/iterate.js:
--------------------------------------------------------------------------------
1 | var stuff = [1,2,3,4,5]
2 | for (var i = 0; i < stuff.length; i++) {
3 | console.log(stuff[i]);
4 | }
5 |
--------------------------------------------------------------------------------
/packages/export/examples/site/scripts/log.babel.js:
--------------------------------------------------------------------------------
1 | const arr = [1,2,3];
2 | const foo = (...args) => console.log(...args)
3 | foo(...arr)
4 |
--------------------------------------------------------------------------------
/packages/export/examples/site/scripts/main.coffee:
--------------------------------------------------------------------------------
1 | console.log "Hello from Coffeescript!"
2 |
--------------------------------------------------------------------------------
/packages/export/examples/site/styles/main.styl:
--------------------------------------------------------------------------------
1 | body
2 | background: hotpink
3 |
4 | @import '../dont-copy/_inner'
5 |
--------------------------------------------------------------------------------
/packages/export/examples/site/styles/typography.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | font-family: arial;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/export/lib/preflight.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('upath');
4 | const checkDir = require('checkdir');
5 |
6 | module.exports = function preflight(_inputDir, _outputDir) {
7 | const inputDir = path.normalize(_inputDir);
8 | const checks = [
9 | checkDir(inputDir),
10 | checkDir(path.join(inputDir, 'node_modules')),
11 | checkDir(path.join(inputDir, 'bower_components'))
12 | ];
13 | if (_outputDir) {
14 | const outputDir = path.normalize(_outputDir);
15 | checks.push(checkDir(outputDir));
16 | }
17 | return Promise.all(checks).then(info => {
18 | const mainDir = info[0];
19 | const nodeModules = info[1];
20 | const bowerComponents = info[2];
21 | const outputDir = info[3] || null;
22 | return Object.assign(
23 | {},
24 | mainDir,
25 | { nodeModules: nodeModules.exists },
26 | { bowerComponents: bowerComponents.exists },
27 | { outputDir }
28 | );
29 | });
30 | };
31 |
--------------------------------------------------------------------------------
/packages/init/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | coverage
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/packages/init/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | .gitignore
3 | README.md
4 | LICENSE
5 | coverage
6 | npm-debug.log
7 |
--------------------------------------------------------------------------------
/packages/init/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | sudo: false
3 | node_js:
4 | - "4"
5 | - "node"
6 | script: "npm run travis"
7 |
--------------------------------------------------------------------------------
/packages/init/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Dave Jeffery
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/packages/init/templates/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["env"]
3 | }
4 |
--------------------------------------------------------------------------------
/packages/init/templates/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{if normalizeCss}}
9 | {{/if}}
10 |
11 |
12 |
13 | Hello world!
14 | We are ready to go.
15 | {{if babelPolyfill}}
16 | {{/if}}
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/packages/init/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{if normalizeCss}}
9 | {{/if}}
10 |
11 |
12 |
13 | Hello world!
14 | We are ready to go.
15 | {{if babelPolyfill}}
16 | {{/if}}
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/packages/init/templates/index.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | meta(charset='utf-8')
5 | title
6 | meta(name='description', content='')
7 | meta(name='viewport', content='width=device-width')
8 | {{if normalizeCss}}
9 | link(rel='stylesheet', href='{{styles.folder}}/normalize.css'){{/if}}
10 | link(rel='stylesheet', href='{{styles.folder}}/{{styles.file}}.css')
11 | body
12 | h1 Hello world!
13 | p We are ready to go.
14 | {{if babelPolyfill}}
15 | script(src='{{scripts.folder}}/polyfill.js'){{/if}}
16 | script(src='{{scripts.folder}}/{{scripts.file}}.js')
17 |
--------------------------------------------------------------------------------
/packages/init/templates/index.pug:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | meta(charset='utf-8')
5 | title
6 | meta(name='description', content='')
7 | meta(name='viewport', content='width=device-width')
8 | {{if normalizeCss}}
9 | link(rel='stylesheet', href='{{styles.folder}}/normalize.css'){{/if}}
10 | link(rel='stylesheet', href='{{styles.folder}}/{{styles.file}}.css')
11 | body
12 | h1 Hello world!
13 | p We are ready to go.
14 | {{if babelPolyfill}}
15 | script(src='{{scripts.folder}}/polyfill.js'){{/if}}
16 | script(src='{{scripts.folder}}/{{scripts.file}}.js')
17 |
--------------------------------------------------------------------------------
/packages/init/templates/scripts/main.babel.js:
--------------------------------------------------------------------------------
1 | const helloWorld = () => console.log('Hello World');
2 |
3 | helloWorld();
4 |
--------------------------------------------------------------------------------
/packages/init/templates/scripts/main.buble.js:
--------------------------------------------------------------------------------
1 | const helloWorld = () => console.log('Hello World');
2 |
3 | helloWorld();
4 |
--------------------------------------------------------------------------------
/packages/init/templates/scripts/main.coffee:
--------------------------------------------------------------------------------
1 | helloWorld = -> console.log('Hello World')
2 |
3 | helloWorld()
4 |
--------------------------------------------------------------------------------
/packages/init/templates/scripts/main.djs:
--------------------------------------------------------------------------------
1 | such helloWorld
2 | plz console.loge with 'Hello World'
3 | wow
4 |
5 | plz helloWorld
6 |
--------------------------------------------------------------------------------
/packages/init/templates/scripts/main.js:
--------------------------------------------------------------------------------
1 | var helloWorld = function() {
2 | console.log('Hello World');
3 | };
4 |
5 | helloWorld();
6 |
--------------------------------------------------------------------------------
/packages/init/templates/scripts/main.ls:
--------------------------------------------------------------------------------
1 | helloWorld = -> console.log('Hello World')
2 |
3 | helloWorld()
4 |
--------------------------------------------------------------------------------
/packages/init/templates/scripts/main.ts:
--------------------------------------------------------------------------------
1 | var helloWorld = function() : void {
2 | console.log('Hello World');
3 | }
4 |
5 | helloWorld();
6 |
--------------------------------------------------------------------------------
/packages/init/templates/styles/main.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | color: hotpink;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/init/templates/styles/main.less:
--------------------------------------------------------------------------------
1 | @heading-color: hotpink;
2 |
3 | h1 {
4 | color: @heading-color;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/init/templates/styles/main.sass:
--------------------------------------------------------------------------------
1 | $heading-color: hotpink
2 |
3 | h1
4 | color: $heading-color
5 |
--------------------------------------------------------------------------------
/packages/init/templates/styles/main.scss:
--------------------------------------------------------------------------------
1 | $heading-color: hotpink;
2 |
3 | h1 {
4 | color: $heading-color;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/init/templates/styles/main.styl:
--------------------------------------------------------------------------------
1 | heading-color = hotpink
2 |
3 | h1
4 | color heading-color
5 |
--------------------------------------------------------------------------------
/packages/init/test/helpers.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var fs = require('fs');
4 | var fsPath = require('path');
5 | var Q = require('q');
6 |
7 | var walk = function (dir) {
8 | return Q.ninvoke(fs, 'readdir', dir).then(function (files) {
9 | return Q.all(files.map(function (file) {
10 | file = fsPath.join(dir, file);
11 | return Q.ninvoke(fs, 'lstat', file).then(function (stat) {
12 | if (stat.isDirectory()) {
13 | return walk(file);
14 | } else {
15 | return [file];
16 | }
17 | });
18 | }));
19 | }).then(function (files) {
20 | return files.reduce(function (pre, cur) {
21 | return pre.concat(cur);
22 | });
23 | });
24 | };
25 |
26 | module.exports = {};
27 | module.exports.walk = walk;
28 |
--------------------------------------------------------------------------------
/packages/instant/.eslintignore:
--------------------------------------------------------------------------------
1 | client/bundle.js
2 |
--------------------------------------------------------------------------------
/packages/instant/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 | client/bundle.js
4 |
--------------------------------------------------------------------------------
/packages/instant/.npmignore:
--------------------------------------------------------------------------------
1 | test
--------------------------------------------------------------------------------
/packages/instant/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.10
4 |
--------------------------------------------------------------------------------
/packages/instant/client/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "extends": "eslint-config-es5",
4 | "env": {
5 | "browser": true
6 | },
7 | "plugins": ["compat"],
8 | "rules": {
9 | "compat/compat": "error"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/instant/client/add.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Replace `el` with a new tag using the given URL.
4 | // We have to create a new element instead of simply updating the `href`
5 | // attribute of the existing link, since some browsers otherwise would not
6 | // immediately repaint the page.
7 |
8 | module.exports = function add(el, href) {
9 | var p = el.parentNode;
10 | var ref = el.nextSibling;
11 | var s = document.createElement('link');
12 | s.rel = 'stylesheet';
13 | s.type = 'text/css';
14 | s.href = href;
15 | p.insertBefore(s, ref);
16 | return s;
17 | };
18 |
--------------------------------------------------------------------------------
/packages/instant/client/connectionLost.js:
--------------------------------------------------------------------------------
1 | module.exports = function connectionLost() {
2 | if (!!document.getElementById('pingyConnectionLost')) return;
3 |
4 | var style =
5 | 'position: fixed; top: 0px; left: 0px; background: rgba(220, 220, 220, 0.9);';
6 | style +=
7 | 'width: 100%; padding: 20px; text-align: center; border-bottom: 1px #555 solid;';
8 | style += 'z-index: 9999; text-shadow: 1px 1px 0px white;';
9 |
10 | var innerHtml =
11 | "Pingy has lost contact with this page. Live Reload won't work. ";
12 | innerHtml += 'Click this banner to refresh the page.';
13 |
14 | var div = document.createElement('div');
15 | div.id = 'pingyConnectionLost';
16 | div.innerHTML = innerHtml;
17 | div.style = style;
18 | div.addEventListener('click', function divClick() {
19 | location.reload();
20 | });
21 |
22 | document.body.appendChild(div);
23 | };
24 |
--------------------------------------------------------------------------------
/packages/instant/client/find.js:
--------------------------------------------------------------------------------
1 | var parseUrl = require('./url');
2 |
3 | // Find the first element with the given tag-name whoes property `prop`
4 | // matches the specified url.
5 |
6 | exports.byURL = function byURL(name, prop, url) {
7 | var el = document.getElementsByTagName(name);
8 | for (var i = 0; i < el.length; i++) {
9 | if (parseUrl(el[i][prop]).pathname === url.pathname) return el[i];
10 | }
11 | return null;
12 | };
13 |
14 | exports.allByURLExceptMe = function allByURLExceptMe(name, prop, url, meEl) {
15 | var el = document.getElementsByTagName(name);
16 | var els = [];
17 | for (var i = 0; i < el.length; i++) {
18 | if (parseUrl(el[i][prop]).pathname === url.pathname && el[i] !== meEl) {
19 | els.push(el[i]);
20 | }
21 | }
22 | return els;
23 | };
24 |
25 | exports.bySelector = function bySelector(sel) {
26 | return document.querySelector && document.querySelector(sel);
27 | };
28 |
29 | exports.byClass = function byClass(cls) {
30 | return exports.bySelector('.' + cls);
31 | };
32 |
--------------------------------------------------------------------------------
/packages/instant/client/url.js:
--------------------------------------------------------------------------------
1 | module.exports = function urlFn(s) {
2 | var o = new Option();
3 | o.innerHTML = '';
4 | o.firstChild.href = s;
5 | o.innerHTML += '';
6 | return o.firstChild;
7 | };
8 |
9 | module.exports.getExt = function getExt(url) {
10 | if (typeof url !== 'string') return null;
11 | return (url = url.substr(1 + url.lastIndexOf('/')).split('?')[0])
12 | .split('#')[0]
13 | .substr(url.lastIndexOf('.'));
14 | };
15 |
--------------------------------------------------------------------------------
/packages/instant/lib/inject.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const tamper = require('tamper');
4 |
5 | /**
6 | * Returns a middleware that injects a script tag with the given URL before
7 | * the closing body tag of text/html responses.
8 | */
9 | module.exports = function inject(script) {
10 | return tamper((req, res) => {
11 | const url = req.realUrl || req.url;
12 | const mime = res.getHeader('Content-Type');
13 |
14 | if (/text\/html/.test(mime) && !/instant\/events/.test(url)) {
15 | return function injected(body) {
16 | if (body.search(/<\/body>/i) !== -1) {
17 | return body.replace(
18 | /<\/body>/i,
19 | ` \n