{"id":21989206,"url":"https://github.com/micropackage/scripts","last_synced_at":"2025-10-07T07:29:45.674Z","repository":{"id":40668219,"uuid":"239736394","full_name":"micropackage/scripts","owner":"micropackage","description":"Simpler @wordpress/scripts equivalent - minimal and configurable Webpack setup","archived":false,"fork":false,"pushed_at":"2025-05-26T10:38:31.000Z","size":2984,"stargazers_count":5,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-09-03T13:53:00.598Z","etag":null,"topics":["bracketspace","micropackage","scripts","webpack-configuration","wordpress"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micropackage.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":"2020-02-11T10:36:36.000Z","updated_at":"2025-05-26T10:38:34.000Z","dependencies_parsed_at":"2023-02-08T04:16:06.008Z","dependency_job_id":null,"html_url":"https://github.com/micropackage/scripts","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/micropackage/scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Fscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Fscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Fscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Fscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micropackage","download_url":"https://codeload.github.com/micropackage/scripts/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropackage%2Fscripts/sbom","scorecard":{"id":643006,"data":{"date":"2025-08-11","repo":{"name":"github.com/micropackage/scripts","commit":"c0d6b446df8f00b77addd2adcec6a444b8eeea0d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":10,"reason":"16 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/publish.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/test.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/micropackage/scripts/test.yml/develop?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:17","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-x3cc-x39p-42qx","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T11:20:18.034Z","repository_id":40668219,"created_at":"2025-08-21T11:20:18.035Z","updated_at":"2025-08-21T11:20:18.035Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278302556,"owners_count":25964519,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bracketspace","micropackage","scripts","webpack-configuration","wordpress"],"created_at":"2024-11-29T19:28:21.695Z","updated_at":"2025-10-07T07:29:45.656Z","avatar_url":"https://github.com/micropackage.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scripts\n\n[![BracketSpace Micropackage](https://img.shields.io/badge/BracketSpace-Micropackage-brightgreen)](https://bracketspace.com)\n[![npm](https://img.shields.io/npm/v/@micropackage/scripts)](https://www.npmjs.com/package/@micropackage/scripts)\n[![License](https://img.shields.io/npm/l/@micropackage/scripts)](https://www.npmjs.com/package/@micropackage/scripts)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://bracketspace.com/extras/micropackage/micropackage-small.png\" alt=\"Micropackage logo\"/\u003e\n\u003c/p\u003e\n\n## 🧬 About Scripts\n\nThis is a collection of scripts useful for (not only) WordPress development. Inspired by [@wordpress/scripts](https://www.npmjs.com/package/@wordpress/scripts), this package contianis essential tools with default configuration.\n\n## 💾 Installation\n\nYou only need to install one module:\n``` bash\nnpm install @micropackage/scripts --save-dev\n```\nor\n``` bash\nyarn add -D @micropackage/scripts\n```\n\n## 🕹 Usage\n\nThis package exposes a binary called `mp-scripts` which can be called directly with `npx` or `yarn`.\n``` bash\nnpx mp-scripts build\nyarn mp-scripts build\n```\nHowever it is intended to use this module in the `scripts` section in the `package.json` file of our project.\n\n``` json\n{\n\t\"scripts\": {\n\t\t\"build\": \"mp-scripts build\",\n\t\t\"lint:js\": \"mp-scripts lint-js\",\n\t\t\"lint:style\": \"mp-scripts lint-style\",\n\t\t\"start\": \"mp-scripts start\"\n\t}\n}\n```\n\n### WordPress Dependencies\n\nThis package uses the [Dependency Extraction Webpack Plugin](https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin) to extract wordpress dependencies. It does two things:\n* Externalize dependencies that are available as script dependencies on modern WordPress sites.\n* Add an asset file for each entry point that declares an object with the list of WordPress script dependencies for the entry point. The asset file also contains the current version calculated for the current source code.\n\nThis plugin is enabled by default with default configuration but can be easyli turned off by passing `--no-deps` flag to your build script:\n``` json\n{\n\t\"scripts\": {\n\t\t\"build\": \"mp-scripts build --no-deps\",\n\t}\n}\n```\n\nIf you need to use this plugin with other configuration (for example you want it to generate `json` files instead `php` - see the plugin's documentation) you can extend webpack config. See [Advanced Usage](https://www.npmjs.com/package/@micropackage/scripts#%EF%B8%8F-advanced-usage) for more information.\n\n### Using WordPress Dependencies\n\nLet's assume we are creating a Gutenberg block. We want to import `Component` class and some Gutenberg components to use in our block. Entry file would be `custom-block.js`:\n```javascript\nimport { Component } from '@wordpress/element';\nimport { Button, CheckboxControl } from '@wordpress/components';\n\n...\n```\n\nWhile running `mp-scripts build` command the [Dependency Extraction Webpack Plugin](https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin) will create additional php file containing an object with dependencies list and asset version. Note, that there is also no need to add imported packages to your `package.json` - since they are being externalized you don't need them in `node_modules`.\nThe output files for this scenario are:\n* `custom-block.js`\n* `custom-block.asset.php`\n\nBoth files are located in the output directory.\nThe php file will have the following content:\n```php\n\u003c?php return array('dependencies' =\u003e array('wp-components', 'wp-element', 'wp-polyfill'), 'version' =\u003e 'e7e3b282b35389ecd440edc71e073e5d'); ?\u003e\n```\nNote that `version` will change if your source changes.\n\nHere is a simple example of usage:\n```php\n\u003c?php\nadd_action( 'enqueue_block_editor_assets', function() {\n\t$dir        = plugin_dir_path( __FILE__ );\n\t$src        = \"{$dir}/dist/custom-block.js\";\n\t$asset_file = \"{$dir}/dist/custom-block.asset.php\";\n\n\tif ( file_exists( $src ) \u0026\u0026 file_exists( $asset_file ) ) {\n\t\t$asset_info = require $asset_file;\n\n\t\twp_enqueue_script(\n\t\t\t'custom-block',\n\t\t\t$src,\n\t\t\t$asset_info['dependencies'],\n\t\t\t$asset_info['version'],\n\t\t\ttrue\n\t\t);\n\t}\n} );\n?\u003e\n```\n\n## 📜 Available Scripts\n\n### `build`\nUses [webpack](https://webpack.js.org/) to transform your code. By default it will scan the source paths to automatically create an entry point for each file. Subfolders are not scanned, also files which names start with underscore are skipped. Entry points can be js and (s)css files. Using [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin) and a custom plugin for asset cleanup this will emit only css file for (s)css entry.\n\nThis script can be configured using CLI arguments or by setting up a `mpScriptsConfig` property in the `package.json`.\n\nAll arguments other than listed below will be directly passed to [webpack](https://webpack.js.org/).\n\n#### Configuration\n\n| Name              | Argument           | Type         | Description                                                                                                     |\n|-------------------|--------------------|--------------|-----------------------------------------------------------------------------------------------------------------|\n| **inlineAssets**  | true   | boolean\\|number    | Whether to use [url-loader](https://github.com/webpack-contrib/url-loader) for images. If number is passed it will be used as '[limit](https://github.com/webpack-contrib/url-loader#limit)' option.\u003cbr /\u003e**Default: `true`** |\n| **imagemin**      | --   | boolean\\|object  | Whether to use [image-webpack-loader](https://github.com/tcoopman/image-webpack-loader) to optimize images with [imagemin](https://github.com/imagemin/imagemin). Object will be passed as [image-webpack-loader](https://github.com/tcoopman/image-webpack-loader) configuration.\u003cbr /\u003e**Default: `true`** |\n| **paths.src**     | **--src-path**     | string | Source path relative to project root.\u003cbr /\u003e**Default: `'src/assets'`** |\n| **paths.output**  | **--output-path**  | string       | Output path relative to project root.\u003cbr /\u003e**Default: `'dist'`**                                                                           |\n| **paths.scripts** | **--scripts-path** | string         | Scripts path relative to `src\\|output`. Use `false` to skip this path.\u003cbr /\u003e**Default: `'js'`**                                                  |\n| **paths.styles**  | **--styles-path**  | string       | Styles path relative to `src\\|output`. Use `false` to skip this path.\u003cbr /\u003e**Default: `'scss'`**                                                   |\n| **paths.images**  | **--images-path**  | string       | Images path relative to `output`. Images included in scripts and styles will be placed in this location if `inlineAssets` is turned off or the image size exceeds `limit`.\u003cbr /\u003e**Default: `'images'`**                                                   |\n| **paths.fonts**  | **--fonts-path**  | Fonts       | Fonts path relative to `output`. Font files included in scripts and styles will be placed in this location.\u003cbr /\u003e**Default: `'fonts'`**                                                   |\n\n*Example:*\n```json\n{\n\t\"mpScriptsConfig\": {\n\t\t\"inlineAssets\": 8192,\n\t\t\"imagemin\": {\n\t\t\t\"svgo\": {\n\t\t\t\t\"plugins\": [\n\t\t\t\t\t{ \"removeDoctype\": false }\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"paths\": {\n\t\t\t\"src\": \"src/assets\",\n\t\t\t\"output\": \"dist\",\n\t\t\t\"scripts\": \"js\",\n\t\t\t\"styles\": \"scss\",\n\t\t}\n\t}\n}\n```\n\n#### Usage\n*Example:*\n```json\n{\n\t\"scripts\": {\n\t\t\"build\": \"mp-scripts build\",\n\t\t\"build:dev\": \"mp-scripts build --mode=development\",\n\t\t\"build:custom\": \"mp-scripts build entry-one.js entry-two.js --output-path=custom\",\n\t\t\"build:other\": \"mp-scripts build --entry-path=other/src --output-path=other/dist --scripts-path=scripts --styles-path=styles\"\n\t}\n}\n```\nHow to use it:\n- `yarn build` - builds the code for production using entries from `src/assets/js` and `src/assets/scss`. Only files located directly in this folders will be used. All file names starting with `_` (underscore) are skipped. Output files will be placed inside `dist/js` and `dist/css` directories\n- `yarn build:custom` - builds the code for production with two entry points and a custom output folder. Paths for custom entry points are relative to the project root.\n- `yarn build:other` - this will work like the default build, but will look for entries inside `other/src/scripts` and `other/src/styles` directories. Output files will be placed inside `other/dist/scripts` and `other/dist/styles`.\n\n#### Mode\n\nBy default `build` script will work in development mode. There are two ways to use another mode:\n* by adding `--mode` argument to your command\n* by setting NODE_ENV variable\n\n### `lint-js`\nLints your code using [eslint](https://eslint.org/).\nDefault linting ruleset is [@wordpress/eslint-plugin/recommended](https://www.npmjs.com/package/@wordpress/eslint-plugin). This can be overwriten by placing an [eslint](https://eslint.org/) config file in your project or specifing `eslintConfig` field in a `package.json`.\n\n*Example:*\n```json\n{\n\t\"scripts\": {\n\t\t\"lint:js\": \"mp-scripts lint-js\",\n\t\t\"fix:js\": \"mp-scripts lint-js --fix\",\n\t\t\"lint:js:src\": \"mp-scripts lint-js ./src\"\n\t}\n}\n```\n\nHow to use it:\n- `yarn lint:js` - lints JavaScript files in the entire project’s directories.\n- `yarn lint:js:src` - lints JavaScript files in the project’s src subfolder’s directories.\n\nBy default, files located in `dist`, `vendor` and `node_modules` folders are ignored.\n\n### `lint-style`\nUses [stylelint](https://stylelint.io/) to lint your style files.\n\n*Example:*\n```json\n{\n\t\"scripts\": {\n\t\t\"lint:style\": \"mp-scripts lint-style\",\n\t\t\"fix:style\": \"mp-scripts lint-style --fix\",\n\t\t\"lint:css:src\": \"mp-scripts lint-style 'src/**/*.css'\"\n\t}\n}\n```\nHow to use it:\n- `yarn lint:style` - lints CSS and SCSS files in the entire project’s directories.\n- `yarn lint:css:src` - lints only CSS files in the project’s src subfolder’s directories.\n\nBy default, files located in `dist`, `vendor` and `node_modules` folders are ignored.\n\n### `start`\nThis script works exactly like `build` but configured for development. It will also automatically rebuild if the code will change. All the params work the same way as in `build` script.\n\n*Example:*\n```json\n{\n    \"scripts\": {\n        \"start\": \"mp-scripts start\",\n        \"start:custom\": \"mp-scripts start --entry-path=custom/src --output-path=custom/build\"\n    }\n}\n```\n\n## 🕵️ Advanced Usage\n\nThis package ships with default config files for [eslint](https://eslint.org/), [stylelint](https://stylelint.io/) and [webpack](https://webpack.js.org/). Each config file can be overriden in your project.\n\n### Extending webpack config\n\nTo extend default [webpack](https://webpack.js.org/) config you can provide your own `webpack.config.js` file and `require` the provided `webpack.config.js` file. You can use spread operator to import parts of the config.\n\nIn the example below a webpack.config.js file is added to the root folder extending the provided [webpack](https://webpack.js.org/) config to include [url-loader](https://github.com/webpack-contrib/url-loader) for images:\n```javascript\nconst defaultConfig = require( \"@micropackage/scripts/config/webpack.config\" );\n\nmodule.exports = {\n\t...defaultConfig,\n\tmodule: {\n\t\t...defaultConfig.module,\n\t\trules: [\n\t\t\t...defaultConfig.module.rules,\n\t\t\t{\n\t\t\t\ttest: /\\.(png|jpg|gif)$/i,\n\t\t\t\tuse: [\n\t\t\t\t\t{\n\t\t\t\t\t\tloader: 'url-loader',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tlimit: 8192,\n\t\t\t\t\t\t\tname: '[name].[ext]',\n\t\t\t\t\t\t\toutputPath: 'images',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n};\n```\n\n### Run scripts in parallel or sequential\n\nThere are separate scripts to lint js and (s)css files, but it would be nice to have a single task to lint both. It can be accomplished using external modules, e.g. [npm-run-all](https://github.com/mysticatea/npm-run-all).\nUsing this module ypu can define scripts which will run other scripts in parallel or sequential using `run-p` or `run-s` commands.\n```json\n{\n\t\"scripts\": {\n\t\t\"lint:style\": \"mp-scripts lint-style\",\n\t\t\"lint:js\": \"mp-scripts lint-js\",\n\t\t\"fix:style\": \"mp-scripts lint-style --fix\",\n\t\t\"fix:js\": \"mp-scripts lint-js --fix\",\n\t\t\"lint\": \"run-p \\\"lint:*\\\"\",\n\t\t\"lint:fix\": \"run-p \\\"fix:*\\\"\",\n\t}\n}\n```\nWith the above config in your `package.json` you can run:\n* `yarn lint` - to run both `lint:style` and `lint:js` in parallel\n* `yarn lint:fix` - to run both `fix:style` and `fix:js` in parallel\n\n## 📦 About the Micropackage project\n\nMicropackages - as the name suggests - are micro packages with a tiny bit of reusable code, helpful particularly in WordPress development.\n\nThe aim is to have multiple packages which can be put together to create something bigger by defining only the structure.\n\nMicropackages are maintained by [BracketSpace](https://bracketspace.com).\n\n## 📖 Changelog\n\n[See the changelog file](./CHANGELOG.md).\n\n## 📃 License\n\nGNU General Public License (GPL) v3.0. See the [LICENSE](./LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropackage%2Fscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicropackage%2Fscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropackage%2Fscripts/lists"}