{"_id":"@adapt-retail/print-data","_rev":"8-433feeab078a1fbd6b730741c8422665","name":"@adapt-retail/print-data","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"@adapt-retail/print-data","version":"0.0.0","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","main":"dist/AdaptPrintData.js","dependencies":{"@adapt-retail/banner-data":"^0.1.0","mustache":"^2.3.0"},"devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.22.0","babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.1"},"scripts":{"test":"ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"homepage":"https://github.com/AdaptRetail/print-data#readme","ava":{"require":["./test/helpers/setup-browser-env.js"]},"gitHead":"351780a94410bf32df033cf71b1533849e2cac04","_id":"@adapt-retail/print-data@0.0.0","_npmVersion":"5.4.1","_nodeVersion":"8.3.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-M70OVir8YsPtpbvLEzJwoa5X6cYlm1KcUuAm7bFn5DmgbaN5vBOagVx1PnQdhdq3wkmKKwBZ7FD04tNGKUk8Iw==","shasum":"89152900dbb63f64c37d109b9d87023949257415","tarball":"https://registry.npmjs.org/@adapt-retail/print-data/-/print-data-0.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkQd+ROGRv2t1/c/Ui8SlkEAuAxaEmKooa8ReiOaIojwIgHNdwSZh7G/9cpTXJdHYV/cXzAhFFbqx8Iibp70h7jYw="}]},"maintainers":[{"name":"lassehaslev","email":"lasse@haslev.no"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/print-data-0.0.0.tgz_1508800172487_0.08835917827673256"}},"0.0.1":{"name":"@adapt-retail/print-data","version":"0.0.1","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","main":"dist/AdaptPrintData.js","dependencies":{"@adapt-retail/banner-data":"^0.1.0","mustache":"^2.3.0"},"devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.22.0","babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.1"},"scripts":{"test":"ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"homepage":"https://github.com/AdaptRetail/print-data#readme","ava":{"require":["./test/helpers/setup-browser-env.js"]},"gitHead":"25b2abcffb0d6c74c8e95d2472e083499a5e84a7","_id":"@adapt-retail/print-data@0.0.1","_npmVersion":"5.4.1","_nodeVersion":"8.3.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-UhTDrk9iSDqm1+DTpGnNP0+j1/TrOR6H7ke7Hg6DccPMLAvqDVeJDbZNAjnSZplUTtJTAW7oFsxGJ0tp+jFyOA==","shasum":"9b33547a60c9f00bf51de29a59b0d66bab5fedba","tarball":"https://registry.npmjs.org/@adapt-retail/print-data/-/print-data-0.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+2Mg3H2RHE8c6NCrskqq++XMPweT24JPE2FyPUaOnvgIgB3qa9CdRjcq0jaAuknRlm4SLPzgLBa7kg4OYQXN8e/I="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/print-data-0.0.1.tgz_1509003761044_0.7854394821915776"}},"0.0.2":{"name":"@adapt-retail/print-data","version":"0.0.2","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","main":"dist/AdaptPrintData.js","dependencies":{"@adapt-retail/banner-data":"^0.1.0","mustache":"^2.3.0"},"devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.22.0","babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.1"},"scripts":{"test":"ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"homepage":"https://github.com/AdaptRetail/print-data#readme","ava":{"require":["./test/helpers/setup-browser-env.js"]},"gitHead":"c234c37524244393d375f877eee85fb3b5124b4e","_id":"@adapt-retail/print-data@0.0.2","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-5Uxjs8WWN9wyasPozkIz7OeRhPYOxDtLhsApm20oDVIJF/8qt0vx0cJXj34v5ow2xxcDb+FTGD8p0PsgCy8wjw==","shasum":"0376186f16c95a5b7b1c2ff70d440dac1879a6c9","tarball":"https://registry.npmjs.org/@adapt-retail/print-data/-/print-data-0.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGBEHe4MBu7ymce14tWUVB1x3PbUc8yAs8dggi42uvgkAiEAyDqxGUXR14/33am+ZjOUyY81HM2elsO+OZat8WnJ82I="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/print-data-0.0.2.tgz_1510253263505_0.9401785135269165"}},"0.0.3":{"name":"@adapt-retail/print-data","version":"0.0.3","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","main":"dist/AdaptPrintData.js","dependencies":{"@adapt-retail/banner-data":"^0.1.0","mustache":"^2.3.0"},"devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.22.0","babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.1"},"scripts":{"test":"ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"homepage":"https://github.com/AdaptRetail/print-data#readme","ava":{"require":["./test/helpers/setup-browser-env.js"]},"gitHead":"0abe5b4ea92d281abe2a868a1b7828c496845c85","_id":"@adapt-retail/print-data@0.0.3","_npmVersion":"5.4.1","_nodeVersion":"8.3.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-gp+JLQ0w8p7MnPR6Hnxj3oODvxC0A+cGRZsriGMZ4O28KcK12b0HgiqVNKtRz9xm7S9QUxM3H3t99ChAJdQbAw==","shasum":"10e73dcd4b64f83e20119f0e0cf4994472a10c0a","tarball":"https://registry.npmjs.org/@adapt-retail/print-data/-/print-data-0.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnly9p0jEqBbYfcBP88djs1MFfgT1ev3LinMMjh6iabQIgTMgIdOQauB2VuCfP/HJb5MfGWUTiLLT0M0HddxygCzw="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/print-data-0.0.3.tgz_1511396558334_0.35027145757339895"}},"0.0.4":{"name":"@adapt-retail/print-data","version":"0.0.4","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","main":"dist/AdaptPrintData.js","dependencies":{"@adapt-retail/banner-data":"^0.1.0","mustache":"^2.3.0"},"devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.22.0","babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.1"},"scripts":{"test":"ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"homepage":"https://github.com/AdaptRetail/print-data#readme","ava":{"require":["./test/helpers/setup-browser-env.js"]},"gitHead":"b34c2e000fba31407dd2363b2164043217bf6a1a","_id":"@adapt-retail/print-data@0.0.4","_npmVersion":"5.6.0","_nodeVersion":"9.2.1","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-znTyEnGxl00mdqhphRV4ehmtAOZF3h8//G8amCGzHAv9cNchtYoOXIXjhRm61zUj9BMB9ta4+9kQu+o/r3NjsQ==","shasum":"83f243847e41f971374f2d0f01f34310864ebfbb","tarball":"https://registry.npmjs.org/@adapt-retail/print-data/-/print-data-0.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBWmZWyWQnukRyzZnONEX5Uo5bJck0feUP+R4NrGDo/7AiApVeJma8Oa+qFmQqlq72obQNccgD9FjC5AGS2tO1j8MQ=="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/print-data-0.0.4.tgz_1516632936681_0.9118388725910336"}},"0.0.5":{"name":"@adapt-retail/print-data","version":"0.0.5","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","main":"dist/AdaptPrintData.js","dependencies":{"@adapt-retail/banner-data":"^0.1.0","mustache":"^2.3.0"},"devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.22.0","babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.1"},"scripts":{"test":"ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"homepage":"https://github.com/AdaptRetail/print-data#readme","ava":{"require":["./test/helpers/setup-browser-env.js"]},"gitHead":"18b2b3170aeb15ad2fc5a1b0d6fed285fd596bcb","_id":"@adapt-retail/print-data@0.0.5","_npmVersion":"5.6.0","_nodeVersion":"9.2.1","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-51LXKFkmPjiX4wNfQ1k1CU23vhwd3EscCbUStZxpuVA3kqobxC7BR+t6NsTqYkoV8icBq0KVR00whji5r8ZvQw==","shasum":"ad778a00a9b8cf412f8c1d646bd1fd045d44a681","tarball":"https://registry.npmjs.org/@adapt-retail/print-data/-/print-data-0.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB0WaYrfkA1oS3xjPpvVHUWhbOneYxhsFiHN+OTy/+klAiEAp73Yav/WL6DsNeDhLY+laG/X1sfzrlT8g8nrv9AaI7k="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/print-data-0.0.5.tgz_1516711974527_0.04439869266934693"}},"1.0.0":{"name":"@adapt-retail/print-data","version":"1.0.0","description":"Communicate with the API and Adapt the same way using the same syntax, even when you work local or in Adapt","main":"dist/AdaptPrintData.js","dependencies":{"@adapt-retail/banner-data":"^0.1.0","mustache":"^2.3.0"},"devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.22.0","babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.1"},"scripts":{"test":"ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"homepage":"https://github.com/AdaptRetail/print-data#readme","ava":{"require":["./test/helpers/setup-browser-env.js"]},"gitHead":"12c0bf09bcb89750767bbd809d703bc38f310b7c","_id":"@adapt-retail/print-data@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.2.1","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-JHD/A+NsdM9qY8ElPv3Px/hCxd1kh93baNYzKK71bvuVAQFJHFf/zxZZxybaJClNTAV/yAoSynM8ly3CD8BxBQ==","shasum":"ac5402f9f23144e06e4269994608c9e57f608a8c","tarball":"https://registry.npmjs.org/@adapt-retail/print-data/-/print-data-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3BMozG5UWqNbfhpTuC0NWBahycstIBkM/AEib3bKkVAIgOlczd9ZENakh6mGM7awSmF5f47oUTEZZFFMcTEX33pU="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/print-data-1.0.0.tgz_1516713244404_0.8644974324852228"}}},"readme":"# Adapt Print Data\n> 🚧🚧 This project is currently in development, breaking changes may occur. 🚧🚧\n\n> Create Adapt print templates locally and push directly to Adapt without thinking of anything\n\n## Install\n\nInstall the package through npm\n\n```bash\nnpm install @adapt-retail/print-data\n```\n\n## Usage\n\n### Template class\n\n```js\n// Get the base class\nconst AdaptPrintData from '@adapt-retail/print-data';\n\n// Create your template\nclass Template extends AdaptPrintData {\n\n    /**\n     * This is the template of your production\n     * We will inject your data at the production\n     * and return this elements 'container' as this.template\n     *\n     * We uses mustache to add variables to template\n     * https://github.com/janl/mustache.js\n     *\n     * @return string\n     */\n    template() {\n        return `\n            <h1>{{ name }}</h1>\n            <img src=\"{{ image }}\">\n            <p class=\"price\">{{ price }}</p>\n        `;\n    }\n\n    /**\n     * Get the data to get information from Adapt Data\n     * We will build the AdaptData for you.\n     *\n     * @return Object\n     */\n    getAdaptData() {\n        return {\n            account: 'priceco58c12436f20b4',\n            project: 1,\n            campaign: 1,\n            production: 12,\n        }\n    }\n\n    /**\n     * You can use this function to format the data from Adapt.\n     * This data will be accessable in the template with mustache syntax\n     *\n     * @return Object\n     */\n    format( item ) {\n        return {\n            name: item.strangeName,\n            image: this.asset( ítem.image ),\n            price: parseFloat( item.price ).toFixed( 2 ),\n        }\n    }\n\n    /**\n     * If you need to run some javascript logic you can run it here.\n     * It will be executed after template is rendered to screen.\n     *\n     * You can use this.template to access the template in the template function\n     *\n     * @return void\n     */\n    script() {\n        // Add your logic\n        // this.template represents each element container;\n    }\n\n}\n\n// When ready just create your new Template class to execute logic\nnew Template;\n```\n\n## Development\n```bash\n# 1. Clone repository\n\n# 2. Install dependencies\nnpm install\n\n# 3. Run tests\nnpm run test\n\n# 3.1. Run test every time you save a file\nnpm run tdd\n\n# 4. Build files\nnpm run build\n\n# 5. Select version\nnpm version major|minor|patch\n\n# 6. Publish to npm\nnpm publish\n\n# Store version in git\ngit push && git push --tags\n```\n","maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"time":{"modified":"2022-04-04T11:25:49.190Z","created":"2017-10-23T23:09:33.424Z","0.0.0":"2017-10-23T23:09:33.424Z","0.0.1":"2017-10-26T07:42:41.995Z","0.0.2":"2017-11-09T18:47:43.798Z","0.0.3":"2017-11-23T00:22:39.671Z","0.0.4":"2018-01-22T14:55:37.818Z","0.0.5":"2018-01-23T12:52:54.621Z","1.0.0":"2018-01-23T13:14:05.371Z"},"homepage":"https://github.com/AdaptRetail/print-data#readme","repository":{"type":"git","url":"git+https://github.com/AdaptRetail/print-data.git"},"author":{"name":"Lasse S. Haslev"},"bugs":{"url":"https://github.com/AdaptRetail/print-data/issues"},"license":"ISC","readmeFilename":"README.md"}