{
"info": {
"author": "Simples Consultoria",
"author_email": "products@simplesconsultoria.com.br",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Framework :: Buildout",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Build Tools"
],
"description": "*************************\nsc.recipe.staticresources\n*************************\n\n.. contents:: Table of Contents\n\nLife, the Universe, and Everything\n==================================\n\nThis Buildout recipe is used to integrate Plone and `webpack `_.\n\nIn recent years, many tools were created to manage static resource files, these tools can:\n\n* automatically compress images\n* use CSS pre and post-processors to write less and better code, taking advantage of new standards still not available to all browsers\n* use JavaScript transpilers to write ES6 code and generate ES5 equivalent code, that works on all browsers\n* minify the resulting code\n\nAnd many other options, practically everything related to process static resources can be achived by an official or community package.\n\nThis recipe let's you write less lines into your Buildout configuration and provides a nice template to start with.\n\nWe choose `webpack`_ because it's proven to be the best toolchain available, and many people in the Plone community are already using it.\n\nMostly Harmless\n===============\n\n.. image:: http://img.shields.io/pypi/v/sc.recipe.staticresources.svg\n :target: https://pypi.python.org/pypi/sc.recipe.staticresources\n\n.. image:: https://img.shields.io/travis/simplesconsultoria/sc.recipe.staticresources/master.svg\n :target: http://travis-ci.org/simplesconsultoria/sc.recipe.staticresources\n\n.. image:: https://img.shields.io/coveralls/simplesconsultoria/sc.recipe.staticresources/master.svg\n :target: https://coveralls.io/r/simplesconsultoria/sc.recipe.staticresources\n\nGot an idea? Found a bug? Let us know by `opening a support ticket `_.\n\nDon't Panic\n===========\n\nInstallation\n\nTo enable this product in a buildout-based installation:\n\n#. Edit your buildout.cfg and add these lines:\n\n.. code-block:: ini\n\n [buildout]\n ...\n parts +=\n node\n staticresources\n\n [node]\n recipe = gp.recipe.node\n version = 8.11.2\n npms = npm yarn\n scripts = npm yarn\n\n [staticresources]\n recipe = sc.recipe.staticresources\n name = my.package\n short_name = mypackage\n\nAfter updating the configuration you need to run ''bin/buildout'', which will take care of updating your system.\n\nThe recipe is responsible for:\n\n* creating the `webpack`_ folder structure, if none exists\n* creating the script to access `webpack`_ environment to handle more complex scenarios\n* create all scripts listed in ``webpack/package.json`` scripts entries.\n\nConfiguration options\n---------------------\n\nname (required)\n^^^^^^^^^^^^^^^\nThis is the package name or the theme name used in the package.\nThis field is required.\n\nshort_name (required)\n^^^^^^^^^^^^^^^^^^^^^\nA short name is needed to be used as the UMD JavaScript library name and the name of the script inserted into Plone.\nThis field is required.\n\ndirectory\n^^^^^^^^^\nRelative path to webpack folder, you can use this field to define more than one webpack folder for different themes.\nIf this option is not present, the default value is ``${buildout:directory}/webpack``.\n\ndestination\n^^^^^^^^^^^\nDestination path relative to webpack directory, you should add this option to point the resulting static resources folder,\nit can be the theme folder or a static resources directory.\nIf this option is not present, the default value is ``./dist`` folder.\n\nbobtemplate\n^^^^^^^^^^^\nCustom webpack bobtemplate path.\nIt's possible to change the default bobtemplate path to another that follows your project needs, if you prefer.\nIf this option is not present, the default value is the bobtemplate that exists into this package.\n\nThe default template\n--------------------\nIn the default template we selected what webpack tools are valid to our needs, what is basically theme and addons development.\nThis is the list of what we include:\n\n`HTML Loader `_\n Used to process the HTML file; in our use case it's used when we create a new theme.\n\n`Image Webpack Loader `_\n Process all images referenced to save space in the final images,\n it tile the workflow with some specialized tools for each image format.\n\n`SVG URL Loader `_\n Process all SVG files and creates a data-url string.\n For example it inserts the SVG file into the final CSS file to save requests.\n\n`Webpack SpriteSmith `_\n Brings an easy way to create image sprites,\n you simply add the icon images in one folder and it creates all you need to use the sprite with your choosen CSS pre-processor.\n\n`Babel `_\n A transpiler that makes possible to use the next generation of JavaScript today.\n\n`Sass `_\n The most mature, stable, and powerful professional grade CSS extension language in the world.\n\n`PostCSS `_\n A post-processor used to transform styles with JavaScript plugins.\n In our configuration we use `PostCSS Preset Env `_ plugin to add automatically all vendor prefixes for the last 3 versions of major browsers,\n as soon as the browsers support more features your final CSS will automatically cost less bytes.\n\n`HardSourceWebpackPlugin `_\n This plugin provides an intermediate caching step for modules.\n\nJavaScript Helper\n-----------------\nThere's a little helper created to simplify the configuration burden of add-ons that use this recipe.\nLet's see how to use it:\n\n1. Create a ``package.json`` file with the following:\n\n.. code-block:: json\n\n {\n \"name\": \"my.package\",\n \"version\": \"0.0.1\",\n \"main\": \"app/mypackage.js\",\n \"scripts\": {\n \"build\": \"./node_modules/.bin/webpack -p\",\n \"debug\": \"NODE_ENV=debug ./node_modules/.bin/webpack --watch\",\n \"watch\": \"./node_modules/.bin/webpack -p --watch\",\n \"test\": \"NODE_ENV=testing ./node_modules/.bin/karma start --single-run\"\n },\n \"repository\": {},\n \"license\": \"GPL-2.0\",\n \"dependencies\": {\n \"sc-recipe-staticresources\": \"simplesconsultoria/sc.recipe.staticresources#1.1b4\"\n }\n }\n\nThis way it's possible to add all dependencies of the configuration with just one line,\nkeeping versions well tested across all ecosystems just like Buildout's versions do.\n\n2. Create a ``webpack.config.js`` file with the following:\n\n.. code-block:: javascript\n\n const makeConfig = require('sc-recipe-staticresources');\n const CopyWebpackPlugin = require('copy-webpack-plugin');\n\n module.exports = makeConfig(\n // name\n 'my.package',\n\n // shortName\n 'mypackage',\n\n // path\n `${__dirname}/dist`,\n\n //publicPath\n `${__dirname}/../src/my/package/browser/static`,\n\n //callback\n function(config, options) {\n config.entry.unshift(\n './app/img/img1.png',\n './app/img/img2.png',\n './app/img/img3.png',\n );\n config.plugins.push(\n new CopyWebpackPlugin([{\n from: 'app/folder/*',\n to: 'folder',\n flatten: true\n }]),\n );\n\n },\n );\n\nThis way it's possible to inherit a configuration of all dependencies in the current version.\n\nOur mrbob template generates this configuration when the recipe is run for the first time.\nYou can modify it to fit your needs,\nbut for most themes and add-ons these defaults are a good starting point (something similar to Buildout's extend configuration).\n\nUsage\n-----\n\nIn our simplest example, the following scripts are created:\n\n.. code-block:: console\n\n $ bin/env-mypackage\n\nThis command sets the buildout node installation in the system PATH, this way you can use webpack as described in their docs.\n\n.. code-block:: console\n\n $ bin/watch-mypackage\n\nThis command makes webpack wait for any change in any SASS, JS (ES6) files and generates the minified version of CSS and JS (ES5) UMD module for your application.\n\n.. code-block:: console\n\n $ bin/debug-mypackage\n\nThis does the same as watch command, but don't try to minify the final CSS and JS.\nUsed for debug purposes.\n\n.. code-block:: console\n\n $ bin/build-mypackage\n\nThis command builds the CSS and JS minified, but doesn't wait for any change.\n\n.. code-block:: console\n\n $ bin/test-mypackage\n\nThis command runs the JavaScript tests using `karma `_, `mocha `_, `chai `_ and `sinon `_.\n\nNote that ``short_name`` is added at the end of the script name.\nThis way you can have multiple webpack folders in the same package (if you have multiple themes inside the same package, for example).\n\nShare and Enjoy\n===============\n\nThis package would not have been possible without the contribution of the following people:\n\n- Rodrigo Ferreira de Souza\n- H\u00e9ctor Velarde\n\nChangelog\n=========\n\n1.1b7 (2019-10-02)\n------------------\n\n- Respect Plone external URL (closes `#44 `_).\n [rodfersou]\n\n- Fixes on Karma tests.\n [rodfersou]\n\n\n1.1b5 (2018-10-05)\n------------------\n\n- Replace deprecated ``cssnext`` module with `PostCSS Preset Env`_ (closes `#37 `_).\n [rodfersou]\n\n- Include `HardSourceWebpackPlugin`_ in default configuration;\n this plugin provides an intermediate caching step for modules that can speed up bundle generation up to 70% (closes `#49 `_).\n [rodfersou]\n\n- Fix typo on resources viewlet template.\n [rodfersou]\n\n\n1.1b4 (2018-10-03)\n------------------\n\n- Fix in JavaScript helper.\n [rodfersou]\n\n\n1.1b3 (2018-10-03)\n------------------\n\n- Fix node package version.\n [rodfersou]\n\n\n1.1b2 (2018-10-03)\n------------------\n\n- Use a callback to fine tune the configuration at javascript helper.\n [rodfersou]\n\n- Review to add Sprite plugin just if necessary.\n [rodfersou]\n\n- Review to add SCSS files just if necessary.\n [rodfersou]\n\n- Use script async by default.\n [rodfersou]\n\n- Fix library definition to work with Plone 5.\n [thet, rodfersou]\n\n- Emit current package version in package.json configuration (closes `#40 `_).\n [rodfersou]\n\n\n1.1b1 (2018-09-28)\n------------------\n\n- Create a module to reuse configuration.\n [rodfersou]\n\n\n1.0b1 (2018-08-24)\n------------------\n\n- Change template to use a package Known-Good-Set (KGS).\n [rodfersou]\n\n- Update package versions.\n [rodfersou]\n\n\n1.0a2 (2018-01-24)\n------------------\n\n- Review how HTML and CSS are processed (closes `#23 `_).\n [rodfersou]\n\n- Remove old scripts generated by this recipe after buildout run (closes `#21 `_).\n [rodfersou]\n\n- Rename script to debug instead of dev to avoid misunderstanding (closes `#22 `_).\n [rodfersou]\n\n- Fix webpack installation conflict (closes `#25 `_).\n [rodfersou]\n\n- Fix package license typo on template.\n [hvelarde]\n\n- Run build command after update recipe (closes `#18 `_).\n [rodfersou]\n\n- Add an error log if directory parameter is invalid.\n [rodfersou]\n\n\n1.0a1 (2017-11-21)\n------------------\n\n- Initial release.",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/simplesconsultoria/sc.recipe.staticresources/",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "sc.recipe.staticresources",
"package_url": "https://pypi.org/project/sc.recipe.staticresources/",
"platform": "",
"project_url": "https://pypi.org/project/sc.recipe.staticresources/",
"project_urls": {
"Homepage": "http://github.com/simplesconsultoria/sc.recipe.staticresources/"
},
"release_url": "https://pypi.org/project/sc.recipe.staticresources/1.1b7/",
"requires_dist": null,
"requires_python": "",
"summary": "FIXME",
"version": "1.1b7"
},
"last_serial": 5920700,
"releases": {
"1.0a1": [
{
"comment_text": "",
"digests": {
"md5": "b4ef1fd0b9adc01e9c4c358b27cb175b",
"sha256": "ab54a2987a1c20f8c0207383131664a04534ccb97dcb342ab650918d935956b4"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.0a1.tar.gz",
"has_sig": false,
"md5_digest": "b4ef1fd0b9adc01e9c4c358b27cb175b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19091,
"upload_time": "2017-11-21T20:08:00",
"url": "https://files.pythonhosted.org/packages/36/f4/4ee1edcecfadc615193cc279c18cdd68b5bd9f83d35825b58df569284231/sc.recipe.staticresources-1.0a1.tar.gz"
}
],
"1.0a2": [
{
"comment_text": "",
"digests": {
"md5": "d2be6d7afaf3717755a537d9750a9981",
"sha256": "d2fe0bc3a4bab3e2b7ec4bd675c07658dbb18626279b48a8b7751b2fe57ed1ee"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.0a2.tar.gz",
"has_sig": false,
"md5_digest": "d2be6d7afaf3717755a537d9750a9981",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20220,
"upload_time": "2018-01-24T17:50:12",
"url": "https://files.pythonhosted.org/packages/b9/6a/d14bcb8842bce834214ea524c217d63ebd8070b6306d78014e33fdc3dbbd/sc.recipe.staticresources-1.0a2.tar.gz"
}
],
"1.0b1": [
{
"comment_text": "",
"digests": {
"md5": "650c88b8b136da3a581639d21aeb26c2",
"sha256": "dc850568d1830ceb21e56d30b943f55c58453b59fa3d588faedfcfa81cdcdfaa"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.0b1.tar.gz",
"has_sig": false,
"md5_digest": "650c88b8b136da3a581639d21aeb26c2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20142,
"upload_time": "2018-08-24T19:54:34",
"url": "https://files.pythonhosted.org/packages/84/f5/4cd95f36197da88bb814a2fa2d6199a412e2d6b3442bdf4b3ceafc1217f3/sc.recipe.staticresources-1.0b1.tar.gz"
}
],
"1.1b1": [
{
"comment_text": "",
"digests": {
"md5": "60727c5518be811ee54dab1b6efa45ee",
"sha256": "273f417855d33ef45c78ddf7af7602c0cec6888a185b8173536fdd07e169c294"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b1.tar.gz",
"has_sig": false,
"md5_digest": "60727c5518be811ee54dab1b6efa45ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21032,
"upload_time": "2018-09-28T16:57:43",
"url": "https://files.pythonhosted.org/packages/23/94/a4eaf403eecb7ed2c801d47d00bdbe0ce76053310ad7b0beb0d42adfe8ca/sc.recipe.staticresources-1.1b1.tar.gz"
}
],
"1.1b2": [
{
"comment_text": "",
"digests": {
"md5": "224c62b8ff224ce3b734c8184edb74b2",
"sha256": "0f3fea485cd04e97f4c2d903957a9f0f66082527f17b1bb0bae8dec1339e487e"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b2-py2-none-any.whl",
"has_sig": false,
"md5_digest": "224c62b8ff224ce3b734c8184edb74b2",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": null,
"size": 19050,
"upload_time": "2018-10-03T14:33:00",
"url": "https://files.pythonhosted.org/packages/c5/46/0bcdfff1c0779756a7d7f60afb6144ead4cd3aee6f6c7ffca1a27d679ed1/sc.recipe.staticresources-1.1b2-py2-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "a7f06ba36be3a44136200172ea2dd292",
"sha256": "7f079b93ce9c4e006ade9fd7902efba15c129f404b1b2f32ec1646fca416b0f4"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b2.tar.gz",
"has_sig": false,
"md5_digest": "a7f06ba36be3a44136200172ea2dd292",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27517,
"upload_time": "2018-10-03T14:33:02",
"url": "https://files.pythonhosted.org/packages/a6/a1/2cf3770188463a2b109793e088d36d209eef3e4024c4eb63d20d078307b1/sc.recipe.staticresources-1.1b2.tar.gz"
}
],
"1.1b3": [
{
"comment_text": "",
"digests": {
"md5": "1bf088dd5f0ea304940594d43b925f43",
"sha256": "40a8f29663b7a080cce5d278eb525533685140e208e56597469c59cfd6b1dfe0"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b3.tar.gz",
"has_sig": false,
"md5_digest": "1bf088dd5f0ea304940594d43b925f43",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18972,
"upload_time": "2018-10-03T14:54:22",
"url": "https://files.pythonhosted.org/packages/1d/02/e7621a76198bcd4929ad00368aadca8aedda938ad105614698398e582adc/sc.recipe.staticresources-1.1b3.tar.gz"
}
],
"1.1b4": [
{
"comment_text": "",
"digests": {
"md5": "1c6f3db1ad72ab5ff2957196580992c3",
"sha256": "02f5d5ebe6cb827cf491f38a3197af8a6ae2f113d77260d4696f89f87c9ec0d1"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b4.tar.gz",
"has_sig": false,
"md5_digest": "1c6f3db1ad72ab5ff2957196580992c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18998,
"upload_time": "2018-10-03T15:02:54",
"url": "https://files.pythonhosted.org/packages/a1/31/6dc45e64d904d70c5c6d11302d27505ec141e281811ce97046d57355c327/sc.recipe.staticresources-1.1b4.tar.gz"
}
],
"1.1b5": [
{
"comment_text": "",
"digests": {
"md5": "e8cfb55d07b3af0694087a901c732289",
"sha256": "6c2d640292ab77f8aee8d9950caed33f25e8319ef319f46ffc77fac25faaee5c"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b5.tar.gz",
"has_sig": false,
"md5_digest": "e8cfb55d07b3af0694087a901c732289",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19506,
"upload_time": "2018-10-05T20:11:29",
"url": "https://files.pythonhosted.org/packages/73/7d/e068ac69bf89587c0576313f1be55b5b2e48781d8d4c8a452181be4c2263/sc.recipe.staticresources-1.1b5.tar.gz"
}
],
"1.1b6.dev0": [
{
"comment_text": "",
"digests": {
"md5": "974d6fc62d5cbe935677efd95010228d",
"sha256": "e41d72272a3146d4a273193eb3caf896aba7897d159e67a35b9854abcee839bf"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b6.dev0.tar.gz",
"has_sig": false,
"md5_digest": "974d6fc62d5cbe935677efd95010228d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25113,
"upload_time": "2019-10-02T21:29:58",
"url": "https://files.pythonhosted.org/packages/74/a1/74e76c1a4a9cf9e3e98353ecdea722c096a9115284a78c04d1881a4a0bb2/sc.recipe.staticresources-1.1b6.dev0.tar.gz"
}
],
"1.1b7": [
{
"comment_text": "",
"digests": {
"md5": "b1fa865323897b6c3d174035e1df3fc2",
"sha256": "b46ac222ce5b74f4a99b50e667957ba1cfb46a2ebed9fbaf06a3dbe97de99234"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b7.tar.gz",
"has_sig": false,
"md5_digest": "b1fa865323897b6c3d174035e1df3fc2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25101,
"upload_time": "2019-10-02T21:45:34",
"url": "https://files.pythonhosted.org/packages/04/f6/02601214155f0118561c40d658f3a5a3137a95c081a811da30fcd6c8ed50/sc.recipe.staticresources-1.1b7.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "b1fa865323897b6c3d174035e1df3fc2",
"sha256": "b46ac222ce5b74f4a99b50e667957ba1cfb46a2ebed9fbaf06a3dbe97de99234"
},
"downloads": -1,
"filename": "sc.recipe.staticresources-1.1b7.tar.gz",
"has_sig": false,
"md5_digest": "b1fa865323897b6c3d174035e1df3fc2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25101,
"upload_time": "2019-10-02T21:45:34",
"url": "https://files.pythonhosted.org/packages/04/f6/02601214155f0118561c40d658f3a5a3137a95c081a811da30fcd6c8ed50/sc.recipe.staticresources-1.1b7.tar.gz"
}
]
}