{"id":19219637,"url":"https://github.com/squirrel-forge/node-simple-webpack","last_synced_at":"2025-02-23T09:16:59.236Z","repository":{"id":57158008,"uuid":"432778853","full_name":"squirrel-forge/node-simple-webpack","owner":"squirrel-forge","description":"A thin node wrapper for webpack with some basic options and configuration.","archived":false,"fork":false,"pushed_at":"2022-10-13T08:55:31.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T19:30:54.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/squirrel-forge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-28T17:27:55.000Z","updated_at":"2021-12-29T17:03:54.000Z","dependencies_parsed_at":"2022-08-26T08:30:51.759Z","dependency_job_id":null,"html_url":"https://github.com/squirrel-forge/node-simple-webpack","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-simple-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-simple-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-simple-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-simple-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squirrel-forge","download_url":"https://codeload.github.com/squirrel-forge/node-simple-webpack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292392,"owners_count":19778311,"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":[],"created_at":"2024-11-09T14:32:19.789Z","updated_at":"2025-02-23T09:16:59.154Z","avatar_url":"https://github.com/squirrel-forge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @squirrel-forge/simple-webpack\nA thin node wrapper for webpack with some basic options and configuration.\nThe implemented config only deals with javascript, no other formats are supported and must be added via the extend option.\nSupports up to es2021, includes a babel and eslint setup and supplies the webpack bundle analyzer.\n\n## Installation\n```\nnpm i @squirrel-forge/simple-webpack\n```\n\n### Versions and compatibility\n - **0.13.x** - future version supporting *node 12.x* and above.\n - **0.12.x** - last version supporting *node 10.x*, see [compatibility notes](#compatibility).\n\n## cli usage\nIf you installed globally with the *-g* option.\n```\nsimple-webpack target -b --boolean --str=str\nsimple-webpack source target -b --boolean --str=str\n```\n\nFor local installations use *npx* to run the simple-webpack executable.\n```\nnpx simple-webpack ...\n```\n\n### Arguments\nThe source argument can be a single file path or folder.\nThe target argument must be a directory and will be created if it does not exist.\n\n#### Using only one argument\nthe source argument is omitted and assumed to be the current working directory.\n1. target - Path to write webpack asset files.\n\n#### Using two arguments\n1. source - Path from where to read, if a directory, files are handled as separated entry points.\n2. target - Path to write webpack asset files.\n\n### Options\nA long option always override the value of a short option if both are used.\n\n| Short | Long          | Type     | Description                                                                                                                             |\n|-------|---------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| -d    | --development | bool     | Development mode                                                                                                                        |\n| -p    | --production  | bool     | Production mode                                                                                                                         |\n|       | --no-minify   | bool     | Do not minify, sets the *optimization.minify* option to false                                                                           |\n|       | --keep-names  | bool     | Add terser with keep names options                                                                                                      |\n| -e    | --extend      | bool/str | Extend the webpack config using *webpack-merge*, optionally specify a path, default: cwd/*extend.webpack.config.js*                     |\n| -b    | --bundle      | bool     | Bundle all files in one entry                                                                                                           |\n| -n    | --name        | str      | Bundle name, default: 'bundle'                                                                                                          |\n| -m    | --modules     | str, ... | Prepend modules to each entry                                                                                                           |\n|       | --map         | bool/str | Enable source map via webpack devtool setting                                                                                           |\n|       | --index       | bool     | Recursively loads all *index.js* files from the source directory                                                                        |\n|       | --colors      | str, ... | Define verbose listing color kib limits, must be 3 integers \u003e 0                                                                         |\n| -y    | --show-config | bool     | Show options, source, target and generated webpack config                                                                               |\n|       | --defaults    | bool     | Deploy default .eslintrc and .babelrc to cwd or target directory                                                                        |\n| -s    | --stats       | bool     | Show stats output                                                                                                                       |\n| -a    | --analyze     | bool/str | Use a bool for a *static* report or *json/disabled*, the *server* option is not supported, use with *--stats* for additional stats.json |\n| -i    | --verbose     | bool     | Show additional info                                                                                                                    |\n| -u    | --loose       | bool     | Run in loose mode, disables the strict option                                                                                           |\n| -v    | --version     | bool     | Show the application version and check for updates                                                                                      |\n\n## NPM scripts\nWhen installed locally use following scripts.\n\n```\n...\n\"scripts\": {\n    \"js:render\": \"simple-webpack src/js dev/js -d\",\n    \"js:publish\": \"simple-webpack src/js dist/js -p\",\n}\n...\n```\n\n## Compatibility\n**Note:** When using node 10 you must use version *0.12.x*, critical fixes will be made if required, any new feature will only be available in higher versions.\n\n## Setup examples\nFor now there are no explicit examples to show the different implementation possibilities, use the *-y* or *--show-config* option to see how the webpack, source and target config are generated.\n\n## Api usage\nYou can require the SimpleWebpack class in your node script and run it, change internal options and extend it easily, look at the cli implementation and code comments to understand what to run in which order, currently there will be no extended documentation on the js api, since code comments should be sufficient to understand what works in which way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquirrel-forge%2Fnode-simple-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquirrel-forge%2Fnode-simple-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquirrel-forge%2Fnode-simple-webpack/lists"}