{"id":16470207,"url":"https://github.com/niallobrien/asset-pipeline-bootstrap","last_synced_at":"2026-04-11T05:37:30.057Z","repository":{"id":145589494,"uuid":"126039968","full_name":"niallobrien/asset-pipeline-bootstrap","owner":"niallobrien","description":"Drop-in asset pipeline for Bootstrap 4","archived":false,"fork":false,"pushed_at":"2018-03-20T16:09:44.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T17:11:50.831Z","etag":null,"topics":["asset-pipeline","bootstrap4","es2015","jquery","laravel-mix","scss","webpack"],"latest_commit_sha":null,"homepage":null,"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/niallobrien.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}},"created_at":"2018-03-20T15:27:49.000Z","updated_at":"2018-03-20T16:09:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef0614a2-cb6a-41ba-8923-152340b80765","html_url":"https://github.com/niallobrien/asset-pipeline-bootstrap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/niallobrien/asset-pipeline-bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niallobrien%2Fasset-pipeline-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niallobrien%2Fasset-pipeline-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niallobrien%2Fasset-pipeline-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niallobrien%2Fasset-pipeline-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niallobrien","download_url":"https://codeload.github.com/niallobrien/asset-pipeline-bootstrap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niallobrien%2Fasset-pipeline-bootstrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31670376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":["asset-pipeline","bootstrap4","es2015","jquery","laravel-mix","scss","webpack"],"created_at":"2024-10-11T12:10:17.461Z","updated_at":"2026-04-11T05:37:30.035Z","avatar_url":"https://github.com/niallobrien.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asset Pipeline: Bootstrap 4\nAsset Pipeline: Bootstrap 4 is intended to be a drop-in asset pipeline for traditional web apps (which uses serverside templates/views). It can be used with most fullstack web frameworks.\nThis projects utilises ES2015, jQuery and Bootstrap 4 plugins for clientside JavaScript and Bootstrap 4 (SCSS) for styles.\n\n## Installation\nIf starting a new project,\n`mkdir my-new-project \u0026\u0026 cd my-new-project`\n`git clone https://github.com/niallobrien/asset-pipeline-bootstrap .` and remove the git foler with `rm -rf .git` as you probably don't want that.\nIt might best not to clone this repo into an existing project. Instead, I suggest that you simply download the zip file and extract it into your project or clone the repo into another location\nand move the files over.\n\n## Required Middleware\n\n### Pug\nIf you're using Pug (formally Jade) with Express, you'll need to add the below middleware\n```\n// Middleware for Jade/Pug custom filter for use with Laravel Mix\napp.use((req, res, next) =\u003e {\n  app.locals.filters = {\n    'mix': (text, options) =\u003e {\n      if (!text) return\n      text = text.replace(/[\"']/g, '')\n\n      const manifest = require(__dirname + '/public/mix-manifest.json')\n      if (options.css) return `\u003clink rel=\"stylesheet\" href=\"${manifest[text]}\"\u003e`\n      if (options.js) return `\u003cscript type=\"text/javascript\" src=\"${manifest[text]}\"\u003e\u003c/script\u003e`\n    }\n  }\n  next()\n})\n```\n\nThen add `:mix(css) '/styles/app.css'` within the `head` section of your layout file and at the bottom of the `body` section add:\n```\n:mix(js) '/scripts/manifest.js'\n:mix(js) '/scripts/vendor.js'\n:mix(js) '/scripts/app.js'\n```\n\n### Edge\nIf you're using Edge with AdonisJS, in `start/hooks.js` (create it if it doesn't exist) add:\n```\nconst {hooks} = require('@adonisjs/ignitor')\nconst path = require('path')\n\nhooks.after.providersBooted(() =\u003e {\n  const View = use('Adonis/Src/View')\n  const Helpers = use('Helpers')\n\n  View.global('mix', text =\u003e {\n    if (!text) return\n    const manifest = require(path.join(Helpers.publicPath(), 'mix-manifest.json'))\n    return manifest[text]\n  })\n})\n```\n\nThen add `\u003clink rel=\"stylesheet\" href=\"{{ mix('/assets/styles/app.css') }}\"\u003e` within the `head` section of your layout file and at the bottom of the `body` section add:\n```\n{{-- Scripts --}}\n\u003cscript src=\"{{ mix('/assets/scripts/manifest.js') }}\"\u003e\u003c/script\u003e\n\u003cscript src=\"{{ mix('/assets/scripts/vendor.js') }}\"\u003e\u003c/script\u003e\n\u003cscript src=\"{{ mix('/assets/scripts/app.js') }}\"\u003e\u003c/script\u003e\n```\n\nPlease feel free to contribute examples for use with other web frameworks.\n\n### Usage\nYou can run the following commands to utilise the asset pipeline.\n\n`npm run dev` will build the assets for the development environment.\n\n`npm run watch` will build the assets for the development environment and continue to watch the assets for further changes. When a change is detected, it will automatically rebuild the assets.\n\n`npm run production` will build the assets for the production environment. This will minify all assets and utilise filenames that facilitate cache-busting, ideal for a production environment.\nUnfortunately, PurgeCSS doesn't yet support Pug. See https://github.com/FullHuman/purgecss/issues/6\n\n*Note:* When adding to an existing project, make sure to copy the `scripts`, `dependencies` and `devDependencies` from `package.json` to your exisiting `package.json` file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniallobrien%2Fasset-pipeline-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniallobrien%2Fasset-pipeline-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniallobrien%2Fasset-pipeline-bootstrap/lists"}