├── perf
├── fixtures
│ ├── child.js
│ ├── parent.js
│ ├── babel.js
│ └── buddy.json
├── config.js
├── build.js
└── bench.js
├── test
└── fixtures
│ ├── file
│ ├── src
│ │ ├── b.js
│ │ ├── c.js
│ │ ├── d.js
│ │ ├── foo.js
│ │ ├── foo.css
│ │ ├── foo.json
│ │ ├── index.js
│ │ ├── bat.js
│ │ ├── main-bad.js
│ │ ├── main.css
│ │ ├── main.js
│ │ ├── bar.js
│ │ ├── a.js
│ │ ├── main-bad.css
│ │ ├── main.html
│ │ ├── umd.js
│ │ ├── closure.js
│ │ ├── d3.js
│ │ ├── webpack.js
│ │ ├── module.js
│ │ ├── browserify2.js
│ │ ├── browserify1.js
│ │ ├── namespace.js
│ │ └── wrapped.js
│ └── node_modules
│ │ ├── Boo
│ │ ├── Boo.js
│ │ └── package.json
│ │ ├── bat
│ │ ├── bat.js
│ │ ├── boop.js
│ │ └── package.json
│ │ ├── bar
│ │ ├── bar.js
│ │ └── package.json
│ │ └── foo
│ │ └── index.js
│ ├── buddy
│ ├── grep
│ │ ├── bar.js
│ │ ├── foo.js
│ │ └── foo.css
│ ├── init
│ │ └── build
│ │ │ ├── a.js
│ │ │ └── lib
│ │ │ └── b.js
│ ├── build
│ │ ├── f.js
│ │ ├── css-directory
│ │ │ ├── bar.styl
│ │ │ └── foo.styl
│ │ ├── d.js
│ │ ├── i.js
│ │ ├── j.js
│ │ ├── js-directory
│ │ │ ├── flat
│ │ │ │ ├── bar.js
│ │ │ │ ├── boo.js
│ │ │ │ └── foo.js
│ │ │ ├── nested
│ │ │ │ ├── bar.js
│ │ │ │ ├── boo
│ │ │ │ │ └── index.js
│ │ │ │ └── foo.js
│ │ │ └── dependant
│ │ │ │ ├── bar.js
│ │ │ │ ├── boo
│ │ │ │ └── index.js
│ │ │ │ └── foo.js
│ │ ├── k.js
│ │ ├── n.js
│ │ ├── three.styl
│ │ ├── _export.js
│ │ ├── e.js
│ │ ├── foo.js
│ │ ├── beep.js
│ │ ├── c.js
│ │ ├── circular.js
│ │ ├── native.js
│ │ ├── babel.js
│ │ ├── bing.js
│ │ ├── circular-complex.js
│ │ ├── foo.json
│ │ ├── includes
│ │ │ ├── widget.dust
│ │ │ ├── header.dust
│ │ │ └── footer.dust
│ │ ├── packages
│ │ │ ├── bar.js
│ │ │ ├── bat.js
│ │ │ ├── bong.js
│ │ │ ├── zing.js
│ │ │ ├── zong.js
│ │ │ ├── zang.js
│ │ │ ├── node_modules
│ │ │ │ ├── bat
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── boo
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── boo.js
│ │ │ │ │ ├── node_modules
│ │ │ │ │ │ └── json
│ │ │ │ │ │ │ ├── index.json
│ │ │ │ │ │ │ └── package.json
│ │ │ │ │ └── package.json
│ │ │ │ ├── react
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── foo.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── boop
│ │ │ │ │ ├── development.js
│ │ │ │ │ ├── production.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── index.js
│ │ │ │ ├── foo
│ │ │ │ │ ├── node_modules
│ │ │ │ │ │ └── bar
│ │ │ │ │ │ │ ├── bar.js
│ │ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── foo.js
│ │ │ │ │ └── package.json
│ │ │ │ └── bar
│ │ │ │ │ ├── dist
│ │ │ │ │ └── commonjs
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ └── bar.js
│ │ │ │ │ │ └── main.js
│ │ │ │ │ └── package.json
│ │ │ ├── boo.js
│ │ │ ├── zee.js
│ │ │ ├── comp.jsx
│ │ │ └── package.json
│ │ ├── c.css
│ │ ├── mixed-directory
│ │ │ ├── bar.js
│ │ │ ├── bar.styl
│ │ │ ├── foo.styl
│ │ │ └── foo.js
│ │ ├── env-2.js
│ │ ├── async.js
│ │ ├── one.styl
│ │ ├── two.styl
│ │ ├── b.css
│ │ ├── comma.js
│ │ ├── bar.js
│ │ ├── d.css
│ │ ├── h.js
│ │ ├── o.js
│ │ ├── p.js
│ │ ├── buddy-single-file.js
│ │ ├── dynamic.js
│ │ ├── node2.js
│ │ ├── a.css
│ │ ├── a.js
│ │ ├── b.js
│ │ ├── l.js
│ │ ├── g.js
│ │ ├── image-directory
│ │ │ ├── b.jpg
│ │ │ └── a.svg
│ │ ├── buddy-single-file.json
│ │ ├── q.js
│ │ ├── order.css
│ │ ├── m.js
│ │ ├── node.js
│ │ ├── zee.js
│ │ ├── iife.js
│ │ ├── b.html
│ │ ├── c.html
│ │ ├── a.html
│ │ ├── comment.js
│ │ ├── d.html
│ │ ├── es6.js
│ │ ├── closure.js
│ │ ├── lodash.js
│ │ ├── browserify.js
│ │ ├── built.js
│ │ └── webpack.js
│ ├── script
│ │ ├── foo.js
│ │ └── mod.js
│ └── watch
│ │ ├── foo.js
│ │ ├── bar.js
│ │ └── buddy-watch-file.js
│ ├── config
│ ├── src
│ │ ├── foo.bar
│ │ ├── main.js
│ │ └── module.js
│ ├── hooks
│ │ └── before.js
│ ├── src-nested
│ │ ├── main.js
│ │ ├── module.js
│ │ └── nested
│ │ │ ├── sub.js
│ │ │ └── sub2.js
│ ├── buddy.js
│ ├── buddy_custom_name.js
│ ├── nested
│ │ ├── buddy.js
│ │ └── buddy_custom_name.js
│ ├── json
│ │ └── buddy.json
│ ├── named
│ │ └── buddy.js
│ ├── named-env
│ │ └── buddy.js
│ └── pkgjson
│ │ └── package.json
│ ├── resolver
│ ├── bar.coffee
│ ├── bar.css
│ ├── baz.js
│ ├── foo.bar.js
│ ├── foo.css
│ ├── foo.js
│ ├── index.js
│ ├── src
│ │ ├── bat.js
│ │ ├── index.js
│ │ └── package
│ │ │ ├── bar.css
│ │ │ ├── foo.css
│ │ │ └── foo.js
│ ├── foo-v2.0.js
│ ├── nested
│ │ ├── bar.js
│ │ ├── foo.js
│ │ └── node_modules
│ │ │ ├── bat.js
│ │ │ └── boop
│ │ │ └── boop.js
│ ├── src-css
│ │ ├── bat.css
│ │ └── baz
│ │ │ └── index.css
│ ├── node_modules
│ │ ├── bar
│ │ │ ├── index.js
│ │ │ └── node_modules
│ │ │ │ ├── bat
│ │ │ │ └── index.js
│ │ │ │ └── boo
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ ├── boo
│ │ │ ├── boo.js
│ │ │ ├── foo.js
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── foo
│ │ │ ├── index.js
│ │ │ ├── lib
│ │ │ │ ├── bar.js
│ │ │ │ ├── bat.js
│ │ │ │ └── caseSensitive.js
│ │ │ ├── node_modules
│ │ │ │ └── bar
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ └── package.json
│ │ ├── browser2
│ │ │ ├── bar.js
│ │ │ ├── bing.js
│ │ │ ├── foo.js
│ │ │ ├── server
│ │ │ │ └── foo.js
│ │ │ ├── browser
│ │ │ │ └── foo.js
│ │ │ ├── node_modules
│ │ │ │ ├── bar
│ │ │ │ │ ├── lib
│ │ │ │ │ │ ├── bar.js
│ │ │ │ │ │ └── bat.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── bat
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── bing
│ │ │ │ │ ├── bing.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ └── foo
│ │ │ │ │ ├── lib
│ │ │ │ │ ├── bar.js
│ │ │ │ │ └── bat.js
│ │ │ │ │ └── package.json
│ │ │ └── package.json
│ │ ├── browser
│ │ │ ├── browser
│ │ │ │ └── foo.js
│ │ │ └── package.json
│ │ ├── foo-dir
│ │ │ ├── lib
│ │ │ │ └── index.js
│ │ │ └── package.json
│ │ ├── @popeindustries
│ │ │ └── test
│ │ │ │ ├── lib
│ │ │ │ └── bar.js
│ │ │ │ ├── test.js
│ │ │ │ ├── node_modules
│ │ │ │ └── foo
│ │ │ │ │ ├── lib
│ │ │ │ │ ├── bar.js
│ │ │ │ │ └── bat.js
│ │ │ │ │ └── package.json
│ │ │ │ └── package.json
│ │ ├── baz
│ │ │ └── node_modules
│ │ │ │ ├── foo
│ │ │ │ ├── lib
│ │ │ │ │ ├── bar.js
│ │ │ │ │ └── bat.js
│ │ │ │ └── package.json
│ │ │ │ └── bar
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ └── boom
│ │ │ ├── index.js
│ │ │ └── package.json
│ └── package.json
│ ├── utils
│ ├── unique
│ │ ├── foo.js
│ │ ├── foo-0f7807e7171c078a8c5bfb565e35ef88.js
│ │ └── foo-bar-0f7807e7171c078a8c5bfb565e35ef88.js
│ └── foo.js
│ └── build
│ ├── src
│ ├── css
│ │ ├── bar.css
│ │ └── foo.css
│ └── js
│ │ ├── bat.js
│ │ ├── baz.js
│ │ ├── foo.js
│ │ └── bar.js
│ └── js
│ └── bat.js
├── packages
├── buddy-cli
│ ├── test
│ │ └── fixtures
│ │ │ ├── project
│ │ │ ├── src
│ │ │ │ └── index.js
│ │ │ └── buddy
│ │ │ │ ├── package.json
│ │ │ │ └── index.js
│ │ │ └── buddy.js
│ ├── bin
│ │ └── buddy
│ ├── .npmignore
│ ├── package.json
│ ├── LICENSE
│ ├── lib
│ │ └── find.js
│ └── README.md
├── buddy-server
│ ├── test
│ │ └── fixtures
│ │ │ ├── www
│ │ │ ├── script.js
│ │ │ ├── test.json
│ │ │ ├── style.css
│ │ │ ├── nested
│ │ │ │ └── style.css
│ │ │ ├── font.woff
│ │ │ └── index.html
│ │ │ └── assets
│ │ │ └── index.css
│ ├── .npmignore
│ ├── index.js
│ ├── package.json
│ ├── LICENSE
│ ├── lib
│ │ └── reloadconnection.js
│ └── README.md
├── buddy-plugin-nunjucks
│ ├── test
│ │ └── fixtures
│ │ │ ├── foo.js
│ │ │ ├── complex.json
│ │ │ ├── includes.json
│ │ │ ├── sidecar.json
│ │ │ ├── includes-inline.json
│ │ │ ├── inline-dynamic.json
│ │ │ ├── includes
│ │ │ ├── header.nunjs
│ │ │ ├── foo.css
│ │ │ ├── macro.nunjs
│ │ │ └── header-inline.nunjs
│ │ │ ├── bar.js
│ │ │ ├── includes-inline.nunjs
│ │ │ ├── sidecar.nunjs
│ │ │ ├── simple.nunjs
│ │ │ ├── includes.nunjs
│ │ │ ├── inline.nunjs
│ │ │ ├── inline-env.nunjs
│ │ │ ├── inline-compress.nunjs
│ │ │ ├── inline-dynamic.nunjs
│ │ │ ├── complex.nunjs
│ │ │ ├── foo1.svg
│ │ │ └── foo2.svg
│ ├── .npmignore
│ ├── README.md
│ ├── package.json
│ └── LICENSE
├── buddy-plugin-coffeescript
│ ├── test
│ │ ├── fixtures
│ │ │ ├── foo.coffee
│ │ │ └── foo-bad.coffee
│ │ └── test.js
│ ├── .npmignore
│ ├── README.md
│ ├── yarn.lock
│ ├── package.json
│ ├── LICENSE
│ └── index.js
├── buddy-plugin-dust
│ ├── .npmignore
│ ├── test
│ │ ├── fixtures
│ │ │ ├── include
│ │ │ │ └── include.dust
│ │ │ ├── foo.json
│ │ │ ├── foo-include.json
│ │ │ ├── foo.dust
│ │ │ └── foo-include.dust
│ │ └── test.js
│ ├── README.md
│ ├── package.json
│ └── LICENSE
├── buddy-plugin-less
│ ├── .npmignore
│ ├── test
│ │ ├── fixtures
│ │ │ ├── foo-bad.less
│ │ │ ├── compiled
│ │ │ │ └── foo.css
│ │ │ └── foo.less
│ │ └── test.js
│ ├── README.md
│ ├── package.json
│ ├── LICENSE
│ └── index.js
├── buddy-plugin-stylus
│ ├── .npmignore
│ ├── test
│ │ ├── fixtures
│ │ │ ├── foo-bad.styl
│ │ │ ├── compiled
│ │ │ │ └── foo.css
│ │ │ └── foo.styl
│ │ └── test.js
│ ├── README.md
│ ├── package.json
│ └── LICENSE
├── buddy-plugin-handlebars
│ ├── .npmignore
│ ├── test
│ │ ├── fixtures
│ │ │ ├── bad.handlebars
│ │ │ ├── foo.json
│ │ │ └── foo.handlebars
│ │ └── test.js
│ ├── README.md
│ ├── package.json
│ └── LICENSE
├── buddy-plugin-imagemin
│ ├── .npmignore
│ ├── test
│ │ ├── fixtures
│ │ │ ├── a.gif
│ │ │ ├── a.jpg
│ │ │ ├── a.png
│ │ │ └── a.svg
│ │ └── test.js
│ ├── README.md
│ ├── package.json
│ ├── LICENSE
│ └── index.js
└── buddy-plugin-typescript
│ ├── .npmignore
│ ├── test
│ ├── fixtures
│ │ ├── a.ts
│ │ └── compiled
│ │ │ └── a.js
│ └── test.js
│ ├── README.md
│ ├── yarn.lock
│ ├── package.json
│ ├── LICENSE
│ └── index.js
├── bin
├── buddy
├── packages
└── example
├── examples
├── 02-css-dependencies
│ ├── dep.css
│ ├── buddy.js
│ ├── index.css
│ └── tips.txt
├── 06-language-plugins
│ ├── index.json
│ ├── buddy.js
│ ├── index.nunjs
│ ├── index.less
│ └── tips.txt
├── 03-html-dependencies
│ ├── dep.css
│ ├── buddy.js
│ ├── index.html
│ └── tips.txt
├── 04-batch-builds
│ ├── src
│ │ ├── dep.css
│ │ ├── dep.js
│ │ ├── index.css
│ │ └── index.js
│ ├── buddy.js
│ └── tips.txt
├── 01-js-dependencies
│ ├── dep.js
│ ├── buddy.js
│ ├── index.js
│ └── tips.txt
├── 05-unbundled-batch-builds
│ ├── src
│ │ ├── dep.css
│ │ ├── dep.js
│ │ ├── index.css
│ │ └── index.js
│ ├── buddy.js
│ └── tips.txt
├── 07-versioning
│ ├── buddy.js
│ ├── index.js
│ └── tips.txt
├── 08-js-child-bundles
│ ├── child.js
│ ├── index.js
│ ├── buddy.js
│ └── tips.txt
├── 09-js-child-bundles-with-buddyImport
│ ├── child.js
│ ├── index.js
│ ├── buddy.js
│ └── tips.txt
├── 10-environment-variables
│ ├── one.js
│ ├── two.html
│ ├── buddy.js
│ └── tips.txt
└── README.md
├── lib
├── utils
│ ├── nativeModules.js
│ ├── index.js
│ ├── callable.js
│ ├── tree.js
│ ├── env.js
│ ├── stopwatch.js
│ └── cnsl.js
├── resolver
│ ├── index.js
│ ├── identify.js
│ ├── config.js
│ └── alias.js
├── settings.js
├── plugins
│ ├── js
│ │ ├── transpile.js
│ │ ├── flattenUMD.js
│ │ ├── require.js
│ │ ├── parse.js
│ │ ├── inline.js
│ │ ├── replaceReferences.js
│ │ ├── replaceDynamicReferences.js
│ │ ├── rewriteDirnameFilename.js
│ │ ├── dynamic-import.js
│ │ ├── replaceEnvironment.js
│ │ └── sort.js
│ ├── flow
│ │ └── index.js
│ ├── css
│ │ ├── transpile.js
│ │ └── inline.js
│ ├── html
│ │ └── replaceEnvironment.js
│ ├── react
│ │ └── index.js
│ ├── json
│ │ └── index.js
│ ├── uglify
│ │ └── index.js
│ └── img
│ │ └── index.js
├── config
│ ├── serverParser.js
│ ├── dependencies.js
│ └── buddyPlugins.js
└── cache
│ └── FileCache.js
├── .gitignore
├── .npmignore
├── .travis.yml
└── LICENSE
/perf/fixtures/child.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/perf/fixtures/parent.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/file/src/b.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/file/src/c.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/file/src/d.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/grep/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/src/foo.bar:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/src/main.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/bar.coffee:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/bar.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/baz.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/foo.bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/foo.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/src/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/utils/unique/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/init/build/a.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/build/src/css/bar.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/hooks/before.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/src/module.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/foo-v2.0.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/nested/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/nested/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/src-css/bat.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/src/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/f.js:
--------------------------------------------------------------------------------
1 | var f = 'f';
--------------------------------------------------------------------------------
/test/fixtures/buddy/init/build/lib/b.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/src-nested/main.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/src-nested/module.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/Boo/Boo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/bat/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/bat/boop.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/src/package/bar.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/src/package/foo.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/src/package/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/css-directory/bar.styl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/css-directory/foo.styl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/grep/foo.js:
--------------------------------------------------------------------------------
1 | var foo = this;
--------------------------------------------------------------------------------
/test/fixtures/buddy/script/foo.js:
--------------------------------------------------------------------------------
1 | var foo = this;
--------------------------------------------------------------------------------
/test/fixtures/build/js/bat.js:
--------------------------------------------------------------------------------
1 | var bat = this;
--------------------------------------------------------------------------------
/test/fixtures/build/src/js/bat.js:
--------------------------------------------------------------------------------
1 | var bat = this;
--------------------------------------------------------------------------------
/test/fixtures/build/src/js/baz.js:
--------------------------------------------------------------------------------
1 | var baz = this;
--------------------------------------------------------------------------------
/test/fixtures/config/src-nested/nested/sub.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/src-nested/nested/sub2.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/bar/bar.js:
--------------------------------------------------------------------------------
1 | 'bar'
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/bar/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/boo/boo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/boo/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/src-css/baz/index.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/buddy-cli/test/fixtures/project/src/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/buddy-server/test/fixtures/www/script.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/perf/fixtures/babel.js:
--------------------------------------------------------------------------------
1 | var t = require('babel-types');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/d.js:
--------------------------------------------------------------------------------
1 | var e = require('./e');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/i.js:
--------------------------------------------------------------------------------
1 | var j = require('./j');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/j.js:
--------------------------------------------------------------------------------
1 | var k = require('./k');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/flat/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/flat/boo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/nested/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/k.js:
--------------------------------------------------------------------------------
1 | var i = require('./i');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/n.js:
--------------------------------------------------------------------------------
1 | module.exports = 'n';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/three.styl:
--------------------------------------------------------------------------------
1 | RED = '#ffffff'
--------------------------------------------------------------------------------
/test/fixtures/build/src/css/foo.css:
--------------------------------------------------------------------------------
1 | @import 'bar';
--------------------------------------------------------------------------------
/test/fixtures/file/src/foo.js:
--------------------------------------------------------------------------------
1 | module.exports = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/resolver/nested/node_modules/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/bing.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo/lib/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo/lib/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/_export.js:
--------------------------------------------------------------------------------
1 | exports.foo = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/e.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/foo.js:
--------------------------------------------------------------------------------
1 | module.exports = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/dependant/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/nested/boo/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/watch/foo.js:
--------------------------------------------------------------------------------
1 | module.exports = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/file/src/foo.css:
--------------------------------------------------------------------------------
1 | div {
2 | width: 50%;
3 | }
--------------------------------------------------------------------------------
/test/fixtures/file/src/foo.json:
--------------------------------------------------------------------------------
1 | {
2 | "foo": "bar"
3 | }
--------------------------------------------------------------------------------
/test/fixtures/file/src/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'index';
--------------------------------------------------------------------------------
/test/fixtures/resolver/nested/node_modules/boop/boop.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser/browser/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/server/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo-dir/lib/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/bin/buddy:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | require('buddy-cli');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/beep.js:
--------------------------------------------------------------------------------
1 | var what = require('what');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/c.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo');
2 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/circular.js:
--------------------------------------------------------------------------------
1 | var a = require('./a');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/dependant/boo/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/native.js:
--------------------------------------------------------------------------------
1 | var http = require('http');
--------------------------------------------------------------------------------
/test/fixtures/buddy/grep/foo.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: white;
3 | }
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/foo/index.js:
--------------------------------------------------------------------------------
1 | var foo = this;
--------------------------------------------------------------------------------
/test/fixtures/file/src/bat.js:
--------------------------------------------------------------------------------
1 | var runtime = process.env.RUNTIME;
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/browser/foo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo/lib/caseSensitive.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/02-css-dependencies/dep.css:
--------------------------------------------------------------------------------
1 | p {
2 | margin: 10px;
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/foo.js:
--------------------------------------------------------------------------------
1 | var foo = 'foo';
--------------------------------------------------------------------------------
/packages/buddy-server/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/babel.js:
--------------------------------------------------------------------------------
1 | var t = require('babel-types');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/bing.js:
--------------------------------------------------------------------------------
1 | var json = require('./foo.json');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/circular-complex.js:
--------------------------------------------------------------------------------
1 | var i = require('./i');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/foo.json:
--------------------------------------------------------------------------------
1 | {
2 | "content": "foo"
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/includes/widget.dust:
--------------------------------------------------------------------------------
1 |
{content}
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/bar.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/bat.js:
--------------------------------------------------------------------------------
1 | var foo = require('foo');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/bong.js:
--------------------------------------------------------------------------------
1 | var bat = require('bat');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/zing.js:
--------------------------------------------------------------------------------
1 | var boo = require('boo');
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/@popeindustries/test/lib/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/@popeindustries/test/test.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/bar/node_modules/bat/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/baz/node_modules/foo/lib/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/baz/node_modules/foo/lib/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/utils/unique/foo-0f7807e7171c078a8c5bfb565e35ef88.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/06-language-plugins/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Plugins"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-coffeescript/test/fixtures/foo.coffee:
--------------------------------------------------------------------------------
1 | foo = 'foo'
--------------------------------------------------------------------------------
/packages/buddy-plugin-dust/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-plugin-less/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-plugin-stylus/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/c.css:
--------------------------------------------------------------------------------
1 | :fullscreen a {
2 | display: flex;
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/mixed-directory/bar.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/mixed-directory/bar.styl:
--------------------------------------------------------------------------------
1 | h1
2 | font-size: 2em;
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/zong.js:
--------------------------------------------------------------------------------
1 | var foo = require('foo.js');
--------------------------------------------------------------------------------
/test/fixtures/file/src/main-bad.js:
--------------------------------------------------------------------------------
1 | var foo = 'foo';
2 | , bar = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/file/src/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: black;
3 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/boo/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/boom/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'boom';
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bar/lib/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bar/lib/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bat/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bing/bing.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bing/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/foo/lib/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/foo/lib/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/utils/unique/foo-bar-0f7807e7171c078a8c5bfb565e35ef88.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-coffeescript/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-plugin-dust/test/fixtures/include/include.dust:
--------------------------------------------------------------------------------
1 | hi
--------------------------------------------------------------------------------
/packages/buddy-plugin-handlebars/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-plugin-handlebars/test/fixtures/bad.handlebars:
--------------------------------------------------------------------------------
1 | Hell<<<----||||
--------------------------------------------------------------------------------
/packages/buddy-plugin-imagemin/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-plugin-typescript/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .DS_Store
3 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-server/test/fixtures/www/test.json:
--------------------------------------------------------------------------------
1 | {
2 | "test": "test"
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/env-2.js:
--------------------------------------------------------------------------------
1 | var hash = process.env.BUDDY_ENV_INPUT_HASH;
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/nested/foo.js:
--------------------------------------------------------------------------------
1 | module.exports = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/zang.js:
--------------------------------------------------------------------------------
1 | var boo = require('boo/boo.js');
--------------------------------------------------------------------------------
/test/fixtures/build/src/js/foo.js:
--------------------------------------------------------------------------------
1 | var bar = require('./bar')
2 | , foo = this;
--------------------------------------------------------------------------------
/packages/buddy-cli/bin/buddy:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | require('../index.js');
--------------------------------------------------------------------------------
/packages/buddy-plugin-coffeescript/test/fixtures/foo-bad.coffee:
--------------------------------------------------------------------------------
1 | foo = 'foo'
2 | if
--------------------------------------------------------------------------------
/packages/buddy-plugin-dust/test/fixtures/foo.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Title"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-less/test/fixtures/foo-bad.less:
--------------------------------------------------------------------------------
1 | .foo {
2 | background-color:
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/async.js:
--------------------------------------------------------------------------------
1 | async function foo() {
2 | await bar();
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/dependant/foo.js:
--------------------------------------------------------------------------------
1 | var boo = require('./boo');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/one.styl:
--------------------------------------------------------------------------------
1 | @import 'three'
2 |
3 | body
4 | colour: RED
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/bat/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bat';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/two.styl:
--------------------------------------------------------------------------------
1 | @import 'three'
2 |
3 | body
4 | colour: RED
--------------------------------------------------------------------------------
/test/fixtures/file/src/main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = 'main';
4 |
--------------------------------------------------------------------------------
/examples/03-html-dependencies/dep.css:
--------------------------------------------------------------------------------
1 | main {
2 | color: red;
3 | margin: 10px;
4 | }
--------------------------------------------------------------------------------
/examples/04-batch-builds/src/dep.css:
--------------------------------------------------------------------------------
1 | main {
2 | color: red;
3 | margin: 10px;
4 | }
--------------------------------------------------------------------------------
/packages/buddy-cli/.npmignore:
--------------------------------------------------------------------------------
1 | .git*
2 | test/
3 | .DS_Store
4 | README.md
5 | yarn.lock
--------------------------------------------------------------------------------
/packages/buddy-plugin-dust/test/fixtures/foo-include.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Title"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-handlebars/test/fixtures/foo.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Title"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/complex.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "foo"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "foo"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/sidecar.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "foo"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-stylus/test/fixtures/foo-bad.styl:
--------------------------------------------------------------------------------
1 | .foo {
2 | background-color:
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/b.css:
--------------------------------------------------------------------------------
1 | @import 'a.css';
2 |
3 | div {
4 | color: red;
5 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/comma.js:
--------------------------------------------------------------------------------
1 | function foo (a, b,) {
2 | console.log(a, b)
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/boo.js:
--------------------------------------------------------------------------------
1 | var bar = require('bar/dist/commonjs/lib/bar');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boo/index.js:
--------------------------------------------------------------------------------
1 | var json = require('json');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/react/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'react';
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/@popeindustries/test/node_modules/foo/lib/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/@popeindustries/test/node_modules/foo/lib/bat.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/bar/node_modules/boo/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/baz/node_modules/bar/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo/node_modules/bar/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/packages/buddy-cli/test/fixtures/project/buddy/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes-inline.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "foo"
3 | }
--------------------------------------------------------------------------------
/packages/buddy-server/test/fixtures/www/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: black;
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/bar.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo')
2 |
3 | module.exports = foo;
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/d.css:
--------------------------------------------------------------------------------
1 | .box {
2 | background: url("./css/../img/cat.jpg");
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/includes/header.dust:
--------------------------------------------------------------------------------
1 |
2 | Title
3 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/foo.js/index.js:
--------------------------------------------------------------------------------
1 | module.exports = 'foo.js';
--------------------------------------------------------------------------------
/test/fixtures/buddy/watch/bar.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo')
2 |
3 | module.exports = foo;
--------------------------------------------------------------------------------
/test/fixtures/file/src/bar.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo');
2 |
3 | module.exports = 'bar';
--------------------------------------------------------------------------------
/examples/01-js-dependencies/dep.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | ONE: 'one',
3 | TOW: 'two'
4 | };
--------------------------------------------------------------------------------
/examples/04-batch-builds/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'src',
3 | output: 'www'
4 | };
--------------------------------------------------------------------------------
/examples/04-batch-builds/src/dep.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | ONE: 'one',
3 | TOW: 'two'
4 | };
--------------------------------------------------------------------------------
/examples/05-unbundled-batch-builds/src/dep.css:
--------------------------------------------------------------------------------
1 | main {
2 | color: red;
3 | margin: 10px;
4 | }
--------------------------------------------------------------------------------
/packages/buddy-server/test/fixtures/assets/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: white;
3 | }
--------------------------------------------------------------------------------
/packages/buddy-server/test/fixtures/www/nested/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: black;
3 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/h.js:
--------------------------------------------------------------------------------
1 | const foo = require('./built.js');
2 |
3 | module.exports = 'h';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boo/boo.js:
--------------------------------------------------------------------------------
1 | var json = require('json/index.json');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boop/development.js:
--------------------------------------------------------------------------------
1 | module.exports = 'development';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boop/production.js:
--------------------------------------------------------------------------------
1 | module.exports = 'production';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/foo/node_modules/bar/bar.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/mixed-directory/foo.styl:
--------------------------------------------------------------------------------
1 | body
2 | font-size: 1em
3 |
4 | @import './bar'
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/bar/dist/commonjs/lib/bar.js:
--------------------------------------------------------------------------------
1 | module.exports = 'bar';
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/Boo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0",
3 | "main": "Boo.js"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0",
3 | "main": "bar.js"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/file/src/a.js:
--------------------------------------------------------------------------------
1 | if (process.env.RUNTIME == 'browser') {
2 | console.log('browser');
3 | }
--------------------------------------------------------------------------------
/examples/05-unbundled-batch-builds/src/dep.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | ONE: 'one',
3 | TOW: 'two'
4 | };
--------------------------------------------------------------------------------
/examples/06-language-plugins/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'index.*',
3 | output: 'www'
4 | };
--------------------------------------------------------------------------------
/packages/buddy-plugin-less/test/fixtures/compiled/foo.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: black;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-stylus/test/fixtures/compiled/foo.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #000;
3 | }
4 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/mixed-directory/foo.js:
--------------------------------------------------------------------------------
1 | var bar = require('./bar');
2 |
3 | module.exports = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/o.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo');
2 | var camelCase = require('lodash/camelCase');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/p.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo');
2 | var camelCase = require('lodash/camelCase');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/bar/dist/commonjs/main.js:
--------------------------------------------------------------------------------
1 | exports.bar = require('./lib/bar');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boo/node_modules/json/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "boo": "boo"
3 | }
--------------------------------------------------------------------------------
/test/fixtures/build/src/js/bar.js:
--------------------------------------------------------------------------------
1 | var bat = require('./bat')
2 | , baz = require('./baz')
3 | , bar = this;
--------------------------------------------------------------------------------
/test/fixtures/file/src/main-bad.css:
--------------------------------------------------------------------------------
1 | @import 'package/foo';
2 |
3 | body
4 | background-color: black;
5 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/boom/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "boom",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/inline-dynamic.json:
--------------------------------------------------------------------------------
1 | {
2 | "bar": "bang",
3 | "ids": [1, 2]
4 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/js-directory/flat/foo.js:
--------------------------------------------------------------------------------
1 | if (process.env.NODE_ENV == 'production') console.log('foo');
--------------------------------------------------------------------------------
/examples/01-js-dependencies/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'index.js',
3 | output: 'www/output.js'
4 | };
--------------------------------------------------------------------------------
/examples/02-css-dependencies/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'index.css',
3 | output: 'www/output.css'
4 | };
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes/header.nunjs:
--------------------------------------------------------------------------------
1 |
2 | {{title}}
3 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-typescript/test/fixtures/a.ts:
--------------------------------------------------------------------------------
1 | const nums = [1, 2, 3, 4];
2 | const fn = nums.map(n => n + 1);
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/buddy-single-file.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | input: 'foo.js',
3 | output: 'output'
4 | };
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/dynamic.js:
--------------------------------------------------------------------------------
1 | buddyImport('./foo')
2 | .then((foo) => {
3 | console.log(foo);
4 | });
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/includes/footer.dust:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boop/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "boop",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/foo/foo.js:
--------------------------------------------------------------------------------
1 | var bar = require('bar');
2 |
3 | module.exports = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/foo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "foo.js",
3 | "version": "0.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/watch/buddy-watch-file.js:
--------------------------------------------------------------------------------
1 | exports.build = [{
2 | input: 'bar.js',
3 | output: 'output'
4 | }];
--------------------------------------------------------------------------------
/test/fixtures/config/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = [
2 | {
3 | input: 'main.js',
4 | output: 'www'
5 | }
6 | ];
--------------------------------------------------------------------------------
/examples/03-html-dependencies/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'index.html',
3 | output: 'www/output.html'
4 | };
--------------------------------------------------------------------------------
/examples/04-batch-builds/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: #ccc;
3 | background-color: #fff
4 | }
5 |
6 | @import 'dep';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/node2.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const node = require(path.join(__dirname, 'node.js'));
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/foo.js/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo.js",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/react/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/zee.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const boop = require('boop');
4 |
5 | console.log(boop);
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/bar/node_modules/boo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "boo",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/baz/node_modules/bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bar",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo/node_modules/bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bar",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/examples/05-unbundled-batch-builds/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'src',
3 | output: 'www',
4 | bundle: false
5 | };
--------------------------------------------------------------------------------
/lib/utils/nativeModules.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = require('repl')._builtinLibs.concat('repl', 'module');
4 |
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/baz/node_modules/foo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "main": "lib/bat.js"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bat/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bat",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bing/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bing",
3 | "version": "1.0.0"
4 | }
--------------------------------------------------------------------------------
/examples/05-unbundled-batch-builds/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: #ccc;
3 | background-color: #fff
4 | }
5 |
6 | @import 'dep';
--------------------------------------------------------------------------------
/examples/07-versioning/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'index.js',
3 | output: 'www/output.js',
4 | version: 'es5'
5 | };
--------------------------------------------------------------------------------
/packages/buddy-plugin-stylus/test/fixtures/foo.styl:
--------------------------------------------------------------------------------
1 | body
2 | color: white
3 | font-size: 12px
4 | p
5 | font-size: 10px
6 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/a.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: white;
3 | font-size: 12px;
4 | }
5 | body p {
6 | font-size: 10px;
7 | }
8 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "dist/commonjs/main.js",
3 | "version": "0.0.0"
4 | }
--------------------------------------------------------------------------------
/test/fixtures/config/buddy_custom_name.js:
--------------------------------------------------------------------------------
1 | exports.build = [
2 | {
3 | input: 'main.js',
4 | output: 'www'
5 | }
6 | ];
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo-dir/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo-dir",
3 | "version": "1.0.0",
4 | "main": "lib"
5 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/foo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo",
3 | "version": "1.0.0",
4 | "main": "lib/bat.js"
5 | }
--------------------------------------------------------------------------------
/lib/resolver/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | exports.identify = require('./identify');
4 | exports.resolve = require('./resolve');
5 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/a.js:
--------------------------------------------------------------------------------
1 | module.exports = a;
2 |
3 | var b = require('./b');
4 |
5 | function a () {
6 | console.log('a');
7 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/b.js:
--------------------------------------------------------------------------------
1 | module.exports = b;
2 |
3 | var a = require('./a');
4 |
5 | function b () {
6 | console.log('b');
7 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/l.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo');
2 | var id = process.env['BUDDY_1_OUTPUT_HASH'];
3 |
4 | module.exports = 'l';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/foo/node_modules/bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "bar.js",
3 | "version": "0.0.0"
4 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/*
3 | packages/**/node_modules/*
4 | examples/**/www/*.js
5 | npm-debug.log*
6 | package-lock.json
7 |
--------------------------------------------------------------------------------
/examples/01-js-dependencies/index.js:
--------------------------------------------------------------------------------
1 | const dep = require('./dep');
2 | const arrify = require('arrify');
3 |
4 | const depArr = arrify(dep);
--------------------------------------------------------------------------------
/examples/04-batch-builds/src/index.js:
--------------------------------------------------------------------------------
1 | const dep = require('./dep');
2 | const arrify = require('arrify');
3 |
4 | const depArr = arrify(dep);
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/g.js:
--------------------------------------------------------------------------------
1 | var boop = this
2 | , isDev = process.env.NODE_ENV == 'development';
3 |
4 | console.log('is dev: ', isDev);
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "boo",
3 | "version": "1.0.0",
4 | "main": "index.js"
5 | }
--------------------------------------------------------------------------------
/test/fixtures/file/src/main.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/08-js-child-bundles/child.js:
--------------------------------------------------------------------------------
1 | const arrify = require('arrify');
2 |
3 | module.exports = function (item) {
4 | item = arrify(item);
5 | };
--------------------------------------------------------------------------------
/packages/buddy-plugin-typescript/test/fixtures/compiled/a.js:
--------------------------------------------------------------------------------
1 | var nums = [1, 2, 3, 4];
2 | var fn = nums.map(function (n) { return n + 1; });
3 |
--------------------------------------------------------------------------------
/test/fixtures/config/nested/buddy.js:
--------------------------------------------------------------------------------
1 | exports = {
2 | build: [
3 | {
4 | input: 'main.js',
5 | output: 'www'
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "project",
3 | "version": "1.0.0",
4 | "browser": {
5 | "index": "./foo.js"
6 | }
7 | }
--------------------------------------------------------------------------------
/examples/02-css-dependencies/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: #ccc;
3 | background-color: #fff
4 | }
5 |
6 | @import 'dep';
7 | @import 'mocha/mocha.css';
--------------------------------------------------------------------------------
/examples/05-unbundled-batch-builds/src/index.js:
--------------------------------------------------------------------------------
1 | const dep = require('./dep');
2 | const arrify = require('arrify');
3 |
4 | const depArr = arrify(dep);
--------------------------------------------------------------------------------
/examples/08-js-child-bundles/index.js:
--------------------------------------------------------------------------------
1 | const child = require('./child');
2 | const arrify = require('arrify');
3 |
4 | const childArr = arrify(child);
--------------------------------------------------------------------------------
/packages/buddy-cli/test/fixtures/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | targets: [
3 | {
4 | input: 'foo.js',
5 | output: 'output'
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/image-directory/b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/popeindustries/buddy/HEAD/test/fixtures/buddy/build/image-directory/b.jpg
--------------------------------------------------------------------------------
/packages/buddy-plugin-imagemin/test/fixtures/a.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/popeindustries/buddy/HEAD/packages/buddy-plugin-imagemin/test/fixtures/a.gif
--------------------------------------------------------------------------------
/packages/buddy-plugin-imagemin/test/fixtures/a.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/popeindustries/buddy/HEAD/packages/buddy-plugin-imagemin/test/fixtures/a.jpg
--------------------------------------------------------------------------------
/packages/buddy-plugin-imagemin/test/fixtures/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/popeindustries/buddy/HEAD/packages/buddy-plugin-imagemin/test/fixtures/a.png
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes/foo.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: white;
3 | font-size: 12px;
4 | }
5 | body p {
6 | font-size: 10px;
7 | }
--------------------------------------------------------------------------------
/packages/buddy-server/test/fixtures/www/font.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/popeindustries/buddy/HEAD/packages/buddy-server/test/fixtures/www/font.woff
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/buddy-single-file.json:
--------------------------------------------------------------------------------
1 | {
2 | "build": [
3 | {
4 | "input": "foo.js",
5 | "output": "output"
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/q.js:
--------------------------------------------------------------------------------
1 | var $export = require('./_export')
2 | // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
3 | $export($export.S, 'Object');
--------------------------------------------------------------------------------
/test/fixtures/file/node_modules/bat/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0",
3 | "main": "bat.js",
4 | "browser": {
5 | "./boop.js": false
6 | }
7 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/boo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "boo",
3 | "version": "1.0.0",
4 | "browser": {
5 | "./boo.js": "./foo"
6 | }
7 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/foo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo",
3 | "version": "2.0.0",
4 | "main": "./lib/bat.js"
5 | }
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .git*
2 | test/
3 | docs/
4 | examples/
5 | packages/
6 | .DS_Store
7 | .travis.yml
8 | CHANGELOG.md
9 | README.md
10 | yarn.lock
11 | perf/
--------------------------------------------------------------------------------
/examples/06-language-plugins/index.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{title}}
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/bar.js:
--------------------------------------------------------------------------------
1 | var boop = this
2 | , isDev = process.env.NODE_ENV == 'development';
3 |
4 | console.log('is dev: ', isDev);
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes/macro.nunjs:
--------------------------------------------------------------------------------
1 | {% macro label(text) %}
2 |
3 |
4 |
5 | {% endmacro %}
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/order.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --height: 10px;
3 | }
4 |
5 | .test {
6 | height: calc(var(--height) / 4);
7 | width: calc(10px / 4);
8 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boo/node_modules/json/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "json",
3 | "version": "1.0.0",
4 | "main": "index.json"
5 | }
--------------------------------------------------------------------------------
/test/fixtures/config/nested/buddy_custom_name.js:
--------------------------------------------------------------------------------
1 | exports = {
2 | build: [
3 | {
4 | input: 'main.js',
5 | output: 'www'
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/examples/09-js-child-bundles-with-buddyImport/child.js:
--------------------------------------------------------------------------------
1 | const arrify = require('arrify');
2 |
3 | module.exports = function (item) {
4 | item = arrify(item);
5 | };
--------------------------------------------------------------------------------
/packages/buddy-server/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | exports.ServerFactory = require('./lib/server');
4 | exports.ReloadServerFactory = require('./lib/reloadserver');
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/m.js:
--------------------------------------------------------------------------------
1 | var foo = require('./foo');
2 | var n = require('./n');
3 | var id = process.env['BUDDY_1_OUTPUT_HASH'];
4 |
5 | module.exports = 'm';
--------------------------------------------------------------------------------
/test/fixtures/config/json/buddy.json:
--------------------------------------------------------------------------------
1 | {
2 | "build": [
3 | {
4 | "input": ["src/main.js", "src/main.css"],
5 | "output": "www"
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/@popeindustries/test/node_modules/foo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foo",
3 | "version": "2.0.0",
4 | "main": "./lib/bat.js"
5 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-dust/test/fixtures/foo.dust:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {title}
5 | Test paragraph
6 |
7 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes-inline.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% include "./includes/header-inline.nunjs" %}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes/header-inline.nunjs:
--------------------------------------------------------------------------------
1 |
2 | {{title}}
3 |
4 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/sidecar.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{title}}
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/simple.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Title
5 | Test paragraph
6 |
7 |
--------------------------------------------------------------------------------
/examples/10-environment-variables/one.js:
--------------------------------------------------------------------------------
1 | if (process.env.RUNTIME == 'browser') {
2 | console.log('this is browser one!');
3 | } else {
4 | console.log('this is server one!');
5 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-handlebars/test/fixtures/foo.handlebars:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{title}}
5 | Test paragraph
6 |
7 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/node.js:
--------------------------------------------------------------------------------
1 | var http = require('./native');
2 | var runtime = process.env.RUNTIME;
3 | var prod = process.env.NODE_ENV;
4 |
5 | module.exports = function () {};
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/zee.js:
--------------------------------------------------------------------------------
1 | if (process.env.RUNTIME != 'browser') {
2 | var foo = require('./foo.js');
3 | var c = require('./c.js');
4 | }
5 | var bing = require('./bar.js');
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "browser",
3 | "version": "1.0.0",
4 | "main": "./server/foo.js",
5 | "browser": "./browser/foo.js"
6 | }
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/iife.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | if (true) {
4 | (function() {
5 | var foo = {
6 | foo: 'foo'
7 | };
8 | module.exports = foo;
9 | })();
10 | }
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/node_modules/bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bar",
3 | "version": "2.0.0",
4 | "main": "./lib/bat.js",
5 | "browser": "./lib/bar.js"
6 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-less/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-less
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for less source transforms (via [Less](https://github.com/less/less.js)).
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/includes.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% include "./includes/header.nunjs" %}
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/script/mod.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs')
2 | , path = require('path')
3 |
4 | , filepath = process.argv[2];
5 |
6 | fs.writeFileSync(path.resolve(filepath), 'oops!', 'utf8');
--------------------------------------------------------------------------------
/examples/09-js-child-bundles-with-buddyImport/index.js:
--------------------------------------------------------------------------------
1 | const arrify = require('arrify');
2 |
3 | buddyImport('./child')
4 | .then((child) => {
5 | const childArr = arrify(child);
6 | });
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/b.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/bat/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bat",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "browser": {
6 | "./index.js": false
7 | }
8 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-dust/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-dust
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for dust source transforms (via [dust-linkedin](https://github.com/linkedin/dustjs)).
--------------------------------------------------------------------------------
/packages/buddy-plugin-stylus/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-stylus
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for stylus source transforms (via [Stylus](https://github.com/stylus/stylus)).
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/a.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/comp.jsx:
--------------------------------------------------------------------------------
1 | const bar = require('./bar');
2 |
3 |
4 | Hello, world!
5 |
6 |
--------------------------------------------------------------------------------
/examples/07-versioning/index.js:
--------------------------------------------------------------------------------
1 | module.exports = class Main {
2 | constructor () {
3 | this.isMain = true;
4 | }
5 | toString () {
6 | console.log(`Main instance: ${this.isMain}`);
7 | }
8 | };
--------------------------------------------------------------------------------
/examples/08-js-child-bundles/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = {
2 | input: 'index.js',
3 | output: 'www/output.js',
4 | build: [{
5 | input: 'child.js',
6 | output: 'www/output-child.js'
7 | }]
8 | };
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/@popeindustries/test/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@popeindustries/test",
3 | "version": "1.0.0",
4 | "description": "test project",
5 | "main": "test.js"
6 | }
7 |
--------------------------------------------------------------------------------
/examples/09-js-child-bundles-with-buddyImport/buddy.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | build: {
3 | input: 'index.js',
4 | output: 'www/output.js'
5 | },
6 | server: {
7 | webroot: 'www'
8 | }
9 | };
--------------------------------------------------------------------------------
/packages/buddy-plugin-imagemin/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-imagemin
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for minifying images (via [imagemin](https://github.com/imagemin/imagemin)).
4 |
5 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-nunjucks
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for nunjucks source transforms (via [nunjucks](https://github.com/mozilla/nunjucks)).
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/comment.js:
--------------------------------------------------------------------------------
1 | /**
2 | * foo
3 | * https://github.com/foo
4 | * @copyright foo
5 | * @license MIT
6 | */
7 |
8 | 'use strict';
9 |
10 | // Export
11 | module.exports = 'foo';
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/d.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-coffeescript/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-coffeescript
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for coffee-script source transforms (via [Coffee-script](http://coffeescript.org)).
--------------------------------------------------------------------------------
/packages/buddy-plugin-dust/test/fixtures/foo-include.dust:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {title}
5 | Test paragraph
6 | {> "include/include.dust" /}
7 |
8 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "build",
3 | "description": "build",
4 | "version": "0.0.0",
5 | "devDependencies": {},
6 | "repository": "build",
7 | "license": "MIT"
8 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-handlebars/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-handlebars
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for handlebars source transforms (via [handlebars](https://github.com/wycats/handlebars.js/)).
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/inline.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-typescript/README.md:
--------------------------------------------------------------------------------
1 | # buddy-plugin-typescript
2 |
3 | [Buddy](https://www.npmjs.com/package/buddy) plugin for TypeScript source transforms (via [TypeScript](https://www.typescriptlang.org/)).
4 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/inline-env.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/test/fixtures/utils/foo.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const foo = require('foo');
4 | const bar = require('bar');
5 |
6 | const FOO = 'FOO';
7 |
8 | module.exports = function foo () {
9 | console.log(foo || FOO);
10 | };
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/inline-compress.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | boo
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/buddy-server/test/fixtures/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Test
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/examples/10-environment-variables/two.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 03
5 |
6 |
7 |
8 | Example 03
9 |
10 |
--------------------------------------------------------------------------------
/lib/settings.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | dummyFile: '__PLACEHOLDER__.js',
5 | maxFileSystemDepth: 10,
6 | maxInputStringLength: 3,
7 | recommendedFileSizeLimit: 250000,
8 | versionDelimiter: '#'
9 | };
10 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/packages/node_modules/boop/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | if (process.env.NODE_ENV === 'production') {
4 | module.exports = require('./production.js');
5 | } else {
6 | module.exports = require('./development.js');
7 | }
8 |
--------------------------------------------------------------------------------
/packages/buddy-cli/test/fixtures/project/buddy/index.js:
--------------------------------------------------------------------------------
1 | module.exports = Builder;
2 |
3 | function Builder () { };
4 |
5 | Builder.prototype.build = function (configpath, options, fn) {
6 | console.log('build', configpath);
7 | console.error(JSON.stringify(options));
8 | };
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/inline-dynamic.nunjs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | foo
5 | {% for id in ids %}
6 |
7 | {% endfor %}
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/10-environment-variables/buddy.js:
--------------------------------------------------------------------------------
1 | exports.build = [
2 | {
3 | input: 'one.js',
4 | output: 'www/output-one.js',
5 | label: 'one'
6 | },
7 | {
8 | input: 'two.html',
9 | output: 'www/output-two.html',
10 | label: 'two'
11 | }
12 | ];
--------------------------------------------------------------------------------
/test/fixtures/config/named/buddy.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | foo: {
3 | build: {
4 | input: 'foo.js',
5 | output: 'www'
6 | }
7 | },
8 | bar: {
9 | build: {
10 | input: 'bar.js',
11 | output: 'www'
12 | }
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "6"
4 | - "8"
5 | - "9"
6 | install:
7 | - yarn install
8 | - yarn run install:packages
9 | script:
10 | - yarn run test:all
11 | cache:
12 | directories:
13 | - ~/.yarn
14 | - ~/.nvm
15 | - node_modules
--------------------------------------------------------------------------------
/examples/03-html-dependencies/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 03
5 |
6 |
7 |
8 |
9 | Example 03
10 |
11 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/complex.nunjs:
--------------------------------------------------------------------------------
1 | {% import "./includes/macro.nunjs" as macro %}
2 |
3 |
4 |
5 | {% include "./includes/header-inline.nunjs" %}
6 |
7 |
8 | {{ macro.label('Username') }}
9 |
10 |
--------------------------------------------------------------------------------
/examples/README.md:
--------------------------------------------------------------------------------
1 | The examples here illustrate several different ways to use **buddy**. Tips and caveats are also provided for each. Just run the following in your console:
2 |
3 | ```bash
4 | # List all examples
5 | $ npm run example
6 |
7 | # Run an example
8 | $ npm run example 01
9 | ```
--------------------------------------------------------------------------------
/perf/fixtures/buddy.json:
--------------------------------------------------------------------------------
1 | {
2 | "build": [{
3 | "input": "parent.js",
4 | "output": "output",
5 | "children": [{
6 | "input": "child.js",
7 | "output": "output"
8 | }]
9 | }],
10 | "server": {
11 | "directory": ".",
12 | "port": 3000
13 | }
14 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-imagemin/test/fixtures/a.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/image-directory/a.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/config/named-env/buddy.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | test: {
3 | build: {
4 | input: 'test.js',
5 | output: 'www'
6 | }
7 | },
8 | production: {
9 | build: {
10 | input: 'production.js',
11 | output: 'www'
12 | }
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-typescript/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | typescript@2.6.1:
6 | version "2.6.1"
7 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631"
8 |
--------------------------------------------------------------------------------
/test/fixtures/file/src/umd.js:
--------------------------------------------------------------------------------
1 | (function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3 | typeof define === 'function' && define.amd ? define(factory) :
4 | (global.ES6Promise = factory());
5 | }(this, (function () { 'use strict';
--------------------------------------------------------------------------------
/packages/buddy-plugin-coffeescript/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | coffee-script@1.12.7:
6 | version "1.12.7"
7 | resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53"
8 |
--------------------------------------------------------------------------------
/test/fixtures/file/src/closure.js:
--------------------------------------------------------------------------------
1 | ;(function (root, factory) {
2 | if (typeof exports === "object") {
3 | module.exports = factory.call(root);
4 | } else if (typeof define === "function" && define.amd) {
5 | define([], factory);
6 | } else {
7 | root.ol = factory();
8 | }
9 | }(window, function () {
--------------------------------------------------------------------------------
/test/fixtures/file/src/d3.js:
--------------------------------------------------------------------------------
1 | (function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3 | typeof define === 'function' && define.amd ? define(['exports'], factory) :
4 | (factory((global.d3 = global.d3 || {})));
5 | }(this, (function (exports) {})))
--------------------------------------------------------------------------------
/examples/06-language-plugins/index.less:
--------------------------------------------------------------------------------
1 | @the-border: 1px;
2 | @base-color: #111;
3 | @red: #842210;
4 |
5 | #header {
6 | color: @base-color * 3;
7 | border-left: @the-border;
8 | border-right: @the-border * 2;
9 | }
10 | #footer {
11 | color: @base-color + #003300;
12 | border-color: desaturate(@red, 10%);
13 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-less/test/fixtures/foo.less:
--------------------------------------------------------------------------------
1 | @the-border: 1px;
2 | @base-color: #111;
3 | @red: #842210;
4 |
5 | #header {
6 | color: @base-color * 3;
7 | border-left: @the-border;
8 | border-right: @the-border * 2;
9 | }
10 | #footer {
11 | color: @base-color + #003300;
12 | border-color: desaturate(@red, 10%);
13 | }
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/foo1.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/buddy-plugin-nunjucks/test/fixtures/foo2.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/es6.js:
--------------------------------------------------------------------------------
1 | import * as foo from './foo';
2 | import barDefault from './bar';
3 | import fDefault, * as fModule from './f';
4 |
5 | const importedFoo = foo;
6 |
7 | export default function() {
8 | console.log(importedFoo);
9 | console.log(foo);
10 | console.log(barDefault);
11 | console.log(fDefault, fModule.bat);
12 | }
13 |
--------------------------------------------------------------------------------
/lib/utils/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | callable: require('./callable'),
5 | cnsl: require('./cnsl'),
6 | env: require('./env'),
7 | filepath: require('./filepath'),
8 | sourceMap: require('./sourceMap'),
9 | stopwatch: require('./stopwatch'),
10 | string: require('./string'),
11 | tree: require('./tree')
12 | };
13 |
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/closure.js:
--------------------------------------------------------------------------------
1 | ;(function (root, factory) {
2 | if (typeof exports === "object") {
3 | module.exports = factory.call(root);
4 | } else if (typeof define === "function" && define.amd) {
5 | define([], factory);
6 | } else {
7 | root.ol = factory();
8 | }
9 | }(window, function () {
10 | var OPENLAYERS = {};
11 | var p,ca=this;
12 | }));
--------------------------------------------------------------------------------
/test/fixtures/buddy/build/lodash.js:
--------------------------------------------------------------------------------
1 | // buddy.js
2 | require('lodash/compact');
3 | require('lodash/flatten');
4 | // build.js
5 | require('lodash/uniq');
6 | require('lodash/merge');
7 | // dependency-resolver/config
8 | require('lodash/union');
9 | // utils/string.js
10 | require('lodash/isEqual');
11 | require('lodash/uniqWith');
12 | // file.js
13 | require('lodash/sortBy');
--------------------------------------------------------------------------------
/test/fixtures/resolver/node_modules/browser2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "browser2",
3 | "version": "1.0.0",
4 | "main": "./server/foo.js",
5 | "browser": {
6 | "./server/foo.js": "./browser/foo.js",
7 | "index": "./browser/foo.js",
8 | "bat": false,
9 | "foo": "bar",
10 | "bar": "./foo.js",
11 | "./bar.js": false,
12 | "./bing.js": "bing",
13 | "http": false,
14 | "net": "./foo.js"
15 | }
16 | }
--------------------------------------------------------------------------------
/examples/04-batch-builds/tips.txt:
--------------------------------------------------------------------------------
1 | #BATCH BUILDS#
2 |
3 | The config for this example describes a single directory (batch) build:
4 |
5 | {{buddy.js}}
6 |
7 | All files in the `src` directory are processed, but after resolving for dependencies,
8 | only two files are output to `www` (`index.css` and `index.js`):
9 |
10 | - in addition to files and directories, the `input` build property can accept an array of files or grep patterns
--------------------------------------------------------------------------------
/test/fixtures/config/pkgjson/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test",
3 | "version": "0.0.1",
4 | "dependencies": {
5 | "@foo/foo": "*",
6 | "bar": "*"
7 | },
8 | "devDependencies": {
9 | },
10 | "main": "index.js",
11 | "engines": {
12 | "node": ">=0.6.0"
13 | },
14 | "buddy": {
15 | "build": [
16 | {
17 | "input": ["src/main.js", "src/main.css"],
18 | "output": "www"
19 | }
20 | ]
21 | }
22 | }
--------------------------------------------------------------------------------
/examples/05-unbundled-batch-builds/tips.txt:
--------------------------------------------------------------------------------
1 | #UNBUNDLED BATCH BUILDS#
2 |
3 | The config for this example describes a single directory (batch) build:
4 |
5 | {{buddy.js}}
6 |
7 | All files in the `src` directory are processed, but because the `bundle` property is `false`,
8 | all files are output to `www`:
9 |
10 | - unbundled files will not inline or concatenate dependencies
11 | - unbundled builds are useful when transpiling or converting from another file type
--------------------------------------------------------------------------------
/lib/plugins/js/transpile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const babel = require('babel-core');
4 |
5 | /**
6 | * Transpile 'content' based on Babel 'options'
7 | * @param {String} content
8 | * @param {Object} options
9 | * @returns {String}
10 | */
11 | module.exports = function transpile(content, options) {
12 | if (!options.plugins.length || (options.presets && !options.presets.length)) return { code: content, map: null };
13 |
14 | return babel.transform(content, options);
15 | };
16 |
--------------------------------------------------------------------------------
/test/fixtures/file/src/webpack.js:
--------------------------------------------------------------------------------
1 | (function webpackUniversalModuleDefinition(root, factory) {
2 | if(typeof exports === 'object' && typeof module === 'object')
3 | module.exports = factory();
4 | else if(typeof define === 'function' && define.amd)
5 | define([], factory);
6 | else {
7 | var a = factory();
8 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9 | }
10 | })(this, function() {
11 | return /******/ (function(modules) { // webpackBootstrap
--------------------------------------------------------------------------------
/perf/config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const bench = require('./bench');
4 | const configFactory = require('../lib/config');
5 | const path = require('path');
6 |
7 | let config;
8 |
9 | const test = {
10 | before (done) {
11 | done();
12 | },
13 |
14 | run (done) {
15 | config = configFactory(path.resolve('./fixtures'), {});
16 | done();
17 | },
18 |
19 | after (done) {
20 | config.destroy();
21 | config = null;
22 | done();
23 | }
24 | };
25 |
26 | bench('config', test);
--------------------------------------------------------------------------------
/bin/packages:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | 'use strict';
4 |
5 | const { execSync: exec } = require('child_process');
6 | const fs = require('fs');
7 | const path = require('path');
8 | const cmd = process.argv[2];
9 | const cmdStr = `yarn ${cmd || ''}`;
10 |
11 | fs.readdirSync(path.resolve('packages'))
12 | .forEach((resource) => {
13 | if (/^buddy-/.test(resource)) {
14 | console.log(`\n${resource}`);
15 | exec(cmdStr, { cwd: path.resolve(__dirname, '../packages', resource), stdio: 'inherit' });
16 | }
17 | });
--------------------------------------------------------------------------------
/test/fixtures/file/src/module.js:
--------------------------------------------------------------------------------
1 | module.exports = {};
2 | module['exports'] = {};
3 | module['ex' + 'ports'] = {};
4 |
5 | exports.foo = 'foo';
6 | exports['foo'] = 'foo';
7 | exports.BELL = '\x07';
8 |
9 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
10 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
11 |
12 | if (true) {
13 | const module = 'foo';
14 | const exports = 'bar';
15 |
16 | exports.foo = 'foo';
17 | }
18 | foo[exports.foo] = 'foo';
--------------------------------------------------------------------------------
/lib/plugins/flow/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const PLUGINS = [
4 | 'babel-plugin-syntax-flow',
5 | // Experimental, but needed for type syntax in Class constructors
6 | 'babel-plugin-transform-class-properties',
7 | 'babel-plugin-transform-flow-strip-types'
8 | ];
9 |
10 | module.exports = {
11 | name: 'flow',
12 | type: 'js',
13 |
14 | /**
15 | * Register plugin
16 | * @param {Config} config
17 | */
18 | register(config) {
19 | config.registerTargetVersionForType(this.name, PLUGINS, this.type);
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/lib/utils/callable.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Retrieve callable function for 'fnName' of 'context'
5 | * @param {Object} context
6 | * @param {String} fnName
7 | * @param {Array} [args]
8 | * @returns {Function}
9 | */
10 | module.exports = function callable(context, fnName, ...args) {
11 | const fn = !fnName && 'function' == typeof context ? context : context[fnName];
12 |
13 | return function callableFunction(...moreArgs) {
14 | // console.log(context && context.id, fnName)
15 | fn.call(context, ...args, ...moreArgs);
16 | };
17 | };
18 |
--------------------------------------------------------------------------------
/examples/03-html-dependencies/tips.txt:
--------------------------------------------------------------------------------
1 | #HTML DEPENDENCIES#
2 |
3 | The config for this example describes a single HTML build:
4 |
5 | {{buddy.js}}
6 |
7 | The input file (`index.html`) has two dependencies (`dep.css`, `arrify`),
8 | and all files are bundled together as `www/output.html`:
9 |
10 | - dependencies are declared with `inline` attributes in ``, `
13 | ```
14 |
15 | ## Usage
16 |
17 | ```json
18 | {
19 | "devDependencies": {
20 | "buddy": "6.13.0",
21 | "buddy-server": "3.0.0"
22 | },
23 | "buddy": {
24 | "server": {
25 | "port": 8000,
26 | "directory": "www"
27 | }
28 | }
29 | ```
30 | ```bash
31 | $ buddy watch --serve --reload
32 | ```
33 |
34 | Specify multiple directories:
35 | ```json
36 | "buddy": {
37 | "server": {
38 | "port": 8000,
39 | "directory": ["www", "assets"]
40 | }
41 | }
42 | ```
43 |
44 | Configure `headers` to pass to the default static file server:
45 | ```json
46 | "buddy": {
47 | "server": {
48 | "port": 8000,
49 | "directory": "www",
50 | "headers": {
51 | "x-foo": "foo"
52 | }
53 | }
54 | }
55 | ```
56 |
57 | Specify an alternative root url from which to serve source maps:
58 | ```json
59 | "buddy": {
60 | "server": {
61 | "port": 8000,
62 | "directory": "www",
63 | "sourceroot": "https://raw.githubusercontent.com/user/repo/master/"
64 | }
65 | }
66 | ```
67 |
68 | ### Custom application server
69 |
70 | To use a custom application server instead of the default, specify a `file` path to your server:
71 | ```json
72 | "buddy": {
73 | "server": {
74 | "port": 8000,
75 | "file": "./index.js"
76 | }
77 | }
78 | ```
79 |
80 | Configure environment variables with `env`:
81 | ```json
82 | "buddy": {
83 | "server": {
84 | "port": 8000,
85 | "file": "./index.js",
86 | "env": {
87 | "DEBUG": "*"
88 | }
89 | }
90 | }
91 | ```
92 |
93 | Configure `flags` to pass to the Node process running your server:
94 | ```json
95 | "buddy": {
96 | "server": {
97 | "port": 8000,
98 | "file": "./index.js",
99 | "flags": ['--inspect']
100 | }
101 | }
102 | ```
103 |
104 | **NOTE** The current port number will be exposed as `process.env.PORT`.
--------------------------------------------------------------------------------