{"id":18591775,"url":"https://github.com/rubixibuc/build-scripts","last_synced_at":"2026-03-15T09:03:44.322Z","repository":{"id":38421658,"uuid":"441980155","full_name":"rubixibuc/build-scripts","owner":"rubixibuc","description":"Batteries included webpack + module federation build and linting scripts","archived":false,"fork":false,"pushed_at":"2024-07-15T16:25:56.000Z","size":3830,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-16T19:18:18.505Z","etag":null,"topics":["eslint","frontend","prettier","stylelint","webpack"],"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/rubixibuc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-26T20:42:44.000Z","updated_at":"2024-07-15T16:25:37.000Z","dependencies_parsed_at":"2024-07-15T19:43:05.453Z","dependency_job_id":"8b79c832-4711-42eb-92fe-d6c37588f00f","html_url":"https://github.com/rubixibuc/build-scripts","commit_stats":null,"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"purl":"pkg:github/rubixibuc/build-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubixibuc%2Fbuild-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubixibuc%2Fbuild-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubixibuc%2Fbuild-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubixibuc%2Fbuild-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubixibuc","download_url":"https://codeload.github.com/rubixibuc/build-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubixibuc%2Fbuild-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30539501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-15T07:17:37.589Z","status":"ssl_error","status_checked_at":"2026-03-15T07:17:31.738Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["eslint","frontend","prettier","stylelint","webpack"],"created_at":"2024-11-07T01:04:44.465Z","updated_at":"2026-03-15T09:03:44.292Z","avatar_url":"https://github.com/rubixibuc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# build-scripts\n\nBatteries included [webpack](https://webpack.js.org/) + [module federation](https://webpack.js.org/concepts/module-federation/) build and linting scripts\n\n## Quick Start\n\n- create `./src/bootstrap.js` entry file\n- add optional [configuration](#configuration)\n- run directly\n  ```shell\n  npx @rubixibuc/build-scripts run\n  ```\n  or install globally\n  ```shell\n  npm i -g @rubixibuc/build-scripts\n  ```\n  ```shell\n  build-scripts run\n  ```\n\n## Usage\n\n- create `./src/bootstrap.js` entry file\n- add optional [configuration](#configuration)\n- add dependency to project\n  ```shell\n  npm i -D @rubixibuc/build-scripts\n  ```\n- add `start` and `build` scripts to package.json\n  ```json\n  {\n    \"scripts\": {\n      \"start\": \"build-scripts run\",\n      \"build\": \"build-scripts build\"\n    }\n  }\n  ```\n\n## CLI\n\n- `build`\n  Outputs production build to `./dist` folder\n  ```shell\n  build-scripts build\n  ```\n- `eslint`\n  Runs eslint against project files\n  ```shell\n  build-scripts eslint [-f, --fix] [-c, --cache] [-mw, --max-warnings \u003cmax-warnings\u003e] \u003cpaths/globs\u003e\n  ```\n- `prettier`\n  Runs prettier against project files\n  ```shell\n  build-scripts prettier [-f, --fix] \u003cpaths/globs\u003e\n  ```\n- `run`\n  Runs dev server\n  _if specified, command line port overrides setting from config_\n  ```shell\n  build-scripts run [-p, --port \u003cport\u003e]\n  ```\n- `stylelint`\n  Runs stylelint against project files\n  ```shell\n  build-scripts stylelint [-f, --fix] [-cs, --custom-syntax \u003ccustom-syntax\u003e] [-mw, --max-warnings \u003cmax-warnings\u003e] \u003cpaths/globs\u003e\n  ```\n\n## Configuration\n\n- example + defaults `build-scripts.config.js`\n  [configuration formats](https://github.com/davidtheclark/cosmiconfig#explorersearch)\n  ```javascript\n  // importing from separate files is a recommended pattern\n  module.exports = {\n    // app meta\n    background: \"#fff\",\n    // copy all files inside public folder to output destination folder\n    // undefined = autodetect (copy files if public folder exists)\n    // false = disable public folder copy\n    // true = force public folder copy\n    copy: void 0,\n    // module federation exposed paths\n    exposes: {},\n    // link tags [1]\n    links: [],\n    // favicons (all sizes generated)\n    // undefined = \"\u003cincluded image\u003e\"\n    logo: void 0,\n    // meta tags [1]\n    metas: [],\n    // obfuscator options [2]\n    // false = disabled\n    // {} = options\n    obfuscator: false,\n    // import web polyfills\n    // {} = custom polyfill configuration\n    // false = no polyfills\n    // undefined = include all polyfills\n    polyfill: {\n      // imports both \"core-js/stable\" and \"regenerator-runtime/runtime\"\n      // import \"@rubixibuc/build-scripts/polyfill/browser\" to add manually\n      // true = browser polyfill\n      // false = no browser polyfill\n      browser: true,\n      // imports both \"@webcomponents/webcomponentsjs\" and \"construct-style-sheets-polyfil\"\n      // import \"@rubixibuc/build-scripts/polyfill/component\" to add manually\n      // true = component polyfill\n      // false = no component polyfill\n      component: true,\n    },\n    // webpack dev server port\n    port: 8080,\n    // import src/preboot.(tsx|ts|jsx|js) before async bootstrap\n    // undefined = autodetect (import preboot.* file if it exists)\n    // false = ignore preboot.* file\n    // true = force import\n    preboot: void 0,\n    // module federation remotes\n    remotes: {},\n    // script tags [1]\n    scripts: [],\n    // module federation shared modules\n    shared: {},\n    // tailwindcss configuration [3]\n    // tailwindcss utility classes are automatically prefixed with varName below\n    // false = no tailwindcss\n    // {} = tailwindcss configuration\n    tailwindcss: false,\n    // app meta\n    themeColor: \"#fff\",\n    // site title\n    title: \"My App\",\n    // module federation var name\n    varName: \"myapp\",\n  };\n  ```\n  - [1] [tags documentation](https://github.com/jharris4/html-webpack-tags-plugin#configuration)\n  - [2] [obfuscator options](https://github.com/javascript-obfuscator/webpack-obfuscator#obfuscatoroptions)\n  - [3] [tailwindcss configuration](https://tailwindcss.com/docs/configuration)\n- example [`.lintstagedrc.json`](https://github.com/okonet/lint-staged)\n  ```json\n  {\n    \"*.js\": \"build-scripts eslint --cache --fix\",\n    \"*.css\": \"build-scripts stylelint --fix\",\n    \"*.{json,md}\": \"build-scripts prettier --fix\"\n  }\n  ```\n\n## Javascript Variants\n\n- `*.js`\n- `*.jsx`\n- `*.ts` (transpiles, but doesn't do build time typechecking)\n- `*.tsx` (transpiles, but doesn't do build time typechecking)\n\n## Importing Assets\n\n- All asset types are supported according to the following rules\n  ```javascript\n  // exp === \"data:[...]\"\n  import exp from \"./some-asset.png?data\";\n  ```\n  ```javascript\n  // exp === \"[...]/some-asset.1234.png?file\"\n  import exp from \"./some-asset.png?file\";\n  ```\n  ```javascript\n  // exp === \"contents of file\"\n  import exp from \"./some-asset.txt?source\";\n  ```\n- Specific rules for \\*.css imports\n  ```javascript\n  // exp === new CSSStyleSheet()\n  // https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet\n  import exp from \"./some-style.css\";\n  ```\n  ```javascript\n  // exp === \"processed css as string\"\n  import exp from \"./some-style.css?string\";\n  ```\n  ```javascript\n  // load style\n  import \"./some-style.css?style\";\n  ```\n- Additional rule for creating webp formatted images\n  ```javascript\n  // exp === \"[...]/some-image.1234.webp\"\n  import exp from \"./some-image.png?file\u0026as=webp\";\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixibuc%2Fbuild-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubixibuc%2Fbuild-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixibuc%2Fbuild-scripts/lists"}