{
"info": {
"author": "Baruch Sterin",
"author_email": "lektor-npm-support@bsterin.com",
"bugtrack_url": null,
"classifiers": [],
"description": "# lektor-npm-support\n\n[](https://travis-ci.org/sterin/lektor-npm-support)\n[](https://ci.appveyor.com/project/sterin/lektor-npm-support)\n[](https://codecov.io/gh/sterin/lektor-npm-support)\n\n`lektor-npm-support` makes it easy to use [Parcel](https://parcel.js.org), [webpack](https://webpack.js.org), [browserify](http://browserify.org/), or any other tool to build assets for [Lektor](https://github.com/lektor/lektor) projects. \n\n## Enabling the Plugin\n\nTo enable the plugin, run this command while inside your Lektor project directory:\n\n```bash\nlektor plugins add lektor-npm-support\n```\n\n## Example: Creating a [Parcel](https://parceljs.org/) Project\n\nCreate a `parcel/` folder and inside that folder create the following files:\n\n### `configs/npm-support.ini`\n\nThis file instructs the plugin how to generate the assets:\n\n```ini\n[parcel]\nnpm = yarn\nwatch_script = watch\nbuild_script = build\n```\n\n* The section name `[parcel]` is the name of the folder where the Parcel project is located.\n* `npm` is the package manager command used to build the project. This example will use [Yarn](https://yarnpkg.com).\n* `watch_script` is the npm script used in `lektor server -f npm`,\n* `build_script` is the npm script used in `lektor build -f npm`.\n\nThis plugin supports more than one such entry.\n\n### `parcel/package.json`\n\nThis is a standard `package.json` file. It should contain two entries in the `scripts` section. The `build` script is used during `lektor build -f npm`, and the `watch` script is used during `lektor server -f npm`.\n\n```json\n{\n \"name\": \"my-parcel-project\",\n \"version\": \"1.0.0\",\n \"scripts\": {\n \"watch\": \"NODE_ENV=development parcel --out-dir=../assets/static/gen --out-file=main.js --public-url=./assets/ main.js\",\n \"build\": \"NODE_ENV=production parcel build --out-dir=../assets/static/gen --out-file=main.js --public-url=./assets/ main.js\"\n },\n \"private\": true\n}\n```\n\nNow we can use `yarn add` to add Parcel, [Babel](https://babeljs.io/) and [Sass](https://sass-lang.com/):\n\n```\n$ cd /parcel\n$ yarn add parcel-bundler babel-preset-env node-sass\n```\n\n### `parcel/babelr.rc`\n\nNext up is a simple Babel config file, using the recommended `env` preset.\n\n```json\n{\n \"presets\": [\"env\"]\n}\n```\n\n### `parcel/main.scss`\n\nA simple SCSS file.\n\n```scss\nbody {\n border: 10px solid red;\n}\n```\n\n### `parcel/main.js`\n\nA simple Javascript file that imports the SCSS file so that Parcel will know to include it as well.\n\n```javascript\nimport './main.scss';\n```\n\n## Running the Server\n\nNow you're ready to go. When you run `lektor server` nothing wil happen, \ninstead you need to now run it as `lektor server -f npm` which\nwill enable the Parcel build. Parcel will automatically build your files\ninto `assets/static/gen` and this is where Lektor will then pick up the\nfiles. This is done so that you can ship the generated assets\nto others that might not have these tools, which simplifies using a\nLektor website that use this plugin.\n\n## Manual Builds\n\nTo manually trigger a build that also invokes webpack you can use `lektor build -f npm`.\n\n## Including The Files\n\nNow you need to include the files in your template. This will do it:\n\n```html\n\n\n```\n\n## Complete Working Example\n\nThe `examples` folder of this repository contains working projects.\n\n\n## Credits\n\nThis plugin is based on the official [lektor-webpack-support](https://github.com/lektor/lektor-webpack-support) Lektor plugin by [Armin Ronacher](http://lucumr.pocoo.org/about/).",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/sterin/lektor-npm-support",
"keywords": "",
"license": "BSD",
"maintainer": "",
"maintainer_email": "",
"name": "lektor-npm-support",
"package_url": "https://pypi.org/project/lektor-npm-support/",
"platform": "",
"project_url": "https://pypi.org/project/lektor-npm-support/",
"project_urls": {
"Homepage": "http://github.com/sterin/lektor-npm-support"
},
"release_url": "https://pypi.org/project/lektor-npm-support/0.1.4/",
"requires_dist": null,
"requires_python": "",
"summary": "Adds support for using npm/yarn to build assets in Lektor",
"version": "0.1.4"
},
"last_serial": 3857825,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "0b30a74d8e061b4f7f90411b9c2ecc07",
"sha256": "829efad7a1a224bccb3ce26002171aab74380bc8e66e5322666090da2336abec"
},
"downloads": -1,
"filename": "lektor_npm_support-0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "0b30a74d8e061b4f7f90411b9c2ecc07",
"packagetype": "bdist_wheel",
"python_version": "2.7",
"requires_python": null,
"size": 4931,
"upload_time": "2018-02-23T11:57:05",
"url": "https://files.pythonhosted.org/packages/f6/55/55ebefa32e1cbf7623fdcd0bec73e29d1f8f3a82d8728e723dfcdc732e5f/lektor_npm_support-0.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d2b7f4cfe43b7b26979f8572e9a1412c",
"sha256": "70c2b37269f03db5986b7701db796dd5a14735621437d7dff703c71ccf329852"
},
"downloads": -1,
"filename": "lektor-npm-support-0.1.tar.gz",
"has_sig": false,
"md5_digest": "d2b7f4cfe43b7b26979f8572e9a1412c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4718,
"upload_time": "2018-02-23T11:57:02",
"url": "https://files.pythonhosted.org/packages/18/53/ad9e7f3a8b0a65a1fec64d8a3131f06ee8b9c6123c53cfc1170946f11018/lektor-npm-support-0.1.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "40968f3e4174a3d5a6d808ab35fa42c9",
"sha256": "2ec87da9c81f778e99f4ddc1ddc490cb2588cc9bcef2b52f2ba88ed278d7e180"
},
"downloads": -1,
"filename": "lektor-npm-support-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "40968f3e4174a3d5a6d808ab35fa42c9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4752,
"upload_time": "2018-02-23T13:43:45",
"url": "https://files.pythonhosted.org/packages/f4/7a/a6e2bb76b5696415cacdb0c7dfaf6951464b85f1d25f633d4abd3f390abf/lektor-npm-support-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "4246f53e5e646efecf5cef5730ea17c9",
"sha256": "74d594b0c03fbe0a347f85a370d32605891c70ddd8bd112812bd407068369dd9"
},
"downloads": -1,
"filename": "lektor-npm-support-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "4246f53e5e646efecf5cef5730ea17c9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5339,
"upload_time": "2018-05-12T23:36:56",
"url": "https://files.pythonhosted.org/packages/5e/64/4c913dc23630e757ba913ce4f92a6d1e426b75869cb9f1b99b598e848969/lektor-npm-support-0.1.2.tar.gz"
}
],
"0.1.3": [
{
"comment_text": "",
"digests": {
"md5": "73617cf6e2a316d97f396804be6f82a2",
"sha256": "cc4b8ff2f920d5175dae6d5a42c5b7a8906e18b949d765434d4a977e08fcd4a3"
},
"downloads": -1,
"filename": "lektor-npm-support-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "73617cf6e2a316d97f396804be6f82a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5385,
"upload_time": "2018-05-12T23:40:52",
"url": "https://files.pythonhosted.org/packages/c8/b8/2d4272d770484432c219a808fe2cdc0e2a7d51f18a4680c13db6b1d4b248/lektor-npm-support-0.1.3.tar.gz"
}
],
"0.1.4": [
{
"comment_text": "",
"digests": {
"md5": "9c6ab22fe46dcc7eca678ed3b66e65fd",
"sha256": "4f69753f8776fe0398e59e1876d84fd00be9d89f3e59c9903ec56ddaedd70dc5"
},
"downloads": -1,
"filename": "lektor-npm-support-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "9c6ab22fe46dcc7eca678ed3b66e65fd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5406,
"upload_time": "2018-05-13T03:29:30",
"url": "https://files.pythonhosted.org/packages/12/0a/6b8b2182a5673498f1076dd5103edc798d7048a09a9a1d5b5797c458ef2b/lektor-npm-support-0.1.4.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "9c6ab22fe46dcc7eca678ed3b66e65fd",
"sha256": "4f69753f8776fe0398e59e1876d84fd00be9d89f3e59c9903ec56ddaedd70dc5"
},
"downloads": -1,
"filename": "lektor-npm-support-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "9c6ab22fe46dcc7eca678ed3b66e65fd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5406,
"upload_time": "2018-05-13T03:29:30",
"url": "https://files.pythonhosted.org/packages/12/0a/6b8b2182a5673498f1076dd5103edc798d7048a09a9a1d5b5797c458ef2b/lektor-npm-support-0.1.4.tar.gz"
}
]
}