{"id":14972529,"url":"https://github.com/angeal185/bootstrap-4-stylus","last_synced_at":"2025-10-26T19:31:33.999Z","repository":{"id":57152426,"uuid":"103506879","full_name":"angeal185/bootstrap-4-stylus","owner":"angeal185","description":"stylus port of bootstrap.css v4","archived":false,"fork":false,"pushed_at":"2019-11-02T00:37:25.000Z","size":119,"stargazers_count":21,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T06:04:48.515Z","etag":null,"topics":["bootstrap","bootstrap-4","bootstrap4","stylus","stylus-port"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/angeal185.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-09-14T08:27:52.000Z","updated_at":"2019-11-02T00:37:27.000Z","dependencies_parsed_at":"2022-08-27T16:20:34.752Z","dependency_job_id":null,"html_url":"https://github.com/angeal185/bootstrap-4-stylus","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fbootstrap-4-stylus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fbootstrap-4-stylus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fbootstrap-4-stylus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fbootstrap-4-stylus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angeal185","download_url":"https://codeload.github.com/angeal185/bootstrap-4-stylus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238394323,"owners_count":19464583,"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":["bootstrap","bootstrap-4","bootstrap4","stylus","stylus-port"],"created_at":"2024-09-24T13:47:03.816Z","updated_at":"2025-10-26T19:31:28.628Z","avatar_url":"https://github.com/angeal185.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bootstrap-4-stylus\nstylus port of bootstrap.css v4\n\n### Installation\n\nEnsure stylus is installed globally\n\n```sh\n$ npm install stylus -g\n```\n\n### info\nA complete, fully functional and unaltered convert of bootstrap.css to stylus.  \nNo learning curve and no repeats. build it how you want it or just use it as an easy way to exclude unused css.\nbootstrap.css has been converted, broken down into smaller `.styl` includes and the include files are named accordingly. within these include files are smaller sub-includes that can also be excluded.\n\n## npm\n```sh\n$ npm install bootstrap-4-stylus --save-dev\n```\nbootstrap-4-stylus can be used in the following ways when required as a module\n\n#### build bootstrap-4-stylus\n\n```javascript\n/* ./index.js */\nconst b4s = require('bootstrap-4-stylus');\n\nb4s.build(true);\n\n//build bootstrap4-stylus for use in cwd\n//true = clone a copy into your cwd and automatically update rout strings.\n//false = for use of the `./node_modules/bootstrap-4-stylus` module directly\n// ~ note: This will write over any existing files.\n\n\n````\n\nif you chose `true` your setup will be:\n\n```bash\n├─bootstrap.styl\n├─bs4.js\n├───dev\n│   └───bootstrap-4-stylus\n│       └───includes.styl\n│       └───includes/*.styl\n│           └───helpers/*.styl\n├───dist\n\n```\n\n* `./bs4.js` contains a complete list of build functions.\n* Build variables can be edited via the `./bootstrap.styl` file.  \n* include options can be edited in the in the `./dev/bootstrap-4-stylus/includes.styl` file as booleans ~ true/false.\n* include files are located at `./dev/bootstrap-4-stylus/includes/**/*.styl`\n*  `./dist` is where your compiled bootstrap files will be saved\n*  your baseDir within your files will automatically be updated to `./dev/bootstrap-4-stylus/`\n\n\nif you chose `false` your setup will be:\n```bash\n├─bootstrap.styl\n├─bs4.js\n├───dist\n\n```\n*  your baseDir within your files will remain as `./node_modules/bootstrap-4-stylus/`\n\n#### API\n```js\n// ./bs4.js\n\nconst b4s = require('bootstrap-4-stylus');\n// build options\nvar options = {\n    // watch options\n  compile:true, //compile bootstrap.css on change\n  compress:true, //compile bootstrap.min.css on change\n  compileSourceMaps:false, //compile bootstrap.css.map on change\n  compressSourceMaps:false, //compile bootstrap.min.css.map on change\n    // files/folders to watch\n  toWatch: [\n    \"./bootstrap.styl\",\n    \"./dev/bootstrap-4-stylus/includes\",\n    \"./dev/bootstrap-4-stylus/includes.styl\",\n    \"./dev/bootstrap-4-stylus/includes/helpers\"\n  ],\n    //bootstrap.js options ~ saved to ./dist/js\n  js:{ // requires internet connection\n    \"bootstrap\": true, //get bootstrap.js and verify hash\n    \"bootstrapMin\": false, //get bootstrap.min.js and verify hash\n    \"bootstrapMap\": false, //get bootstrap.js.map and verify hash\n    \"bootstrapMinMap\": false //get bootstrap.min.js.map and verify hash\n  },\n  backup: [ // files/dirs for backup\n    \"./bootstrap.styl\",\n    \"./dev/bootstrap-4-stylus\"\n  ]\n}\n\n\n// start livewatch and compile to ./dist folder on change\nb4s.watch(options);\n\n/* default task. will compile bootstrap.css \u0026\u0026 bootstrap.min.css into ./dist folder\n   this can be configured in /lib/config/index.json under \"main\" */\nb4s.init()\n\n// compile bootstrap.css into ./dist folder\nb4s.compile()\n\n// compile bootstrap.min.css into ./dist folder\nb4s.compress()\n\n// compile bootstrap.css.map into ./dist folder\nb4s.compileSourceMaps()\n\n// compile bootstrap.min.css.map into ./dist folder\nb4s.compressSourceMaps()\n\n// download bootstrap js files into ./dist/js folder\nb4s.getJs(options.js)\n\n// build bootstrap4-stylus for use in cwd\n// ~ note: This will write over any existing files, probably best to remove this.\nb4s.build(true);\n\n// check for updates\nb4s.versionCheck()\n\n// backup for windows users ~ .zip */\nb4s.backupWin(options.backup);\n\n// backup for linux/ windows with tar installed ~ .tar.gz\nb4s.backupLin(options.backup);\n\n```\n\n#### gulp API\n`v4`\n```sh\n$ npm install gulp --save-dev\n```\nall of the functions included in the `./bs4.js` file can be called using gulp like so:\n```js\nconst gulp = require('gulp'),\nb4s = require('bootstrap-4-stylus'),\noptions = {\n  compile:true,\n  compress:true,\n  compileSourceMaps:false,\n  compressSourceMaps:false,\n  toWatch: [\n    \"./bootstrap.styl\",\n    \"./dev/bootstrap-4-stylus/includes\",\n    \"./dev/bootstrap-4-stylus/includes.styl\",\n    \"./dev/bootstrap-4-stylus/includes/helpers\"\n  ],\n  js:{\n    \"bootstrap\": true,\n    \"bootstrapMin\": true,\n    \"bootstrapMap\": true,\n    \"bootstrapMinMap\": true\n  }\n};\n\nfunction bs4Init(done) {\n  b4s.init()\n  done()\n}\n\nfunction bs4Compile(done) {\n  b4s.compile()\n  done()\n}\n\nfunction bs4Compress(done) {\n  b4s.compress()\n  done()\n}\n\nfunction bs4CompileSourceMaps(done) {\n  b4s.compileSourceMaps()\n  done()\n}\n\nfunction bs4CompressSourceMaps(done) {\n  b4s.compressSourceMaps()\n  done()\n}\n\nfunction bs4GetJs(done) {\n  b4s.getJs(options.js)\n  done()\n}\n\nfunction bs4VersionCheck(done) {\n  b4s.versionCheck()\n  done()\n}\n\nfunction bs4Build(done) {\n  b4s.build(true)\n  done()\n}\n\nfunction bs4Watch(done) {\n  b4s.watch(options)\n  done()\n}\n\nfunction bs4BackupLin(done) {\n  b4s.backupLin(options.backup)\n  done()\n}\n\nfunction bs4BackupLin(done) {\n  b4s.backupWin(options.backup)\n  done()\n}\n\n\nexports.bs4Init = bs4Init;\nexports.bs4Compile = bs4Compile;\nexports.bs4Compress = bs4Compress;\nexports.bs4CompileSourceMaps = bs4CompileSourceMaps;\nexports.bs4CompressSourceMaps = bs4CompressSourceMaps;\nexports.bs4GetJs = bs4GetJs;\nexports.bs4VersionCheck = bs4VersionCheck;\nexports.bs4Build = bs4Build;\nexports.bs4Watch = bs4Watch;\nexports.bs4BackupLin = bs4BackupLin;\nexports.bs4backupWin = bs4BackupWin;\nexports.default = bs4Watch\n```\n* An example gulpfile.js can be found at `/examples/gulpfile.js`\n\n\n\n#### bower\nbower:\n```sh\n$ bower install bootstrap-4-stylus --save-dev\n```\n\nyour setup will be:\n\n```bash\n├─bootstrap.styl\n├─includes.styl\n├─index.js\n├─app.bat\n├───cmd\n├───dist\n├───example\n    └───main.js*\n├───includes\n    └───helpers\n\n\n\n```\n\n```sh\n$ node index.js\n```\n\nwill by default compile:\n\n\n```json\n[\n    \"./dist/bootstrap.css\",\n    \"./dist/bootstrap.min.css\"\n]\n````\n\nThe file `./example.main.js` has a complete list of functions available to you. simply move this file into the base dir `./` and you will have the same functionallity as the npm users.\n\n\n```sh\n$ node main.js\n```\n\n* as with the npm users, you also have access to all the other functions and gulp usage.\n* The default app options can be configured in `/lib/config/index.json`\n\n\n```json\n{\n  \"main\":{\n    \"compile\":{\n      \"enable\":true,\n      \"command\":\"-o ./dist\"\n    },\n    \"compress\":{\n      \"enable\":true,\n      \"command\":\"-c -o ./dist/bootstrap.min.css\"\n    },\n    \"compileSourceMaps\":{\n      \"enable\":false,\n      \"command\":\"-m -o ./dist\"\n    },\n    \"compressSourceMaps\":{\n      \"enable\":false,\n      \"command\":\"-c -m -o ./dist/bootstrap.min.css\"\n    }\n  },\n  \"options\":{\n    \"compile\":true,\n    \"compress\":true,\n    \"compileSourceMaps\":false,\n    \"compressSourceMaps\":false,\n    \"toWatch\":[\n      \"./bootstrap.styl\",\n      \"./includes.styl\",\n      \"./includes\",\n      \"./includes/helpers\"\n    ]\n  }\n}\n```\n\n### default stylus command\nopen a console and type:\n```js\n// compile bootstrap.css to ./dist folder\n$ stylus bootstrap.styl -o ./dist\n\n// compile and compress bootstrap.min.css to ./dist folder\n$ stylus bootstrap.styl -c -o ./dist/bootstrap.min.css\n\n// compile bootstrap.css to ./dist folder with sourceMap\n$ stylus bootstrap.styl -m -o ./dist\n\n// compile and compress bootstrap.min.css to ./dist folder with sourceMap\n$ stylus bootstrap.styl -c -m -o ./dist/bootstrap.min.css\n\n```\n\n### windows users\ndouble click the `./app.bat` file for an interactive task runner command line app.\n\n\ndone.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fbootstrap-4-stylus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangeal185%2Fbootstrap-4-stylus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fbootstrap-4-stylus/lists"}