If your Hook targets filetypes for which CodeKit has built-in processing, your Hook always runs after CodeKit's built-in steps complete. Drag Hooks up or down in Project Settings to change that order. If a file triggers more than one Hook, the Hooks are run in top-down order. Likewise, if you use the Is operator, you must provide a full, matching string. If you use Begins With, keep in mind that input and output paths start with a leading slash. RegEx is slower than other matching operators and should be used only as a last resort. Invalid RegEx will cause your Hook to fail. Wildcards are not supported in any operator other than Matches RegEx. Macintosh HD/Users/john/documents/project/scripts/file.jsĪssuming "project" is the folder you've added to CodeKit, then the "Path From Project Root" would be:Īll matching operators are case-insensitive and ignore diacritic marks ( é and e are the same.) The "Path From Disk Root" option refers to a file's full input path, starting at the root of your drive: Use the Rule Editor to tell CodeKit which files should trigger this Hook. Customize the name, choose the type of script your Hook will run (AppleScript or Bash), then define the rules for file-matching. Open the Project Settings area, then choose the Hooks category:Ĭlick the button to add a Hook. Your command becomes another processing step for files of that type. You provide a custom command in either Bash or AppleScript, then tell CodeKit which files should trigger that command. Once you've added the project to CodeKit 3, you can safely delete that file.Hooks let you extend CodeKit to handle any kind of file. Note: You may also see a file named dekit2, if you migrated your project from CodeKit 2.x. Remove ones you're not working on and add them back when you are. Keep only a handful of projects in CodeKit at once. If you remove the project from CodeKit, then add it back or add it to CodeKit on a different Mac, the app reads this file and recreates your project exactly as it was. When you change a setting in the UI, that file updates immediately. Project Config FilesĬodeKit stores your project's settings in a file named dekit3. This applies to Subversion and Mercurial, too. Click one for details or watch the screencasts:īe sure to read the CodeKit + Git section. Here's some common tasks folks do with CodeKit. Just tell CodeKit what settings you want to start with. You don't have to change a bunch of settings every time you add a new project. Read Setting Language Options for details. Tweak SettingsĬlick the gear icon on the left side of the window to open the Project Settings area. See the "Complex Sites" section in Browser Refreshing. If your project needs server-side processing (PHP, Cookies, etc), there's one switch to flip. CodeKit will automatically refresh and sync all of them. to the same network as the Mac running CodeKit, then enter this address on each device. This opens a special address in your browser. PreviewĬlick the "Preview" button in the top-right corner. When you save files, the app will process them appropriately and then refresh your browser. (See CodeKit Frameworks for info about the bottom section.)ĬodeKit is now watching that folder. To start, drag your website's folder onto the window and drop it on the top section. Close Topics First Steps: Getting Started Live-Reload Browsers Browser Sync Set Language Options Set Output Paths & Action Second Steps: Defaults For New Projects Build Your Project Set Target Browsers Stuff To Know: CodeKit + Git Troubleshooting License Recovery PostCSS Tools: Autoprefixer PurgeCSS CSSO Custom PostCSS Plugins Other Tools: npm Babel - (JS Transpiler) Terser - (JS Minifier) Rollup - (JS Bundler) Cache-Buster HTML-Minifier Libsass Bless Languages: Sass Less Stylus JavaScript CoffeeScript TypeScript Pug Haml Slim Kit Markdown JSON Image Optimizers: WebP PNG JPEG SVG GIF Frameworks: CodeKit Frameworks Tailwind Bootstrap Bourbon Bitters Zurb Foundation Susy Nib Jeet Syntax Checkers: ESLint Advanced: Hooks Environment Variables Adding Custom Languages Team Workflows Scripting CodeKit Editor Plugins: Nova Atom Sublime Text Coda 2 More Read-Only Mode Upgrading From 2.0 FAQ 1.
0 Comments
Leave a Reply. |