{"id":17436183,"url":"https://github.com/j-d-carmichael/quilk","last_synced_at":"2025-04-16T03:34:55.480Z","repository":{"id":44525028,"uuid":"66767517","full_name":"j-d-carmichael/quilk","owner":"j-d-carmichael","description":"quilk ","archived":false,"fork":false,"pushed_at":"2025-03-16T12:43:56.000Z","size":2021,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T22:16:22.934Z","etag":null,"topics":["babel","css","javascript","less","rsync","sass","sass-watcher","watcher"],"latest_commit_sha":null,"homepage":null,"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/j-d-carmichael.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-28T12:42:26.000Z","updated_at":"2025-03-16T12:44:00.000Z","dependencies_parsed_at":"2024-10-19T08:54:14.189Z","dependency_job_id":null,"html_url":"https://github.com/j-d-carmichael/quilk","commit_stats":{"total_commits":196,"total_committers":5,"mean_commits":39.2,"dds":"0.19897959183673475","last_synced_commit":"85603017babe9a0cfdc0772e3c9ad7e86b54c192"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-d-carmichael%2Fquilk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-d-carmichael%2Fquilk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-d-carmichael%2Fquilk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-d-carmichael%2Fquilk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-d-carmichael","download_url":"https://codeload.github.com/j-d-carmichael/quilk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249191391,"owners_count":21227555,"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":["babel","css","javascript","less","rsync","sass","sass-watcher","watcher"],"created_at":"2024-10-17T10:06:08.633Z","updated_at":"2025-04-16T03:34:55.469Z","avatar_url":"https://github.com/j-d-carmichael.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e ⚠️ **Warning:** This project is no longer actively developed.  \n\u003e While it is still used in some legacy systems, only security updates are maintained.\n\u003e It was created a long time ago as simple alt to gulp, more opinionated \n\n\n![](https://img.shields.io/npm/v/quilk.svg) ![](https://img.shields.io/npm/dt/quilk.svg)\n[![NPM](https://nodei.co/npm/quilk.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/quilk/)\n\n# Quilk\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Documentation here](#documentation-here)\n- [Setup](#setup)\n  - [What is does](#what-is-does)\n  - [Common rsync setup](#common-rsync-setup)\n  - [Kitchen'esk sink exmaple config file:](#kitchenesk-sink-exmaple-config-file)\n  - [Tips](#tips)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Documentation here \n[https://johndcarmichael.github.io/quilk/](https://johndcarmichael.github.io/quilk/)\n\n---\n\n## Setup\n\n1 - Install, `npm install quilk --save-dev` then add to your package.json file's script block:\n```\n  ...\n  \"scripts\": {\n    ...\n    \"quilk\": \"quilk -- d=yourdevelopername\"\n    ...\n  },\n  ...\n```\n\n2 - Add your quilk.js(on) file, either vua `npm run quilk init` or build your own (see the example below).\n\n3 - Run your quilk build file with any of the following options `npm run quilk` runs the default user from the quilk file, or specify the user `npm run quilk developer=john` and lastly add a watch flag to re-run the modules after files change\n\n### What is does\nIn brief (see the example quilk file before), quilk is a lightweight standardised module runner. Pre-baked modules in quilk can do the following:\n\nWatch a file base and trigger modules on file changes via chokidar, modules include:\n- babelify\n- babelify_app\n- babelify_vendor\n- browserify_bundle\n- command_run\n- copy\n- css_fixed\n- email\n- js_find\n- js_fixed\n- js_strip\n- just_for_fun\n- node_minify\n- rsync\n- sass_find\n- sass_std\n- webhook\n---\n\n### Common rsync setup\n`quilk.js` will simply sync files from your project to a server. Adding the watch flag will sync the changes files.\n\n```javascript\nmodule.exports = {\n  // The modules this quilk file should run\n  modules: [\n    {\n      name: 'Rsync it',\n      module: 'rsync',\n      ignore: {\n        windows: [],\n        mac: [],\n        linux: [],\n        global: [\n          '.env',\n          '.git/*',\n          'node_modules'\n        ]\n      }\n    }\n  ],\n\n  // Watcher don't run the modules when files change here...\n  dont_watch: [\n    '.git/',\n    'node_modules',\n    'vendor',\n  ],\n  // Tell the watcher which project relatives to watch, if not set defaults to the project base\n  watch_only: [\n    '/src',\n  ],\n\n  // Injections chokidar_options to chokidar\n  chokidar_options: {\n    atomic: 50,\n    depth: 120\n  },\n\n  // The developers own custom settings\n  developers: {\n    default: {\n      platform: 'linux',\n      notifier: {\n        on: false\n      },\n      rsync: {\n        // The settings below would result in a command:       \n        // rsync -avz --delete -e 'ssh -J john@myjump:666' ./ www-data@myserver:/var/www/project-x/\n        e: 'ssh -J john@myjump:666',\n        localPath: './',\n        remote: 'www-data@myserver',\n        serverPath: '/var/www/project-x/'\n      }\n    },\n  }\n}\n```\n\n### Kitchen'esk sink exmaple config file:\n`quilk.js`:\n```javascript\nmodule.exports = {\n  // The modules this quilk file should run\n  modules: [\n    {\n      name: '(custom project specific module) Preapre the js config files based on the .env file',\n      module: 'prepareJSConfigFiles'\n    },\n    {\n      name: 'App file',\n      module: 'babelify',\n      configure: {\n        babelrc: '.babelrc'\n      },\n      extensions: ['.js'],\n      debug: true,\n      entries: 'resources/assets/js/app.js',\n      target: '/public/js/app.js'\n    },\n    {\n      name: 'App CSS',\n      module: 'sass_std',\n      outputStyle: 'expanded',\n      sourceComments: true,\n      input_path: 'resources/assets/sass/app.scss',\n      target: '/public/css/app.css'\n    },\n    {\n      name: 'Rsync it',\n      module: 'rsync',\n      set: [ /* Additional rsync options to be passed */\n        '--copy-links',\n        '--quiet'\n      ],\n      ignore: {\n        windows: [\n          /* Working on windows for a unix production env makes little sense, as such often certain files should not be synced */\n          'vendor'\n        ],\n        mac: [],\n        linux: [],\n        global: [\n          '.git/*',\n          '.idea/*',\n          'storage/app/*',\n          'storage/logs/*',\n          'node_modules'\n        ]\n      }\n    }\n  ],\n\n  // The projects custom quilk modules location\n  custom_module_path: 'quilk_modules',\n\n  // Watcher don't run the modules when files change here...\n  dont_watch: [\n    '.git/',\n    'node_modules',\n    'vendor',\n    'public/css',\n    'public/fonts',\n    'public/js'\n  ],\n\n  // The watcher options. See https://www.npmjs.com/package/chokidar for all the settings available\n  chokidar_options: {\n    awaitWriteFinish: false\n  },\n  \n  // Stop the watcher being triggered multiple times by other watchers, this grace time defaults to 500.\n  watcher_wait_between_changes: 500,\n\n  // Additional modules to run for live or staging, eg node_minify for js and css\n  release_commands_or_modules: {\n    prod: {\n      post: [{\n        name: 'minify the vendor js',\n        module: 'node_minify',\n        type: 'uglifyjs',\n        input: ['/public/js/app.js'],\n        target: '/public/js/app.js'\n      }, {\n        name: 'minify the css',\n        module: 'node_minify',\n        type: 'sqwish',\n        input: ['/public/css/app.css'],\n        target: '/public/css/app.css'\n      }]\n    }\n  },\n  \n  // The developers own custom settings\n  developers: {\n    default: {\n      platform: 'windows',\n      notifier: {\n        on: false,\n        style: 'WindowsBalloon',\n        time: 5000,\n        sound: true\n      }\n    },\n    john: {\n      platform: 'windows',\n      notifier: {\n        on: false\n      },\n      chokidar_options: {\n        awaitWriteFinish: true,\n        atomic: 50\n      },\n      rsync: {\n        localPath: './',\n        remote: 'www-data@myserver',\n        serverPath: '/var/www/vhosts/project-x/'\n      }\n    }\n  }\n}\n```\n\n\n### Tips\n\n1. The leading slash for everything is not relevant, add or not, quilk will only ever work within the current directory of the quilk file or a child directory. This is for security to prevent careless mistakes and potential loss of work.\n1. The rsync module... be sure to add the trailing slash else you will end up with a directory in a directory. And ALWAYS double check your paths!\n1. Most in-built modules will pass in the options from the quilk file directly to the npm package they are an abstraction for, so for full options please check the individual npm packages, eg chokidar\n1. Got more than 1 watcher on the go, check out the `watcher_wait_between_changes` flag if you're getting collisions.\n1. Don't forget to add your own `.babelrc` file when using any of `babel` modules as mentioned above\n1. The `watch` flag will rebuild even when it sees a new built file, to prevent this you can tell the watch to not watch specific paths (this is added a regex pattern internally to chokidar)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-d-carmichael%2Fquilk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-d-carmichael%2Fquilk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-d-carmichael%2Fquilk/lists"}