{"id":16431833,"url":"https://github.com/coreybutler/productionline-web","last_synced_at":"2025-03-21T04:32:15.453Z","repository":{"id":30495704,"uuid":"124612668","full_name":"coreybutler/productionline-web","owner":"coreybutler","description":"An extension of productionline, providing common web/UI build capabilities.","archived":false,"fork":false,"pushed_at":"2023-01-04T00:42:51.000Z","size":1034,"stargazers_count":5,"open_issues_count":13,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T08:32:47.297Z","etag":null,"topics":["build-tool","minify","nodejs","npm-scripts","productionline","transpile"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coreybutler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["coreybutler"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-03-10T01:54:06.000Z","updated_at":"2024-03-14T14:03:08.000Z","dependencies_parsed_at":"2023-01-14T17:04:56.529Z","dependency_job_id":null,"html_url":"https://github.com/coreybutler/productionline-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fproductionline-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fproductionline-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fproductionline-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fproductionline-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreybutler","download_url":"https://codeload.github.com/coreybutler/productionline-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221811344,"owners_count":16884305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","minify","nodejs","npm-scripts","productionline","transpile"],"created_at":"2024-10-11T08:32:55.298Z","updated_at":"2024-10-28T09:23:10.505Z","avatar_url":"https://github.com/coreybutler.png","language":"JavaScript","funding_links":["https://github.com/sponsors/coreybutler"],"categories":[],"sub_categories":[],"readme":"# productionline-web [![Build Status](https://travis-ci.org/coreybutler/productionline-web.svg?branch=master)](https://travis-ci.org/coreybutler/productionline-web) [![Greenkeeper badge](https://badges.greenkeeper.io/coreybutler/productionline-web.svg)](https://greenkeeper.io/)\n\n`npm install productionline-web --save-dev`\n\nAn extension to [productionline](https://github.com/coreybutler/productionline) that adds common tasks for build web applications (ie minification, munging, concatenation, etc).\n\nThe are a number of additional methods this class adds to productionline, including:\n\n- `sourcemapurl` _attribute_ (Sourcemap URL root)\n- `transpile(filepath)` - Transpile a file to ES5 (Babel)\n- `minify()` - Minify a block of CSS code.\n\nThere are also a number of additional tasks:\n\n- `clean()` - Clears the output directory.\n- `copyAssets()` - Copies a common assets directory from the source to the output directory.\n- `buildHTML()` - Copies HTML to the output directory.\n- `buildJavaScript()` - Copies a transpiled version of JS files to the output directory.\n- `buildCSS()` - Copies a minified version of CSS files to the output directory.\n- `make()` (see below)\n\n### Standard \"Make\" Process\n\nIt is worth looking at the source for the `make()` method. By default, this method will copy assets from the source to destination and minify CSS/JS. This can and often will be overridden with logic suitable for your build process (example: adding transpilation or code concatenation).\n\n## Examples\n\nSee the examples, and feel free to submit PR's with new examples.\n\n## Basic Use\n\nThe source code is well documented with several feature methods.\n\nThe following would go in a file called `build.js`.\n\n```js\nconst Builder = ('productionline-web')\nconst path = require('path')\nconst builder = new Builder({\n  commands: {\n    '--make': () =\u003e {\n      console.log('Running Build Process:')\n\n      // The following are not explicitly necessary since the source,\n      // assets, and destination are all being set to their defaults.\n      // However; the code is written so you can supply your own\n      // folder structure.\n      builder.source = path.resolve('./src')\n      builder.assets = path.resolve('./assets') // Relative to source!\n      builder.destination = path.resolve('./dist')\n\n      // Queue the built-in build process.\n      builder.make()\n      builder.run()\n    }\n  }\n})\n```\n\nIn the `package.json` file, add an npm command like:\n\n```js\n{\n  \"scripts\": {\n    \"test\": \"...\",\n    \"build\": \"node build.js --make\"\n  }\n}\n```\n\nThe entire process can then be run using `npm run build`.\n\n## Live Builds\n\nDuring development, it's often useful to monitor source code and rebuild whenever a file changes. To support this, productionline contains a `watch`\ntask, which will remain running and respond to file system changes.\n\nFor example:\n\n```js\nbuilder.watch((action, filepath) =\u003e {\n  builder.make()\n  builder.run()\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreybutler%2Fproductionline-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreybutler%2Fproductionline-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreybutler%2Fproductionline-web/lists"}