{"_id":"assets","_rev":"16-a6a80fd8a62fded6ce490755a83a392f","name":"assets","description":"An asset manager for node","dist-tags":{"latest":"3.0.1"},"versions":{"0.0.1":{"name":"assets","version":"0.0.1","description":"Asset API for Node.js","homepage":"http://github.com/viatropos/assets.js","main":"lib/assets.js","keywords":["framework","node"],"bugs":{"url":"https://github.com/viatropos/assets.js/issues"},"repository":{"type":"git","url":"git://github.com/viatropos/assets.js.git"},"engines":{"node":">= 0.4.0"},"dependencies":{},"_npmUser":{"name":"viatropos","email":"lancejpollard@gmail.com"},"_id":"assets@0.0.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.94","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"3c6baeb38fbc669d776f77c0b2022a0146a07701","tarball":"https://registry.npmjs.org/assets/-/assets-0.0.1.tgz","integrity":"sha512-Mum+ww0aT1JpUVB0kYH3qFBgFXRS0JRXP9uA9wLL4wasf66boBQoFGhlEZt0Rz6FlC70EbVI/usYgDV1pYBpLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ5zGe/pb0sV9ry0StczRtxwRVi9CWNcDcFxsa2nN8igIgJBWzWJvfUkesQCXTOD+NeI7Y2zZPq5YGgFbXUBfKqNQ="}]},"maintainers":[{"name":"viatropos","email":"lancejpollard@gmail.com"}],"directories":{}},"1.0.0":{"name":"assets","version":"1.0.0","description":"An asset manager for node","keywords":["assets","base64","image","path","size","url"],"main":"./lib","repository":{"type":"git","url":"git+https://github.com/borodean/assets.git"},"author":{"name":"Vadym Borodin","email":"borodean@gmail.com"},"scripts":{"coveralls":"nyc report --reporter=text-lcov | coveralls","test":"eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"},"dependencies":{"async":"^1.5.0","bluebird":"^3.0.6","calipers":"^2.0.0","calipers-gif":"^2.0.0","calipers-jpeg":"^2.0.0","calipers-png":"^2.0.0","calipers-svg":"^2.0.0","calipers-webp":"^2.0.0","lodash":"^3.10.1","mime":"^1.3.4"},"devDependencies":{"ava":"^0.7.0","coveralls":"^2.11.4","eslint":"^1.10.3","nyc":"^4.0.1","sinon":"^1.17.2"},"gitHead":"9403ac62c6e51a8ccecb127136d014f28ac4fba6","bugs":{"url":"https://github.com/borodean/assets/issues"},"homepage":"https://github.com/borodean/assets#readme","_id":"assets@1.0.0","_shasum":"f69a7caef0cd6b673f9ed949ded6aa7c5f637cf1","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"borodean","email":"borodean@gmail.com"},"dist":{"shasum":"f69a7caef0cd6b673f9ed949ded6aa7c5f637cf1","tarball":"https://registry.npmjs.org/assets/-/assets-1.0.0.tgz","integrity":"sha512-CZJjldrWg5OXjRrHRCWbdB0jM+qsU2TBEplThjc2aIlF08BQt+t86SCLWQ71S9MCdjMFcLtGFKMeOtb8uvMs+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG1O/8ITFeVge9NbOFco2OtiR0cI+8A8EL8v3ej2SgxXAiB5i92JLcfMS7oBJkggiUqlzT4PG0tLCPJl0/I7UvnvYw=="}]},"maintainers":[{"name":"borodean","email":"borodean@gmail.com"}],"directories":{}},"1.0.1":{"name":"assets","version":"1.0.1","description":"An asset manager for node","keywords":["assets","base64","image","path","size","url"],"main":"./lib","repository":{"type":"git","url":"git+https://github.com/borodean/assets.git"},"author":{"name":"Vadym Borodin","email":"borodean@gmail.com"},"scripts":{"coveralls":"nyc report --reporter=text-lcov | coveralls","test":"eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"},"dependencies":{"async":"^1.5.0","bluebird":"^3.0.6","calipers":"^2.0.0","calipers-gif":"^2.0.0","calipers-jpeg":"^2.0.0","calipers-png":"^2.0.0","calipers-svg":"^2.0.0","calipers-webp":"^2.0.0","lodash":"^3.10.1","mime":"^1.3.4"},"devDependencies":{"ava":"^0.7.0","coveralls":"^2.11.4","eslint":"^1.10.3","nyc":"^4.0.1","sinon":"^1.17.2"},"gitHead":"f008df8aa67c8fcad507e45635d0befff1fe7807","bugs":{"url":"https://github.com/borodean/assets/issues"},"homepage":"https://github.com/borodean/assets#readme","_id":"assets@1.0.1","_shasum":"16370c309d9209e76ea413036c0bfe8063abbc1a","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"borodean","email":"borodean@gmail.com"},"dist":{"shasum":"16370c309d9209e76ea413036c0bfe8063abbc1a","tarball":"https://registry.npmjs.org/assets/-/assets-1.0.1.tgz","integrity":"sha512-yTMtGSCQ0JUo+7nKFEYI1zULsd5lIMQLaItu0+OnrVz9oFRmBFKlEBqQOZH/cqrm2mthF+pLZX5o6m64hP+hEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVu5sfcTXriDBbZKX5ERKO96XMQf2/HharM5nyAUDgLAiEAlkZbR9Tz5mohS0RNyO9qG6SB+v05CYPXTiy6Ojl+Veo="}]},"maintainers":[{"name":"borodean","email":"borodean@gmail.com"}],"directories":{}},"2.0.0":{"name":"assets","version":"2.0.0","description":"An asset manager for node","keywords":["assets","base64","image","path","size","url"],"main":"./lib","repository":{"type":"git","url":"git+https://github.com/borodean/assets.git"},"author":{"name":"Vadym Borodin","email":"borodean@gmail.com"},"scripts":{"coveralls":"nyc report --reporter=text-lcov | coveralls","test":"eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"},"dependencies":{"async":"^1.5.0","bluebird":"^3.0.6","calipers":"^2.0.0","calipers-gif":"^2.0.0","calipers-jpeg":"^2.0.0","calipers-png":"^2.0.0","calipers-svg":"^2.0.0","calipers-webp":"^2.0.0","lodash":"^3.10.1","mime":"^1.3.4"},"devDependencies":{"ava":"^0.7.0","coveralls":"^2.11.4","eslint":"^1.10.3","nyc":"^4.0.1","sinon":"^1.17.2"},"gitHead":"a2d0cdb83805666bb8feb7400be6efe1940d3d1d","bugs":{"url":"https://github.com/borodean/assets/issues"},"homepage":"https://github.com/borodean/assets#readme","_id":"assets@2.0.0","_shasum":"4f100c34e75c9729d64e995c9b2c033e40a0e0fe","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"borodean","email":"borodean@gmail.com"},"dist":{"shasum":"4f100c34e75c9729d64e995c9b2c033e40a0e0fe","tarball":"https://registry.npmjs.org/assets/-/assets-2.0.0.tgz","integrity":"sha512-eNTUnEFoGRZSYlOcD57s1KHZ28uhw9u+i3gFg6UixlxAfjn38MkVlO0L2Mn52ow7No/KpEV/FIz0ir4RSTVa5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB9IZngkhqoH1ecW3xg5OiT6Oxs7nJkDLlfz5V/pJLDFAiEA3SeKvklYusYq8awgr4eDUAHrb8fpFHfICfB+bxgVzps="}]},"maintainers":[{"name":"borodean","email":"borodean@gmail.com"}],"directories":{}},"2.1.0":{"name":"assets","version":"2.1.0","description":"An asset manager for node","keywords":["assets","base64","image","path","size","url"],"main":"./lib","repository":{"type":"git","url":"git+https://github.com/borodean/assets.git"},"author":{"name":"Vadym Borodin","email":"borodean@gmail.com"},"scripts":{"coveralls":"nyc report --reporter=text-lcov | coveralls","test":"eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"},"dependencies":{"async":"^1.5.0","bluebird":"^3.0.6","calipers":"^2.0.0","calipers-gif":"^2.0.0","calipers-jpeg":"^2.0.0","calipers-png":"^2.0.0","calipers-svg":"^2.0.0","calipers-webp":"^2.0.0","glob":"^6.0.4","lodash":"^3.10.1","mime":"^1.3.4"},"devDependencies":{"ava":"^0.7.0","coveralls":"^2.11.4","eslint":"^1.10.3","nyc":"^4.0.1","sinon":"^1.17.2"},"gitHead":"9a3354426f951919a984da219db2169903e45677","bugs":{"url":"https://github.com/borodean/assets/issues"},"homepage":"https://github.com/borodean/assets#readme","_id":"assets@2.1.0","_shasum":"bfae98717974d66636eed26b18eb7120608816f5","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"borodean","email":"borodean@gmail.com"},"dist":{"shasum":"bfae98717974d66636eed26b18eb7120608816f5","tarball":"https://registry.npmjs.org/assets/-/assets-2.1.0.tgz","integrity":"sha512-+jg6k42OtcZBNui+rJ5VD1hXHKMWdMOu3IH6GfEZXyxP1M71tDP65txj1WnAxshRXm1iH9n8Zl67S5Wwvm4oFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1MfCSgkkcWiN68sRp1ESVvQDVCBkLqyyzTnsJbtXaMwIhAKreaxHz8EWkXi6UZbOHTwzpqHqGkbtH4diooSGBup4/"}]},"maintainers":[{"name":"borodean","email":"borodean@gmail.com"}],"directories":{}},"3.0.0":{"name":"assets","version":"3.0.0","description":"An asset manager for node","keywords":["assets","base64","image","path","size","url"],"bugs":{"url":"https://github.com/assetsjs/postcss-assets/issues"},"license":"MIT","author":{"name":"Vadym Borodin","email":"borodean@gmail.com","url":"http://borodean.com"},"main":"./lib","repository":{"type":"git","url":"git+https://github.com/assetsjs/assets.git"},"scripts":{"coveralls":"nyc report --reporter=text-lcov | coveralls","test":"eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"},"dependencies":{"async":"^2.5.0","bluebird":"^3.4.6","calipers":"^2.0.0","calipers-gif":"^2.0.0","calipers-jpeg":"^2.0.0","calipers-png":"^2.0.0","calipers-svg":"^2.0.0","calipers-webp":"^2.0.0","glob":"^7.0.6","lodash":"^4.15.0","mime":"^1.4.0"},"devDependencies":{"ava":"^0.22.0","coveralls":"^2.11.13","eslint":"^4.5.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-import":"^2.7.0","nyc":"^11.1.0","sinon":"^3.2.1"},"engines":{"node":">=0.12"},"gitHead":"0e197fb22de604476875bb9b6ca6d726f5c0ff04","homepage":"https://github.com/assetsjs/assets#readme","_id":"assets@3.0.0","_shasum":"0899b030c76701bf9b4a015a0da2ed18ecc1d833","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"borodean","email":"borodean@gmail.com"},"dist":{"shasum":"0899b030c76701bf9b4a015a0da2ed18ecc1d833","tarball":"https://registry.npmjs.org/assets/-/assets-3.0.0.tgz","integrity":"sha512-ky+0aABUVU36CLUUyuhgnU+LeTol9PaJ1WablnZsIhQMYQ80UCMvdpfOFEs/zJ/9DpuBvJkOcszZHw8+opAPVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFk1MnEhhKSCEkaZ5z9qDLpEX37ZUyZVGIdap2/nTTEgAiBspNWfSRXmiW/MA0lZtRpQGCfUHzVh8mNcbS1wnKazTw=="}]},"maintainers":[{"name":"borodean","email":"borodean@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/assets-3.0.0.tgz_1504216082048_0.5375235870014876"},"directories":{}},"3.0.1":{"name":"assets","version":"3.0.1","description":"An asset manager for node","keywords":["assets","base64","image","path","size","url"],"bugs":{"url":"https://github.com/assetsjs/postcss-assets/issues"},"license":"MIT","author":{"name":"Vadym Borodin","email":"borodean@gmail.com","url":"http://borodean.com"},"main":"./lib","repository":{"type":"git","url":"git+https://github.com/assetsjs/assets.git"},"scripts":{"coveralls":"nyc report --reporter=text-lcov | coveralls","test":"eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"},"dependencies":{"async":"^2.5.0","bluebird":"^3.4.6","calipers":"^2.0.0","calipers-gif":"^2.0.0","calipers-jpeg":"^2.0.0","calipers-png":"^2.0.0","calipers-svg":"^2.0.0","calipers-webp":"^2.0.0","glob":"^7.0.6","lodash":"^4.15.0","mime":"^2.4.0"},"devDependencies":{"ava":"^0.25.0","coveralls":"^3.0.2","eslint":"^4.19.1","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.7.0","nyc":"^11.9.0","sinon":"^7.2.2"},"engines":{"node":">=4"},"gitHead":"e2f5831b5a191b15cc09d658b3327d41a4ef05c6","homepage":"https://github.com/assetsjs/assets#readme","_id":"assets@3.0.1","_shasum":"7a69f4bcc3aca9702760e2a73a7e76ca93e9e3e0","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.9.1","_npmUser":{"name":"borodean","email":"borodean@gmail.com"},"dist":{"shasum":"7a69f4bcc3aca9702760e2a73a7e76ca93e9e3e0","tarball":"https://registry.npmjs.org/assets/-/assets-3.0.1.tgz","integrity":"sha512-fTyLNf/9V24y5zO83f4DAEuvaKj7MWBixbnqdZneAhsv1r21yQ/6ogZfvXHmphJAHsz4DhuOwHeJKVbGqqvk0Q==","fileCount":17,"unpackedSize":17078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEnKnCRA9TVsSAnZWagAAyncP/2uvh8XVUSlaW3VaZziF\nKH7viEAHvKFkn44VVPNv8rhBwTJJC62d6m+9WM8JASrwG93QTf03/h/nR83U\nbJQMi94UhGEQ0tuYyftKelpF2wAjyfht4geWAXLUAgwAJpJaqpz5ZHlnHHvm\n4hPhfc3zUqoeK6avD1qjckNEQDHNHaBK1rBZwhoRePjDugl2J16nLYHgcrCU\n1dpKP09gxqjxo8qu48mBXtUcNFkaiQ1yyh+gx7yjQ3lxL/zxe6UuZqF0tJOK\n3pgFfOdEaeJg3z9ILlvBfOGHYXyOhrS5ME3mZguz6PvRvOjErbIizeb74XYO\n6xJqSj+n0PZxGJC+4suptk7zDn97Qx34paecnHZRA3rBqMWGIF0oQ9QHA+HR\nfJTxFC8SpBEIlBJ8ayFs3wnqAooSbUW2ePOmLFEmW80Rx8eGxqdIGsIFr0fa\nmXGu8B2f6e+IGUueb5uMZodgXeVaYUx8zO7zs38FaWGSD3ZZzLGuRH3QPbUx\nuFui+ssucpFN6mb3q6GfZhMDKx6K+5xTMMyDFW9gK3DIaC2N9G062cH6uBe7\nlhHltJIOWgXuF91SQoCMnkftfS+wKggELawIYPF0BfsLLHzgx3n4ocTmnt8V\nej2nw94X6lWZpBqHxdeYN+6PZNV7MRKJUYoEL+KE8Tu/7yKilJc3GIQyWqYi\nAMlG\r\n=9kHD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKs2+reiJowzEseXXArOYJ0dIJaexvLNBjv4dcPMMXaAiALsY+TCyR7UC/zB+sOv+emwghAgYAb28k/brAvyhDZHQ=="}]},"maintainers":[{"name":"borodean","email":"borodean@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/assets_3.0.1_1544712870940_0.3785891771223344"},"_hasShrinkwrap":false}},"maintainers":[{"name":"borodean","email":"borodean@gmail.com"}],"time":{"modified":"2022-06-13T03:34:29.433Z","created":"2011-11-08T19:38:16.939Z","0.0.1":"2011-11-08T19:38:17.919Z","1.0.0":"2015-12-11T00:51:01.520Z","1.0.1":"2016-01-30T14:38:50.585Z","2.0.0":"2016-01-30T15:06:14.464Z","2.1.0":"2016-01-30T16:26:20.731Z","2.1.1":"2016-01-30T16:56:27.123Z","3.0.0":"2017-08-31T21:48:03.131Z","3.0.1":"2018-12-13T14:54:31.157Z"},"repository":{"type":"git","url":"git+https://github.com/assetsjs/assets.git"},"homepage":"https://github.com/assetsjs/assets#readme","keywords":["assets","base64","image","path","size","url"],"bugs":{"url":"https://github.com/assetsjs/postcss-assets/issues"},"readme":"# ![assets](https://rawgit.com/assetsjs/assets/develop/media/assets.svg)\n\nAssets is an asset manager for node. It isolates assets from environmental changes, gets generates their URLs, retrieves image sizes and base64-encodes them.\n\n[![Unix Build Status][travis-badge]][travis] [![Windows Build Status][appveyor-badge]][appveyor] [![Coverage][coveralls-badge]][coveralls]\n\n[appveyor]:        https://ci.appveyor.com/project/borodean/assets-xjoqs\n[appveyor-badge]:  https://img.shields.io/appveyor/ci/borodean/assets-xjoqs.svg?label=windows\n[coveralls]:       https://coveralls.io/github/assetsjs/assets\n[coveralls-badge]: https://img.shields.io/coveralls/assetsjs/assets.svg\n[travis]:          https://travis-ci.org/assetsjs/assets\n[travis-badge]:    https://img.shields.io/travis/assetsjs/assets.svg?label=unix\n\n## Installation\n\n```bash\nnpm install assets --save\n```\n\n## Usage\n\nAn instance of Assets should be created:\n\n```js\nvar options = { loadPaths: ['fonts', 'images'] };\nvar resolver = new Assets(options);\n```\n\nEach of the resolving methods returns a Promise:\n\n```js\nresolver.path('foobar.jpg')\n  .then(function (resolvedPath) {\n    // ....\n  });\n```\n\nTo use a node-style callback, pass it as the last argument to the resolving method:\n\n```js\nresolver.path('foobar.jpg', function (err, resolvedPath) {\n  // ...\n});\n```\n\n## Resolving methods\n\n### `.path(path)`\nResolve the absolute path for an asset.\n\n```js\nvar resolver = new Assets({ loadPaths: ['assets'] });\nresolver.path('patterns/knitwork.gif')\n  .then(function (resolvedPath) {\n    console.log(resolvedPath); // '/var/www/example.com/assets/patterns/knitwork.gif'\n  });\n```\n\n### `.url(path)`\nGenerates an URL for an asset.\n\n```js\nvar resolver = new Assets({ loadPaths: ['assets/images'] });\nresolver.url('page/background.jpg')\n  .then(function (resolvedUrl) {\n    console.log(resolvedUrl); // '/assets/images/page/background.jpg'\n  });\n```\n\n### `.data(path)`\nReturns a base64-encoded content of an asset. SVG files would be non-encoded, because then [they benefit in size](http://css-tricks.com/probably-dont-base64-svg/).\n\n```js\nvar resolver = new Assets();\nresolver.data('icons/sabre.png')\n  .then(function (resolvedData) {\n    console.log(resolvedData); // 'data:image/png;base64,...'\n  });\n```\n\n### `.size(path)`\nReturn the size of an asset.\n\n```js\nvar resolver = new Assets();\nresolver.size('logo.png')\n  .then(function (resolvedSize) {\n    console.log(resolvedSize); // '{ width: 132, height: 48 }'\n  });\n```\n\nOptions\n-------\n\nOptions are set by passing an options object to the constructor. Available options are:\n\n### `basePath`\nThe path to the root of the project.\n\nFor example: `\"source/\"`.\n\nDefaults to the current working directory.\n\n### `baseUrl`\nURL of the project when running withing the web server.\n\nFor example: `\"/wp-content/themes/twentyfourteen\"`, `\"http://example.com\"`.\n\nDefaults to `\"/\"`.\n\n### `cachebuster`\nIf cache should be busted. If set to `true`, Assets will bust assets cache, changing urls depending on asset’s modification date:\n\n```js\nvar resolver = new Assets({ cachebuster: true, loadPaths: ['assets/images'] });\nresolver.url('page/background.jpg')\n  .then(function (resolvedUrl) {\n    console.log(resolvedUrl); // '/assets/images/page/background.jpg?14a931c501f'\n  });\n```\n\nTo define a custom cachebuster pass a function as an option:\n\n```js\nvar resolver = new Assets({\n  cachebuster: function (resolvedPath, pathname) {\n    return fs.statSync(resolvedPath).mtime.getTime().toString(16);\n  }\n});\n```\n\nIf the returned value is falsy, no cache busting is done for the asset.\n\nIf the returned value is an object the values of pathname and/or query are used to generate a cache busted path to the asset.\n\nIf the returned value is a string, it is added as a query string.\n\nThe returned values for query strings must not include the starting ?.\n\nBusting the cache via path:\n\n```js\nvar resolver = new Assets({\n  cachebuster: function (resolvedPath, pathname) {\n    var hash = fs.statSync(resolvedPath).mtime.getTime().toString(16);\n    return {\n      pathname: path.dirname(pathname)\n        + '/' + path.basename(pathname, path.extname(pathname))\n        + hash + path.extname(pathname),\n      query: false // you may omit this one\n    }\n  }\n});\n```\n\nDefaults to `false`.\n\n### `loadPaths`\nSpecific directories to look for the files.\n\nFor example: `[\"assets/fonts\", \"assets/images\"]`.\n\nDefaults to an empty array.\n\n### `relativeTo`\nDirectory to relate to when resolving URLs. When `false`, disables relative URLs.\n\nFor example: `\"assets/css\"`.\n\nDefaults to `false`.\n\nPath resolution\n---------------\n\nAssets provide a file path resolution algorithm similar to the one used by desktop file systems.\n\nThis may come in handy when you have different directories for different types of assets, e.g. images, fonts. You add those to the list of load paths when configuring Assets:\n\n```js\nvar resolver = new Assets({\n  loadPaths: ['assets/fonts', 'assets/images']\n});\n```\n\nNow, instead of writing this:\n\n```js\nvar url = '/assets/images/icons/create.png';\nvar url = '/assets/images/icons/read.png';\nvar url = '/assets/images/icons/update.png';\nvar url = '/assets/images/icons/delete.png';\n```\n\nYou can write this:\n\n```js\nvar url = resolver.path('icons/create.png');\nvar url = resolver.path('icons/read.png');\nvar url = resolver.path('icons/update.png');\nvar url = resolver.path('icons/delete.png');\n```\n\nApart from the fact that these lines are just shorter, it gives you an opportunity to easily change the environment and the way the URLs are being output much quicker.\n\nFor instance, if you move all the images from `assets/images` to `client/source/images` you wouldn't need to go through all of your stylesheets to replace the URLs, you would just need to edit the corresponding parameter inside your Assets config:\n\n```js\nvar resolver = new Assets({\n  loadPaths: ['assets/fonts', 'client/source/images']\n});\n```\n\nWhen resolving a path, Assets would look for it through every of the following paths in the listed order:\n\n* load paths;\n* base path.\n\nPath resolution also gives an opportunity to easily change the URL structure when the directory structure of the project on your computer is not exactly the same as it would be on the server.\n\nFor instance, if you have a Wordpress theme project, you may want to append `/wp-content/themes/your-theme-name` to every URL inside of your stylesheet. This is done by providing a `baseUrl` parameter to Assets config:\n\n```js\nvar resolver = new Assets({\n  baseUrl: '/wp-content/themes/your-theme-name'\n});\n```\n\nNow everything would be resolved relative to that base URL:\n\n```js\nresolver.url('images/create.png')\n  .then(function (resolvedUrl) {\n    console.log(resolvedUrl); // '/wp-content/themes/your-theme-name/images/create.png'\n  });\n```\n","readmeFilename":"README.md","author":{"name":"Vadym Borodin","email":"borodean@gmail.com","url":"http://borodean.com"},"license":"MIT"}