├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── Changelog.md ├── README.md └── config-file-spec.md /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | **Quick, short summary:** 8 | 9 | **Expected results:** 10 | 11 | **Actual results:** 12 | 13 | **Exact steps to reproduce:** 14 | 15 | **A link to download a simplified project or file that shows the issue:** 16 | 17 | **Your configuration (any details about your system that you think might be relevant)** 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Changelog.md: -------------------------------------------------------------------------------- 1 | #Release Candidate 7 (19 October 2016) 2 | --------------------------------------------------- 3 | 4 | ### NEW: 5 | -- A build option to automatically create a .gitignore file in the build folder. It's on by default. Idea courtesy of @guymeyer. 6 | 7 | -- The project inspector now has a build project button at the bottom. 8 | 9 | 10 | 11 | ### Changed: 12 | -- The "process all items" build step now handles all items that are not processed in any OTHER step, not just any PREVIOUS step. This lets you add a step such that certain files are built last. 13 | 14 | 15 | 16 | ### Fixed: 17 | -- An issue where the browser would hang for ~30 seconds when a project that uses an External Server received a 301-Redirect response from that server. 18 | 19 | -- When using an external server, the browser-injection script is now only injected in content that has a closing HEAD or BODY tag. Previously, it was injected in all content that had content-type text/html. The latter approach is still used for projects that do NOT use an external server. 20 | 21 | -- A crash that could occur if you supplied invalid RegEx for a Hook's pattern matching rule. 22 | 23 | -- Issue where Markdown files failed to compile if their output directory did not exist. 24 | 25 | -- One of the command icons was misaligned by 1 pixel. @guymeyer caught it. 26 | 27 | 28 | ### Component Updates: 29 | -- ESLint 3.8.1 30 | -- TypeScript 2.0.3 31 | -- Autoprefixer 6.5.1 32 | -- Babel 6.16.0 33 | -- SVGO 0.7.1 34 | 35 | 36 | 37 | 38 | 39 | 40 | #Release Candidate 6 (+5) (10 October 2016) 41 | --------------------------------------------------- 42 | 43 | ### RC6 Fixes: 44 | 45 | -- RC5 was short-lived. I ran into two additional issues that I wanted to fix immediately: 46 | 47 | -- An issue where empty folders and skipped folders weren't displayed in the files list in RC5. 48 | 49 | -- An issue where, upon refreshing a project, a literal shit ton of compiling occurred because CodeKit was under the false impression that all the stuff in your project was just added during the refresh. 50 | 51 | 52 | ### Fixed: 53 | 54 | -- A crash if you opened the CodeKit Frameworks section of Project Settings and then removed the current project before switching to another one. 55 | 56 | -- A rare crash when adding a project with a report that said, "Controller content cannot be nil". 57 | 58 | -- Issue where the app sometimes stopped seeing file-change events in a Project until you refreshed the project. 59 | 60 | -- Issue where the "New X Project" menu commands would fail if you selected a folder that's already in CodeKit as a project. 61 | 62 | -- A crash that occurred if scanning a malformed file with ESLint. 63 | 64 | -- If you combined multiple project folders into one while CodeKit was NOT running, the app failed to detect that the projects were merged when it started up. That would have led to a world of pain. Projects you combine into others are now removed when the app restarts. 65 | 66 | 67 | ### Changed: 68 | 69 | -- The .codekit-cache folder is no longer created unless it's actually needed. 70 | 71 | -- Inspector strings are now title-cased to match macOS conventions. 72 | 73 | -- The Google Web Starter Kit install process is now overhauled to work correctly with a build folder. It's actually really slick. 74 | 75 | -- Susy updated to 2.2.12 76 | 77 | -- To streamline handling for MASSIVE projects and massive simultaneous file-events (think dragging 400 subfolders around in a project), CodeKit will no longer automatically update the output path of a source file if you rename/move that source file's output file. This was a very subtle feature and it's not clear that it exists. Users may not even realize it has occurred. The simpler, cleaner rule is: "if you want to change a file's output path, you do it in CodeKit's UI." 78 | 79 | 80 | ### New: 81 | 82 | -- If there is no selected project in CodeKit, your web browser will display a "no active project" page instead of a 404. Much clearer. Idea was Guy's. 83 | 84 | 85 | ### Plan: 86 | 87 | -- I intend to do one more RC with TypeScript 2.0. Barring any major bugs, that will become the GM. 88 | 89 | 90 | 91 | # Release Candidate 4 (4 October 2016) 92 | --------------------------------------------------- 93 | 94 | ### New--Locking Output Paths 95 | 96 | -- You'll see a new padlock icon next to output paths in the inspector. This functionality has always been part of CodeKit since version 1.x, but it's never been user-exposed before. When you set an output path manually using the "change" button, CodeKit marks that path as "locked", meaning the app won't automatically change it anymore. Normally, if you have not manually set an output path, the app will adjust the output path as the source file moves/renames. The lock button allows you to (1) see this state for the path and (2) change it. 97 | 98 | ### Kit Improvements: 99 | 100 | -- Kit files now respect indentation when importing files. The contents of an imported file will be indented by the same amount of leading whitespace there was before the special import comment. 101 | 102 | -- Variable declaration comments in Kit will no longer produce blank lines in the output file, so long as there is no trailing whitespace after the end of the special comment that declares the variable. 103 | 104 | 105 | ### CSS Improvements: 106 | 107 | -- Can now set the OutputStyle for regular CSS files. Same as Sass. 108 | 109 | -- Source maps now available when processing regular CSS files. 110 | 111 | 112 | ### Hooks: 113 | 114 | -- Hooks now inherit the ENV that CodeKit itself runs in. Fixes issue where PATH wasn't set correctly, so you couldn't call stuff without doing /usr/bin/... 115 | 116 | -- When Hooks run successfully, their output is now logged correctly in CodeKit's log. 117 | 118 | -- Hooks now run with /bin/bash instead of /bin/sh 119 | 120 | 121 | ### Fixed: 122 | 123 | -- An issue where builds failed if "clean build" was enabled and the build folder did not exist when the build started. 124 | 125 | -- Issue where the "don't show this for 1 hour" link on the "laggy connection" banner did not work. 126 | 127 | -- MultiMarkdown updated to 5.4. Fixes several issues with MD files. 128 | 129 | -- The folder icon was backwards on the window overlay that appears when you add a project. 130 | 131 | -- An issue where running AutoPrefixer or Bless on a regular CSS file would overwrite the source file. 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | # Release Candidate 3 (27 September 2016) 141 | --------------------------------------------------- 142 | 143 | ### NEW: Kit Optionals 144 | 145 | -- The Kit language now has "optionals". They look like this: <!-- $myVar? --> 146 | 147 | -- The trailing question mark means, "If $myVar has a value, put it here. Otherwise, do nothing." 148 | 149 | -- Kit variable names may no longer end in a '?'. This will produce an error: <!-- $myVar? = something --> 150 | 151 | -- This makes it very easy to do active classes on items in a Nav menu. You know, if someone were building a website and needed such a thing. It would be handy if that person could just change an entire language to make the task simple. 152 | 153 | 154 | ### Changed: 155 | 156 | -- When CodeKit creates import links for JS and Coffee files, it will now check to see if the imported file's path contains "node_modules" or the path to your "bower_components" folder. If it does, syntax-checking is automatically turned off for that imported file. No more "jQuery has 1,441 errors". 157 | 158 | -- CodeKit is now pulling resources from the new URL: codekitapp.com. Many of the help links are 404-ed at this point, but will work once the new site goes live. You should find that the Bower components list download is much snappier. 159 | 160 | -- WARNING: The updater may tell you that a new version of CodeKit is available. It is not. Do NOT attempt to update the app. Just click "Skip This Version" in the window. This is just me testing the updater on the new URL. 161 | 162 | 163 | 164 | 165 | 166 | # Release Candidate 2 (20 September 2016) 167 | --------------------------------------------------- 168 | 169 | ### New: 170 | 171 | -- SourceType and ECMAVersion options now available for ESLint. Right at the top of Project Settings. 172 | 173 | -- Additional operators (including full Regex matching) for Hook conditions 174 | 175 | -- There's now a deprecation alert if you choose "New Compass Project". Turns out Compass is no longer under active development. 176 | 177 | -- The default Skipped Items list now includes a path to skip logs for a default laravel install. This won't affect you guys, since your defaults are already set, but it will apply to users who upgrade to 3 upon release. 178 | 179 | 180 | ### Fixed: 181 | 182 | -- Issue where the files list scrollView cut off prematurely after dragging a JS file to the Linked Files tab. 183 | 184 | 185 | 186 | 187 | 188 | 189 | # Release Candidate 1 / Beta 16 (18 September 2016) 190 | --------------------------------------------------- 191 | 192 | ### New: 193 | 194 | -- (Be sure to read all the Beta 15 stuff; LOTS of big new things) 195 | 196 | -- CodeKit now passes plugins AND presets to Babel if you enable any of them. The order it passes presets has been set from "most experimental" to "least experimental". If you use the decorators plugin, CodeKit also makes sure it comes before the classes one. (This is obviously not done if you set these in a .babelrc file---see below.) 197 | 198 | -- The "transform-decorators-legacy" Babel plugin is now built-in 199 | 200 | -- You can now set CodeKit to ignore/merge/use-exclusively .babelrc files. If you need to fine-tune babel's configuration, choose "use .babelrc file settings only" and CodeKit won't pass any options to babel other than the one that creates an output file at the specified location for your input file. 201 | 202 | 203 | ### Changed: 204 | 205 | -- ESLint updated to 3.5.0. New rules. 206 | 207 | -- Babel now at 6.15.0 208 | 209 | -- New icons for ESLint and Babel. 210 | 211 | -- The Components tab of the About window now has a nice fading top border. Details matter. 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | # Beta 15 (16 September 2016) 221 | ----------------------------- 222 | 223 | ### New: 224 | 225 | -- "AutoBuild": Your project uses a build folder. The document root for the preview server is the build folder. You add an image. But to have it show up in the preview, you have to build the project so that CodeKit processes that new image to the right spot in the build folder. This now happens automatically. Add the image, the project will refresh, after the refresh completes any new or renamed items are processed. (This only happens if you use a build folder.) It can be toggled in Project Settings > Build Process. REALLY need to test this feature to make sure it's working well. 226 | 227 | -- "Clean Builds": Before building, CodeKit will delete all existing items in the build folder. Again, this can be toggled in Project Settings > Build Process. 228 | 229 | -- Many new project icons 230 | 231 | -- Kit files can now use root-relative import statements: @import "/somefolder/somefile". These are always resolved from the project root folder. 232 | 233 | -- A new command in the Tasks menu: "Apply Best Defaults For Using Build Folders" will automatically adjust the New Project Defaults for every language so that output paths and actions are set up for build folders automatically. Handy. I see myself writing many emails telling people to use this. 234 | 235 | 236 | ### Fixed: 237 | 238 | -- An issue where the app would not process file-change events that occurred during a Project Refresh. Those changes are now queued for when the refresh completes and are then fired correctly. 239 | 240 | -- An issue where ESLint failed to run because my NPM-Cleaning script deleted a needed file 241 | 242 | -- When editing New Project Defaults, the app icon is now displayed in the General tab. 243 | 244 | 245 | 246 | 247 | 248 | 249 | # Beta 14 (13 September 2016) 250 | -------------------------- 251 | 252 | ### NEW: 253 | 254 | -- You can now add arbitrary file extensions as "other" languages in both Project Settings and New Project Defaults. This lets you specify custom output-file-path rules for these languages. Please test this extensively; it may be fragile. 255 | 256 | -- CodeKit will now refresh "partial" pages. That is, your page need no longer have a HEAD tag. It simply needs to have the text/html content-type header. If your page DOES have a head tag, CodeKit will put its script there. Otherwise, it looks for a body tag and puts it there. Failing that, it just throws the script at the end, which lets you refresh pages that aren't even valid HTML. 257 | 258 | -- PNG, GIF and JPG are now listed as languages in Project Settings 259 | 260 | 261 | ### Fixed: 262 | 263 | -- An issue that would cause changes to file-output-path rules in the "New Project Defaults" area to not apply correctly. 264 | 265 | -- The Command Column buttons (left-hand side) now have a pressed state 266 | 267 | -- Issue where two projects could point to the same folder if you follow a very specific set of steps with one project disabled. This caused chaos. 268 | 269 | -- Build Settings are now read-only once the 3.0 trial has expired 270 | 271 | -- Hitting the back button in your browser while viewing the Preview URL will no longer produce the dreaded "connection to CodeKit lost" red banner. The page stays connected. 272 | 273 | -- Issue where the "Apply Default Output Paths to Existing Files" did not work in Project Settings. 274 | 275 | -- That "apply to existing files" button is now disabled when in New Project Defaults mode 276 | 277 | 278 | ### Changed: 279 | 280 | -- ES2015 and ES2016 are now the default Babel Presets. This will affect new users, but won't modify the New Project Defaults for existing beta testers. 281 | 282 | -- Uglify.js updated to 2.7.3 283 | 284 | -- SVGO update to 0.7.0. Includes "removeXNLNS" rule 285 | 286 | -- AutoPrefixer 6.4.1 287 | 288 | 289 | 290 | 291 | 292 | # Beta 13 (26 August 2016) 293 | -------------------------- 294 | 295 | ### NEW: 296 | 297 | -- Hooks have changed. Until now, Hooks have been run at the END of a group of files being processed. (Like if you saved 4 files at once, your Hook ran once after all 4 files had been processed by CodeKit's built-in steps.) From now on, Hooks run once FOR EACH FILE. You'll find the same CK_INPUT_PATHS and CK_OUTPUT_PATHS environment variables set for Bash scripts, but your Hook will run over and over for each file that it matches, AS THE FILE IS PROCESSED. CodeKit's built-in steps go first, then your Hook. This is easier for users to Grok and it makes Hooks a bit easier to write. You'll see your Hook results in the same result message as the rest of CodeKit's processing for a given file; there are no longer separate messages for Hooks. It's all just much cleaner and "what you expect". 298 | 299 | -- You can now tell CodeKit to use .eslintrc files instead of (or in addition to) the UI settings. 300 | 301 | -- The JPEG optimizer should be much faster. 302 | 303 | ### Fixed: 304 | 305 | -- A crash that occurred if you added a "run script" build step and built the project without first refreshing it once. 306 | 307 | -- Builds now actually stop on the first error if set to do so. You may see an additional few files compile after the first error. That's because CodeKit is processing 8 files at once, so the others have to finish up before the build is canceled. 308 | 309 | -- Image optimizers will no longer fail because the output folder doesn't exist. 310 | 311 | -- An issue where the JS import linker falsely identified huge lines of a minified file as potential import statements 312 | 313 | -- Browsers no longer refresh if all you're doing is checking the syntax of a file 314 | 315 | -- Generic files now have a "Process" button in the inspector. 316 | 317 | -- All compilers now set a NODE_PATH Env variable so that node modules installed in either the project's root folder or next to the file being compiled will be found. Example: ESLint plugins. 318 | 319 | -- Issue where some folders were falsely reported as children of existing projects when you attempted to add them to the app 320 | 321 | 322 | 323 | 324 | 325 | # Beta 12 (15 August 2016) 326 | -------------------------- 327 | 328 | ### NEW: 329 | 330 | -- AppleScript API endpoint to build a project 331 | 332 | ### Fixed: 333 | 334 | -- A crash that could happen during a build 335 | 336 | -- An issue where saving any file that's not a stylesheet would not trigger a browser refresh 337 | 338 | -- The "process remaining items" build step title is no longer editable 339 | 340 | -- An issue where Hooks might be run twice for each build step during builds 341 | 342 | 343 | 344 | 345 | 346 | # Beta 11 (10 August 2016) 347 | -------------------------- 348 | 349 | ### THE BUILD PROCESS: 350 | 351 | -- The build process is complete and active. I made a short video about how it works, including a discussion of WHY it works the way it does. Watch the video, then give it a shot: https://www.dropbox.com/s/irq4z7w8wm9949h/The%20Build%20Process.mp4?dl=0 352 | 353 | 354 | ### Changes: 355 | 356 | -- The project config file can now be hidden. The option is in the General tab of Project Settings. 357 | 358 | -- Hooks set in "New Project Defaults" (if any) will now migrate from 2.x to 3.0. Not for you guys, because you've already installed 3.0 once, but for everyone else they should come across. 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | # Beta 10 (26 July 2016) 367 | ------------------------ 368 | 369 | ### New: 370 | The UI for the BUILD section is now complete. Please give it a go; I'm hoping it's self-explanatory. You can add steps to the build flow and those steps will be saved in your project config, but the actual "build project" button does not yet do anything. There's a couple things to finalize there; it will be active in the next beta. In the meantime, please take a look at the build UI and let me know what you think, etc. 371 | 372 | ### Changes: 373 | 374 | -New file icons for all types that CodeKit supports (Less, Sass, etc.) 375 | 376 | -The 'codekit3.config' file is now double-clickable to add or switch to a project in the app. 377 | 378 | 379 | ### Component Updates: 380 | 381 | -pug 1.0.0-alpha6 382 | 383 | -autoprefixer 6.3.7 384 | 385 | -uglify-js 2.7.0 386 | 387 | -stylus 0.54.5 388 | 389 | -eslint 3.1.1 (bunch of new rules) 390 | 391 | -babel 6.11.4 392 | 393 | -less-clean-css 1.5.1 394 | 395 | -node 6.3.1 396 | 397 | -neat 1.8 (no longer requires Bourbon) 398 | 399 | 400 | 401 | 402 | 403 | # Beta 9 (13 July 2016) 404 | ----------------------- 405 | 406 | ### Critical: 407 | The name of the settings file has changed from "codekit3.config" to "config.codekit3". For projects that you've been using with the CodeKit 3 beta, you need to manually change the name of the config file before you add the project to Beta 9. Otherwise, the app won't use your saved settings for that project. 408 | 409 | 410 | ### Fixed: 411 | 412 | -- The "Apply To Existing Files" button in the Languages section of Project Settings now works. 413 | 414 | -- Continued Build implementation (it's coming; I swear.) 415 | 416 | -- Other stuff I forgot to put in my Git notes. 417 | 418 | 419 | 420 | 421 | 422 | 423 | # Beta 8 (29 June 2016) 424 | ----------------------- 425 | 426 | This release fixes a few things. I've mainly been working on the build flow, which has had to change pretty dramatically after I realized there was a shortcoming in my earlier approach. While it looks like this release doesn't have too much in it, there's a LOT going on under the hood to make the build process come together. Hang in there. 427 | 428 | ### Fixed: 429 | 430 | -- Renaming files will now (again) correctly trigger a project refresh to capture the change. 431 | 432 | -- The item counts in the project sidebar and popover now stay in sync. 433 | 434 | -- The project sidebar's subtitles are no longer editable. 435 | 436 | -- If you rename a project folder on disk, CodeKit now adopts that new name in the UI unless you have previously edited the name in the UI to assign a specific value. 437 | 438 | -- The rare and incorrect "missing on disk" for newly-added projects should FINALLY no longer occur. 439 | 440 | -- Dragging to reorder Hooks would sometimes drop the dragged Hook in the wrong spot due to a bug in NSTableView. That has been worked-around. 441 | 442 | 443 | 444 | # Beta 7 (15 June 2016) 445 | ----------------------- 446 | 447 | ### CRITICAL: 448 | Beta 7 includes a new config file format. If you are not careful, it will obliterate your settings and output paths for existing 3.0 projects created with Betas 1-6. To avoid that, do the following: 449 | 450 | 1. Download the "CK3Migrator" zip from this repo. 451 | 2. Open a Terminal window and use the cd command to switch to a directory that contains "codekit3.config" files generated by betas 1-6. 452 | 3. Drag and drop the unzipped CK3Migrator onto the Terminal Window. 453 | 4. Hit Enter. 454 | 455 | This tool will recursively walk every subfolder from the one you CD-ed into and look for files named "codekit3.config". When it finds one, it rewrites that file in the new format for Beta 7+. You can run it on your /Users/[myusername] folder to make sure you cover everything. This is only needed for 3.0 projects that have been in Betas 1 through 6. Projects that you have not yet added to CK3 (but which contain a CK2 config file) will automatically adopt the new Beta7+ format. 456 | 457 | For a project with 30,000 files, this new format creates a 6.8 MB config file versus an 11.9 MB file under the old 2.x format. 458 | 459 | 460 | ### Fixed: 461 | -- A crash that could happen in the Project Settings migrator 462 | 463 | -- A crash that could happen when loading various popovers in the app 464 | 465 | -- The "Skip This Folder" contexual menu item is now greyed out when used on an already-skipped folder 466 | 467 | -- The red "disconnected" banner should no longer flash as you navigate pages in the preview server. 468 | 469 | -- The build folder is now skipped only if your project is set to use a build folder. Otherwise, it's indexed normally. 470 | 471 | -- An issue where creator/created files might not have been linked correctly 472 | 473 | -- An issue where selecting files in the list and right-clicking to choose "Set New Output Path" screwed up the output filename of every file but the first. 474 | 475 | 476 | ### Changed: 477 | 478 | -- All references to "OS X" are now "macOS". It's a brave new world. 479 | 480 | 481 | 482 | 483 | 484 | 485 | # Beta 6 (12 June 2016) 486 | ----------------------- 487 | 488 | ### Critical Warning: 489 | I'm going to change the format of the config3.codekit file to make it smaller for really large projects. To ensure you don't lose your settings, you need to download this beta release and add to the app every project you want to keep your 3.0 settings for. Then, install the next Beta when I release it. That one will not reset the data in the app, but it will write the new settings file format. As long as your projects are in Beta 6 when you install Beta 7, you'll be fine. 490 | 491 | 492 | ### New: 493 | -- The Browsers pane in Preferences has a new option to choose the default Preview Address. 494 | 495 | 496 | ### Changed: 497 | -- Skipped Folders are now displayed in the UI with a custom inspector. If your project uses a build folder, you can choose to copy those folders to the build folder when the project builds. 498 | 499 | -- The Build folder is now always skipped, if the project uses a build folder. 500 | 501 | -- The project settings file for larger projects is much smaller. 30,000 file project was 11.9MB and is now 8.5MB. The next release will improve this even more, but I had to ship this one first to preserve your settings. 502 | 503 | 504 | ### Fixed: 505 | -- Text is no longer blurry on non-retina screens. 506 | 507 | -- PNG and JPEG optimizers now copy files to output paths correctly 508 | 509 | -- A potential crash in the preview server if your project uses an external server 510 | 511 | -- The Project Settings icon is fixed for non-retina 512 | 513 | -- TypeScript files now minify output, if that's selected 514 | 515 | -- An issue where settings could be lost for certain files if you moved them around on disk in a certain way 516 | 517 | -- An issue where the app would falsely report one project was a child of another if the names were similar. e.g. "myProject" and "myProject-other" 518 | 519 | -- An issue where the "Skip This Item" contextual menu command did not work on the clicked row. 520 | 521 | -- Skipped Items list in project settings no longer cuts off text 522 | 523 | -- An issue where build folder output paths could be calculated incorrectly for certain source folder paths 524 | 525 | -- The "Change" link for setting a new Output Path is now hidden if the file is set to "ignore". 526 | 527 | -- An issue where saving files in Coda 2 would trigger a project refresh instead of a processing action. 528 | 529 | 530 | 531 | 532 | 533 | 534 | # Beta 5 (31 May 2016) 535 | ---------------------- 536 | 537 | ### New: 538 | -- Cmd+F will now bring up the search field if you're in a part of the app that can be searched. 539 | 540 | -- JavaScript files now support ES6 'import' syntax. CodeKit will correctly map dependencies between files that use 'import'. A third section appears in the "Linked Files" pane of the JS inspector that shows these imports. The old @codekit-prepend/append statements are still supported, but you should not use both at once. Currently, CodeKit doesn't *do* anything with these links; you'll have to enable Babel and use the commonjs module to transpile the files into a single JS file that can be used in current browsers. 541 | 542 | 543 | ### Fixed: 544 | -- An issue where the search fields would de-select themselves 545 | 546 | -- An issue where Sass partials were not linked correctly by the import scanner 547 | 548 | -- An issue where the TypeScript compiler's error messages weren't shown in the log. 549 | 550 | -- An issue where the TypeScript compiler would report insanely long, relative file paths in error messages. 551 | 552 | -- An issue that caused certain TypeScript import statements to not be detected correctly by the import linker 553 | 554 | 555 | 556 | 557 | 558 | 559 | # Beta 4 (28 May 2016) 560 | ---------------------- 561 | 562 | ### New: 563 | -- TypeScript files using "import" statements now link dependent files correctly so CodeKit can compile the right parent file when dependents change. (The older "reference path" style is also still supported.) 564 | 565 | -- ALL of CodeKit's import scanners have been refactored in this release. (This is groundwork to support ES6 imports in JavaScript and prepending/appending skipped files.) As a result, I need to test EVERY language in the app to make sure imports are still found correctly---especially imports that target CodeKit Frameworks. 566 | 567 | 568 | ### Changed: 569 | -- New Preview icon. 570 | 571 | -- Server icon has a chevron to more clearly indicate what it does. 572 | 573 | -- Log messages are now monospaced 574 | 575 | -- Log coloring tweaked 576 | 577 | 578 | ### Fixed: 579 | -- "Use Libsass" checkbox is now disabled in Compass projects 580 | 581 | -- If you change a setting and quit the app immediately afterwards, that change is now recorded in the project's config file before the app quits. 582 | 583 | -- Changing Build Folder settings now resets the Preview Server correctly. 584 | 585 | -- An issue where the app would incorrectly report that Project B was a subfolder of Project A when you attempted to add B to the app. 586 | 587 | -- Stylus files now compile. 588 | 589 | -- Jade AND Pug files should now compile correctly. 590 | 591 | -- An existing project can now never be added twice, even if CodeKit's file-watching is paused and you rename the project 592 | 593 | 594 | 595 | 596 | # Beta 2 (23 May 2016) 597 | ---------------------- 598 | 599 | ### New: 600 | -- Hooks now add messages to the Log when they exit with a (0) code and print anything to StdOut or when they print anything to StdErr, regardless of exit code. 601 | 602 | -- You can now add a Log message via AppleScript. See the AppleScript dictionary for the API. 603 | 604 | -- There are additional commands in the Status Bar menu so you can control the app when running without the Dock icon. 605 | 606 | -- JSX file extensions are now treated as JavaScript files. 607 | 608 | -- The dock icon now switches to white when you enable Dark Menu mode. 609 | 610 | 611 | ### Fixed: 612 | -- Issue where syntax errors were sometimes hidden in the log. 613 | 614 | -- Issue where the "no projects" message might be truncated in the projects popover. 615 | 616 | -- Issue where Jade files would compile but Pug files would not. 617 | 618 | -- Babel no longer writes a source map when maps are off. 619 | 620 | -- The project title sometimes migrated down the window. It should not do that anymore. 621 | 622 | -- It's no longer possible to change the output path of a Sass file in a Compass project. 623 | 624 | -- The "New Group" commands are now unavailable in the Projects Popover if there are no projects or frameworks in the app. 625 | 626 | -- The default "Projects" and "Frameworks" groups can no longer be renamed. 627 | 628 | -- Group names can now be edited by clicking anywhere. Previously, you had to click the first 30 pixels 629 | 630 | 631 | 632 | ### Changed: 633 | -- Wider Preview icon with larger click target 634 | 635 | -- ESLint updated to version 2.10.2. Couple new rules added. 636 | 637 | -- ESLint has moved to the top of the Sytax Checkers list so that people use it. 638 | 639 | 640 | 641 | 642 | # Beta 1 (17 May 2016) 643 | ---------------------- 644 | 645 | - Initial Release 646 | - Forgot to mention in the video: If you add a Hook that runs on file types for which CodeKit does not have built-in processing (such as minifying HTML), those Hooks will be run as long as the file's output option is not 'ignore'. 647 | - Gif optimization is also a thing. Select a Gif in the app to see it. 648 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## CodeKit 3 2 | 3 | This is the public issue tracker for CodeKit 3. 4 | 5 | 6 | ### Note: 7 | 8 | Before posting an issue, please make sure you've read the help pages at https://codekitapp.com/help/ and searched both open and closed issues on this repo. 9 | -------------------------------------------------------------------------------- /config-file-spec.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | 1. [Introduction](#introduction) 4 | 2. [Top-Level Properties](#top-level-properties) 5 | 3. [The "Project Attributes" Object](#project-attributes) 6 | 4. [The "Files" Object](#files) 7 | 1. [Keys Shared By All Files](#keys-shared-by-all-files) 8 | 2. [Less Keys](#less-keys) 9 | 3. [Sass & SCSS Keys](#sass-and-scss-keys) 10 | 4. [Stylus Keys](#stylus-keys) 11 | 5. [CSS Keys](#css-keys) 12 | 6. [CoffeeScript Keys](#coffeescript-keys) 13 | 7. [TypeScript Keys](#typescript-keys) 14 | 8. [HAML Keys](#haml-keys) 15 | 9. [Pug Keys](#pug-keys) 16 | 10. [SLIM Keys](#slim-keys) 17 | 11. [Kit Keys](#kit-keys) 18 | 12. [Markdown Keys](#markdown-keys) 19 | 13. [JSON Keys](#json-keys) 20 | 14. [JPEG Keys](#jpeg-keys) 21 | 15. [PNG Keys](#png-keys) 22 | 16. [SVG Keys](#svg-keys) 23 | 17. [GIF Keys](#gif-keys) 24 | 18. [Keys for "Folder" File Types](#keys-for-folder-file-types) 25 | 19. [Keys for "Other" File Types](#keys-for-other-file-types) 26 | 5. [The "Project Settings" Object](#project-settings) 27 | 1. [Top-Level Settings](#top-level-settings) 28 | 2. [LanguageDefaults Objects](#language-defaults) 29 | 30 | 31 | ------------------------ 32 | 33 | 34 | 35 | # Introduction 36 | 37 | A CodeKit 3 configuration file stores information about a CodeKit Project, its settings, and all the files it contains. 38 | 39 | ### Name & Location: 40 | 1. The file must named `config.codekit3` or `.config.codekit3`. 41 | 2. The file must be located in the root Project folder. (The folder added to CodeKit as a Project.) 42 | 43 | 44 | ### Format: 45 | The config file is JSON. 46 | 47 | 48 | ### Optionality: 49 | There are only two required fields, both of which are top-level properties: `settingsFileVersion` and `creatorBuild`. All other fields in the Config File are optional. 50 | 51 | 52 | ### Case Sensitivity: 53 | Keys are **case-sensitive.** Values are not. 54 | 55 | 56 | ### Sorting: 57 | To prevent extraneous diffs during Git commits, CodeKit alphabetically sorts all keys in the Config File. While this is not a requirement, it is handy for users. 58 | 59 | 60 | ### 64-Bit Integers: 61 | **Certain numbers in the Config File MUST be parsed as 64-bit integers.** 62 | 63 | This is because several numbers are actually bitmask values. The specific numerical values that MUST be treated as 64-bit integers are called out in this documentation. 64 | 65 | As of 2019, JavaScript cannot represent 64-bit integers natively. The `Number` type stops at 53-bits of precision because JavaScript is a god-awful language. Fortunately, JavaScript is introducing the `BigInt` type to solve this problem. It is not officially part of the spec right now. 66 | 67 | See https://golb.hplar.ch/2019/01/js-bigint-json.html for a workaround. 68 | 69 | If you are **writing** a Config File from scratch and the values you intend to store for the properites that MUST be 64-bit integers do not exceed 53 bits of precision, you can safely write the value as a standard `Number`. For example, `fileType` can be set to `2 (2^1)` to represent a `Sass` file or `4096 (2^12)` to represent a `Markdown` file. 70 | 71 | If you are **reading** a Config File, you must treat numbers as 64-bit integers because you do not control whether or not they have bits beyond (2^53) "enabled". It is NOT safe to use `Number` to represent numberical values in this case. 72 | 73 | ----------------------------- 74 | . 75 | . 76 | . 77 | . 78 | 79 | # Top Level Properties 80 | 81 | The top level of the Config File is an object of type `{"key": value}`. It looks like this: 82 | 83 | ```javascript 84 | { 85 | "AAInfo": "A string generated by CodeKit explaining the purpose of this file to the user", 86 | 87 | "buildSteps": [], 88 | 89 | "creatorBuild": "31491", 90 | 91 | "files": {}, 92 | 93 | "hooks": [], 94 | 95 | "manualImportLinks": {}, 96 | 97 | "projectAttributes": {}, 98 | 99 | "projectSettings": {}, 100 | 101 | "settingsFileVersion": "3" 102 | } 103 | ``` 104 | 105 | ### "AAInfo" - `String` 106 | Anything you provide will be overwritten by CodeKit, but you may want to explain that this is a CodeKit configuration file and the app can be downloaded at https://codekitapp.com/ 107 | 108 | ### "buildSteps" - `[{"key": value, ...}, ...]` 109 | This stores information about each Build Step that a user has defined. It is an `Array` of `Objects` of type `{"key" : value}`. [See Details](#build-steps) 110 | 111 | ### "creatorBuild" - `String` (REQUIRED) 112 | This is the build number for the version of CodeKit that created this file. The number is visible in CodeKit's About window. You MUST supply a **string** that contains a number equal to the version of CodeKit you're targeting. CodeKit will ignore any Config File that is missing this value. 113 | 114 | As of August 2019, use `"31491"`, which is CodeKit 3.9.2. This documentation was written against that CodeKit version. 115 | 116 | Whatever build number you enter here is the minimum version of CodeKit that your users should have. If your users have an older version of CodeKit, the Config File will still be read and any values that apply in the older version of the app will be used. However, any values that don't apply to the older version of CodeKit (for a feature that does not exist in the older version) will be discarded permanently. 117 | 118 | You are guaranteed forward-compatibility. Your Config File will work in any future release of CodeKit and will be automatically migrated to future formats, if needed. 119 | 120 | ### "files" - `{"key": {"key": value, ...}, ...}` 121 | 122 | This is an `Object` that stores settings for each individual file in the Project. [See Details](#files). 123 | 124 | ### "hooks" - `[{"key": value, ...}, ...]` 125 | 126 | This is an `Array` of `Objects` of type `{"key": value}` that store information about each [Hook](https:/codekitapp.com/help/hooks/) that is defined for this Project. [See Details](#hooks). 127 | 128 | ### "manualImportLinks" - `[Object, ...]` 129 | 130 | This stores information about import links between files that the user has created via drag-and-drop in CodeKit's UI. When parsing a Config File, you should treat this value as an opaque `Array` and write it, unmodified, to your output. When creating a Config File from scratch, you should omit this property. (Drag-and-drop import links are a legacy feature from a time before ES6 module syntax.) 131 | 132 | ### "projectAttributes" - `{"key": value, ...}` 133 | 134 | This is an `Object` that stores basic biographical information about a Project. [See Details](#project-attributes) 135 | 136 | ### "projectSettings" - `{"key": value, ...}` 137 | 138 | This is an `Object` that stores the Project Settings for this Project. It contains configuration for tooling such as ESLint, Babel, Autoprefixer, etc. It also provides "default" values to fall back on when a file in `files` (above) is missing a value for a particular setting. If that value is *also* missing from `projectSettings`, CodeKit falls back to the "Defaults for New Projects" that the user has specified. At that level, **every** possible setting is guaranteed to have a value. [See Details](#project-settings) 139 | 140 | ### "settingsFileVersion" - `String` (REQUIRED) 141 | 142 | Pass the `String` `"3"` for this value. CodeKit will ignore any Config File that is missing this value. 143 | 144 | ----------------------------- 145 | . 146 | . 147 | . 148 | . 149 | 150 | 151 | 152 | 153 | # Project Attributes 154 | 155 | This top-level property is an `Object` that contains basic biographical information about a Project. It looks like this: 156 | 157 | ```javascript 158 | "projectAttributes": { 159 | "creationDate": 586072330.73522604, 160 | "displayValue": "The Project Name As Shown in CodeKit's UI", 161 | "displayValueWasSetByUser": 0, 162 | "iconImageName": "brackets_purple", 163 | "iconImageWasSetByUser": 0 164 | } 165 | ``` 166 | 167 | ### "creationDate" - `Double` 168 | 169 | The date the project was created. Stored as the number of seconds since `00:00:00 UTC on 1 January 2001` in `Double` format. If you omit this property, CodeKit will set it to whatever date the user first added this Project to the app, which is probably what you want. 170 | 171 | ### "displayValue" - `String` 172 | 173 | The name of the Project as it appears in the UI. If this is omitted, the name of the Project Root Folder will be used. 174 | 175 | ### "displayValueWasSetByUser" - `Integer` 176 | 177 | If `0`, CodeKit will keep `displayValue` in sync with the Project Root Folder name (as the user renames the folder, the `displayValue` will be updated to match). If `1`, renaming the folder has no effect on `displayValue`. If you omit this value, it defaults to `0`. 178 | 179 | ### "iconImageName" - `String` 180 | 181 | This is *either* the name of a default Project Icon Image from the list below **OR** a relative path from the Project Root Folder to the image (JPG or PNG) that should be used as the Project Icon. If you supply a relative path, it **MUST** begin with a `/`. 182 | 183 | If the specified image does not exist or you omit this property, CodeKit randomly selects a default icon. NOTE: If you want to maintain an exact icon, be sure to set `iconImageWasSetByUser` to `1`. 184 | 185 | The available Project Icon Names that are bundled into CodeKit are: 186 | 187 | * brackets_brown 188 | * brackets_gray 189 | * brackets_orange 190 | * brackets_green 191 | * brackets_magenta 192 | * brackets_purple 193 | * brackets_teal 194 | * brackets-brick 195 | * brackets-forest 196 | * brackets-koamaru 197 | * brackets-pink 198 | * brackets-red 199 | * brackets-slime 200 | * brackets-ucla 201 | * brackets-unblue 202 | * brackets-glace 203 | * brackets-pale 204 | * brackets-payne 205 | * brackets-silver 206 | * brackets-tar 207 | * brackets-azure 208 | * brackets-cafe 209 | * brackets-peach 210 | * brackets-verd 211 | * brackets-rose 212 | * logo-wordpress 213 | * logo-react 214 | * logo-vue 215 | * logo-angular 216 | * meme-harold 217 | * meme-putin 218 | * meme-morpheus 219 | * meme-thinking 220 | * meme-ariel 221 | * meme-ceiling 222 | * meme-cocaine 223 | * meme-facepalm 224 | * meme-fry 225 | * meme-girlfriend 226 | * meme-grumpy 227 | * meme-karate 228 | * meme-lotr 229 | * meme-soon 230 | * meme-trap 231 | * meme-wonka 232 | * meme-kanye 233 | * meme-hart 234 | * meme-owl 235 | * meme-punDog 236 | * meme-angryPicard 237 | * meme-cryingJordan 238 | * meme-kahn 239 | * meme-ive 240 | * meme-dunnoGirl 241 | * meme-greg 242 | * meme-chloe 243 | * meme-leo 244 | * meme-drunkArcher 245 | * meme-daenerys 246 | * meme-gavin 247 | * meme-krieger 248 | * meme-archer 249 | * meme-obama 250 | * meme-maroney 251 | * meme-crying 252 | * meme-confession 253 | * meme-doge 254 | * meme-jake 255 | * meme-ron 256 | * meme-confusedBaby 257 | * meme-angryBaby 258 | * meme-yesBaby 259 | 260 | ### "iconImageWasSetByUser" - `Integer` 261 | 262 | If `0`, CodeKit will automatically set an `apple-touch-icon.png` or `favicon` image as the Project Icon whenever it finds one anywhere in the Project. If `1`, `iconImageName` will not be changed when the app finds one of these files. If you omit this value, it defaults to `0`. 263 | 264 | ----------------------------- 265 | . 266 | . 267 | . 268 | . 269 | 270 | 271 | 272 | # Files 273 | 274 | #### Discussion 275 | This top-level property contains settings for each individual file in the Project. In CodeKit, every file has its own settings, which provides flexibility—one file can be set to minify while another does not, etc. 276 | 277 | When a new file is added to a Project for the first time, it won't have an entry in this object. Its initial settings are populated from whichever `languageDefaults` property of `projectSettings` is appropriate (based on file type). If `projectSettings` is missing an entry for a given `languageDefaults`, CodeKit falls back to the settings the user has specified under "Defaults For New Projects" within the app. At that level, **every** setting is guaranteed to have a value. 278 | 279 | When creating a Config File, you may find it faster to specify *only* the file-by-file settings that differ from the `projectSettings` you have specified. 280 | 281 | When *parsing* a Config File, you should never discard information from this object, as the user may have customized settings on a file-by-file basis and those customiziations would be lost (and restored to Project Settings values) if you discarded this object. 282 | 283 | #### The Files Object 284 | 285 | The files object is keyed by the **relative** path from the Project Root Folder to each file. The path **MUST** begin with a `/`. The exact keys in each file's object depend on the type of file. Here is an example for an `SCSS` file: 286 | 287 | ```javascript 288 | "files": { 289 | "/subfolder/file.scss": { 290 | "aP": 0, 291 | "bl": 0, 292 | "dP": 5, 293 | "dS": 0, 294 | "ft": 4, 295 | "ma": 0, 296 | "oA": 2, 297 | "oAP": "/build/subfolder/file.css", 298 | "oF": 0, 299 | "oS": 0, 300 | "uL": 1 301 | }, 302 | "/someOtherFile.js": { 303 | ... 304 | } 305 | } 306 | ``` 307 | 308 | ### Why Are The Keys Abbreviated? 309 | Because in Projects with tens of thousands of files, the extra characters add megabytes to the size of the Config File. 310 | 311 | . 312 | . 313 | . 314 | 315 | ## Keys Shared By All Files 316 | All files have the following keys, regardless of their type: 317 | 318 | 319 | ### "ft" — `Integer` 320 | 321 | This stands for "File Type". It is one of the `Integer` values from the table below. CodeKit uses this (along with other heuristics) to determine the "absolute truth" about a file's type. (A file's extension alone is not a reliable indicator because, for example, `*.js` and `*.jsm` and `*.es6` can all mean "JavaScript".) 322 | 323 | **CRITICAL:** If you are parsing the Config File in JavaScript, you must use `BigInt` to represent this value, as it may contain a value that is larger than `2^53`. If you are writing a Config File from scratch, you must use `BigInt` to represent this number for all values larger than `2^53` 324 | 325 | 326 | | File Type | Extension | Value | Raw Value | 327 | | --------------------- | ---------- | ----- | --------- | 328 | | Less | .less | 2^0 | 1 | 329 | | Sass | .sass | 2^1 | 2 | 330 | | SCSS | .scss | 2^2 | 4 | 331 | | Stylus | .styl | 2^3 | 8 | 332 | | CSS | .css | 2^4 | 16 | 333 | | CoffeeScript | .coffee | 2^5 | 32 | 334 | | Literate CoffeeScript | .litcoffee | 2^18 | 262144 | 335 | | JavaScript | .js | 2^6 | 64 | 336 | | TypeScript | .ts | 2^7 | 128 | 337 | | Haml | .haml | 2^8 | 256 | 338 | | Pug | .pug | 2^9 | 512 | 339 | | Slim | .slim | 2^10 | 1024 | 340 | | Kit | .kit | 2^11 | 2048 | 341 | | Markdown | .md, .mmd | 2^12 | 4096 | 342 | | Other* | [N/A] | 2^13 | 8192 | 343 | | JPEG | .jpg, .jpeg| 2^14 | 16384 | 344 | | PNG | .png | 2^15 | 32768 | 345 | | SVG | .svg | 2^21 | 2097152 | 346 | | GIF | .gif | 2^22 | 4194304 | 347 | | JSON | .json | 2^19 | 524288 | 348 | | Folder (Directory) | [N/A] | 2^16 | 65536 | 349 | 350 | 351 | #### The "Other" File Type: 352 | This is used for any type of file that is not otherwise listed above. It represents files for which CodeKit has no specific built-in processing. Examples: `.php`, `.html`, `.xml`, `.rb`, etc. 353 | 354 | #### Sass vs SCSS: 355 | Note that CodeKit uses two different `ft` values to represent `*.scss` and `*.sass` files. This is done so that the app is future-proof in case Sass and SCSS files ever adopt different, exclusive options. 356 | 357 | #### The "Folder" Type: 358 | Users can tell CodeKit to skip indexing a particular folder. They do this when the folder contains too many items that aren't relevant and indexing it would take a long time (e.g. `node_modules` folders). When the user does this, CodeKit does not store settings for each file in the folder, nor does it display those files in the UI. Instead, it asks the user what should be done with this folder (and its contents) when the Project builds—should the folder be ignored, or should it be copied into the build directory? To store this setting, an entry in the `files` object may have the value `65536` for `ft`, which means it refers to a folder instead of a file. 359 | 360 | #### Reserved Values: 361 | Do not use any value that is not explicitly listed in the table above. Doing so will cause CodeKit to ignore the entire settings object for that particular file. 362 | 363 | 364 | 365 | ### "oA" - `Integer` 366 | 367 | This stands for "Output Action". It specifies what CodeKit will do when a given file changes on disk or is processed during a Build. The value is one of: 368 | 369 | | Value | Action | Details | 370 | | ------ | --------------- | ------- | 371 | | 0 | Compile/Process | CodeKit will process this file on change and during Builds. If the file is of a type for which CodeKit does not have built-in processing AND the user has not specified a Hook to handle this type of file, the file will be copied to its output path as-is. 372 | | 1 | Ignore | On file-change and during Builds, this file will not be processed, but any files that import it will be. 373 | | 2 | Copy | On file-change and during Builds, CodeKit will copy this file as-is to its Output Path, **without** any processing/compiling. 374 | 375 | 376 | 377 | ### "oAP" - `String` 378 | 379 | This stands for "Output Abbreviated Path". It is the relative path from the Project Root Folder to the Output File you want to create when the given file is processed. It **MUST** begin with a `/`. 380 | 381 | Note: CodeKit *does* allow setting an Output Path to a location outside of the Project Root Folder, but that is extremely discouraged. If the `OutputPathIsOutsideProject` flag is set, CodeKit will interpret the path provided here as relative to the disk root instead of the Project Root Folder. 382 | 383 | 384 | ### "oF" - `Integer` 385 | 386 | This stands for "Output Flags". It is a **bitmask** (a single number where the value of each bit represents a boolean). The default value is `0`. Currently, only the first three bits are used: 387 | 388 | 389 | | Bit Position | Name | Explanation | 390 | | --------------- | -------------------------- | --------------- | 391 | | 0 | OutputActionWasSetByUser | CodeKit automatically changes a file's Output Action to `ignore` when that file is imported into others. If the value of this bit is `1`, the app will not automatically change the Output Action. CodeKit sets this bit to `1` anytime the user explicitly chooses an Output Action for the file in the UI. 392 | | 1 | OutputPathWasSetByUser | CodeKit adjusts a file's Output Path automatically when the file is renamed, moved, or when the Build folder is enabled/disabled. If this bit is set to `1`, the Output Path is locked; it will not be automatically adjusted. This bit is set to `1` when a user explicitly sets an Output Path for a file or clicks the "lock" button in CodeKit's UI. 393 | | 2 | OutputPathIsOutsideProject | If this bit is set to `1`, CodeKit interprets the path supplied for the `oAP` property as relative to the disk root instead of the Project Root Folder. 394 | 395 | . 396 | . 397 | . 398 | 399 | ## Less Keys 400 | 401 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, Less files have these keys: 402 | 403 | 404 | ### "aP" - `Integer` 405 | 406 | `Autoprefixer` If this value is `1`, CodeKit will run Autoprefixer on the compiled CSS file. If the value is `0`, CodeKit will *not* run Autoprefixer. 407 | 408 | 409 | ### "bl" - `Integer` 410 | 411 | `Bless` If this value is `1`, CodeKit will run Bless on the compiled CSS file. If the value is `0`, CodeKit will *not* run Bless. 412 | 413 | 414 | ### "eJ" - `Integer` 415 | 416 | `Enable JavaScript` If this value is `1`, CodeKit will set the Less compiler's "Enable JavaScript" option to true. If the value is `0`, that option will be set to false. 417 | 418 | 419 | ### "ie" - `Integer` 420 | 421 | `IE Compatibility` If this value is `1`, CodeKit will enable the "IE Compatibility" option on the Less compiler. If it is `0`, that option will be set to false. 422 | 423 | 424 | ### "iI" - `Integer` 425 | 426 | `Insecure Imports` If this value is `1`, CodeKit will enable the "Allow Insecure Imports" option on the Less compiler. If it is `0`, that option will be set to false. 427 | 428 | 429 | ### "ma" - `Integer` 430 | 431 | `Source Map` If this value is `1`, CodeKit will create a source map when compiling this file. If the value is `0`, it will *not* create a source map. 432 | 433 | 434 | ### "mS" - `Integer` 435 | 436 | `Math Style` This value controls which "Math Style" CodeKit enables for the Less compiler, which defines when the compiler performs math operations (see the Less docs for details). It is one of these values: 437 | 438 | | Value | Math Style | 439 | | ----------------- | --------------------------------------- | 440 | | 0 | Always Except Division Requires Parens | 441 | | 1 | Always | 442 | | 2 | Only Inside Parens | 443 | | 3 | Strict-Legacy (Deprecated) | 444 | 445 | 446 | ### "oS" - `Integer` 447 | 448 | `Output Style` This controls which output style the Less compiler uses. It is one of these values: 449 | 450 | | Value | Output Style | 451 | | ----------------- | --------------------- | 452 | | 0 | Regular | 453 | | 1 | Compressed (Minified) | 454 | 455 | 456 | ### "rwU" - `Integer` 457 | 458 | `Rewrite URLs` This value determines which setting CodeKit passes to the Less compiler for the "rewrite URLs" option. It is one of these values: 459 | 460 | | Value | Output Style | 461 | | ----------------- | ---------------------- | 462 | | 0 | Do not rewrite URLs | 463 | | 1 | Rewrite ALL URLs | 464 | | 2 | Rewrite only local URLs| 465 | 466 | 467 | ### "sI" - `Integer` 468 | 469 | `Strict Imports` If this value is `1`, CodeKit will enable the "strict imports" Less compiler option when compiling this file. If the value is `0`, this compiler option is set to false. 470 | 471 | 472 | ### "sU" - `Integer` 473 | 474 | `Strict Units` If this value is `1`, CodeKit will enable the "strict units" Less compiler option when compiling this file. If the value is `0`, this compiler option is set to false. 475 | 476 | 477 | . 478 | . 479 | . 480 | 481 | 482 | ## Sass and SCSS Keys 483 | 484 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, Sass and SCSS files have these keys: 485 | 486 | 487 | ### "aP" - `Integer` 488 | 489 | `Autoprefixer` If this value is `1`, CodeKit will run Autoprefixer on the compiled CSS file. If the value is `0`, CodeKit will *not* run Autoprefixer. 490 | 491 | 492 | ### "bl" - `Integer` 493 | 494 | `Bless` If this value is `1`, CodeKit will run Bless on the compiled CSS file. If the value is `0`, CodeKit will *not* run Bless. 495 | 496 | ### "dP" - `Integer` 497 | 498 | `Decimal Precision` This is the value passed to the Sass compiler for the "Decimal Precision" option. It should be between `0` and `10`. 499 | 500 | 501 | ### "dS" - `Integer` 502 | 503 | `Debug Style` This value controls which "Debug Style" CodeKit enables for the Sass compiler. It is one of these values: 504 | 505 | | Value | Debug Style | 506 | | ----------------- | --------------------------------------- | 507 | | 0 | None | 508 | | 1 | Print line numbers above selectors | 509 | | 2 | Print full debug info | 510 | 511 | 512 | ### "ma" - `Integer` 513 | 514 | `Source Map` If this value is `1`, CodeKit will create a source map when compiling this file. If the value is `0`, it will *not* create a source map. 515 | 516 | 517 | ### "oS" - `Integer` 518 | 519 | `Output Style` This controls which output style the Sass compiler uses. It is one of these values: 520 | 521 | | Value | Output Style | 522 | | ----------------- | --------------------- | 523 | | 0 | Nested | 524 | | 1 | Expanded | 525 | | 2 | Compact | 526 | | 3 | Compressed | 527 | 528 | 529 | ### "uL" - `Integer` 530 | 531 | `Use Libsass` If this value is `1`, CodeKit will use the Libsass compiler. If it is `0`, CodeKit will use the legacy Sass compiler. (Libsass is the default and is highly recommended.) 532 | 533 | . 534 | . 535 | . 536 | 537 | 538 | ## Stylus Keys 539 | 540 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, Stylus files have these keys: 541 | 542 | 543 | ### "aP" - `Integer` 544 | 545 | `Autoprefixer` If this value is `1`, CodeKit will run Autoprefixer on the compiled CSS file. If the value is `0`, CodeKit will *not* run Autoprefixer. 546 | 547 | 548 | ### "bl" - `Integer` 549 | 550 | `Bless` If this value is `1`, CodeKit will run Bless on the compiled CSS file. If the value is `0`, CodeKit will *not* run Bless. 551 | 552 | 553 | ### "dS" - `Integer` 554 | 555 | `Debug Style` This value controls which "Debug Style" CodeKit enables for the Stylus compiler. It is one of these values: 556 | 557 | | Value | Debug Style | 558 | | ----------------- | --------------------------------------- | 559 | | 0 | None | 560 | | 1 | Print line numbers above selectors | 561 | | 2 | Print Firebug info | 562 | | 3 | Print line numbers AND Firebug info | 563 | 564 | 565 | ### "iC" - `Integer` 566 | 567 | `Import CSS` If this value is `1`, CodeKit will set the Stylus compiler to import CSS files. If it is `0`, that option will be set to false. 568 | 569 | ### "ma" - `Integer` 570 | 571 | `Source Map` If this value is `1`, CodeKit will create a source map when compiling this file. If the value is `0`, it will *not* create a source map. 572 | 573 | 574 | ### "oS" - `Integer` 575 | 576 | `Output Style` This controls which output style the Stylus compiler uses. It is one of these values: 577 | 578 | | Value | Output Style | 579 | | ----------------- | --------------------- | 580 | | 0 | Regular | 581 | | 1 | Compressed | 582 | 583 | 584 | ### "rrU" - `Integer` 585 | 586 | `Resolve Relative URLs` If this value is `1`, CodeKit will set the Stylus compiler to resolve relative URLs. If the value is `0`, that option will be set to false. 587 | 588 | . 589 | . 590 | . 591 | 592 | ## CSS Keys 593 | 594 | Note: CodeKit allows users to process CSS files with Libsass to minify them, etc. (A CSS file may create another CSS file.) CSS files may also be the output of a Sass, Less, or Stylus file. In all cases, CodeKit stores the same properties for every CSS file—it simply does not use them when the CSS file is an output file. 595 | 596 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, CSS files have these keys: 597 | 598 | 599 | ### "aP" - `Integer` 600 | 601 | `Autoprefixer` If this value is `1`, CodeKit will run Autoprefixer on the CSS file. If the value is `0`, CodeKit will *not* run Autoprefixer. 602 | 603 | 604 | ### "bl" - `Integer` 605 | 606 | `Bless` If this value is `1`, CodeKit will run Bless on the CSS file. If the value is `0`, CodeKit will *not* run Bless. 607 | 608 | 609 | ### "ma" - `Integer` 610 | 611 | `Source Map` If this value is `1`, CodeKit will create a source map when compiling this file. If the value is `0`, it will *not* create a source map. 612 | 613 | 614 | ### "oS" - `Integer` 615 | 616 | `Output Style` This controls which output style the Libsass compiler uses when processing this CSS file. It is one of these values: 617 | 618 | | Value | Output Style | 619 | | ----------------- | --------------------- | 620 | | 0 | Nested | 621 | | 1 | Expanded | 622 | | 2 | Compact | 623 | | 3 | Compressed | 624 | 625 | 626 | . 627 | . 628 | . 629 | 630 | ## CoffeeScript Keys 631 | 632 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, CoffeeScript files have these keys. **NOTE:** These keys apply to both `*.coffee` and `*.litcoffee` file types. 633 | 634 | 635 | ### "ma" - `Integer` 636 | 637 | `Source Map` If this value is `1`, CodeKit will create a source map when compiling this file. If the value is `0`, it will *not* create a source map. 638 | 639 | 640 | ### "mi" - `Integer` 641 | 642 | `Minify Output` If this value is `1`, CodeKit will run TerserJS on the compiled output, after transpiling is complete (if performed). If the value is `0`, TerserJS will not be run. 643 | 644 | 645 | ### "oS" - `Integer` 646 | 647 | `Output Style` This controls which output style the CoffeeScript compiler uses when processing this file. It is one of these values: 648 | 649 | | Value | Output Style | 650 | | ----------------- | ----------------------------- | 651 | | 0 | Regular | 652 | | 1 | No top-level function wrapper | 653 | 654 | 655 | ### "sC" - `Integer` 656 | 657 | `Syntax Checker Type` This tells CodeKit which syntax checker to run when processing this file. It is one of these values: 658 | 659 | | Value | Syntax Checker | 660 | | ----------------- | --------------------- | 661 | | 0 | None | 662 | | 1 | CoffeeLint | 663 | 664 | 665 | ### "tS" - `Integer` 666 | 667 | `Transpiler Style` This tells CodeKit which transpiler to run on the *output* file, once the CoffeeScript file is processed. It is one of these values: 668 | 669 | | Value | Transpiler | 670 | | ----------------- | --------------------- | 671 | | 0 | None | 672 | | 1 | Babel | 673 | 674 | . 675 | . 676 | . 677 | 678 | ## JavaScript Keys 679 | 680 | Note: CodeKit does not process JavaScript files in-place. That is, a JS file is processed and creates another JS file at a separate path. Some JS files will therefore be "output files" produced by other JS files. CodeKit stores these properties for every JS file—they simply are not used for output files. 681 | 682 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, JavaScript files have these keys: 683 | 684 | ### "ma" - `Integer` 685 | 686 | `Source Map` If this value is `1`, CodeKit will create a source map when processing this file. If the value is `0`, it will *not* create a source map. 687 | 688 | 689 | ### "mi" - `Integer` 690 | 691 | `Minify Output` If this value is `1`, CodeKit will minify the output file using TerserJS, after transpiling and bundling are complete (if either is performed). If the value is `0`, the output file will not be minified. 692 | 693 | 694 | ### "sC" - `Integer` 695 | 696 | `Syntax Checker Type` This tells CodeKit which syntax checker to run when processing this file. It is one of the values below. You should **strongly** prefer ESLint over JSHint or JSLint. 697 | 698 | | Value | Syntax Checker | 699 | | ----------------- | --------------------- | 700 | | 0 | None | 701 | | 1 | JSHint | 702 | | 2 | JSLint | 703 | | 3 | ESLint | 704 | 705 | 706 | ### "tS" - `Integer` 707 | 708 | `Transpiler Style` This tells CodeKit which transpiler to run on this file. It is one of these values: 709 | 710 | | Value | Transpiler | 711 | | ----------------- | --------------------- | 712 | | 0 | None | 713 | | 1 | Babel | 714 | 715 | 716 | ### "bF" - `Integer` 717 | 718 | `Bundle Format` This value determines whether CodeKit runs RollupJS to bundle ES6 imports in this file and, if so, specifies the format of that bundle. It is one of these values: 719 | 720 | | Value | Bundle Format | 721 | | ----------------- | --------------------- | 722 | | 0 | None (Do not bundle) | 723 | | 1 | AMD | 724 | | 2 | CommonJS | 725 | | 3 | ESModule | 726 | | 4 | IIFE | 727 | | 5 | SystemJS | 728 | | 6 | UMD | 729 | 730 | 731 | . 732 | . 733 | . 734 | 735 | ## TypeScript Keys 736 | 737 | **NOTE:** TypeScript has *many* configuration options. A subset of those options is available on a file-by-file basis. The complete set of options is available in Project Settings. Options that appear only in Project Settings will apply to ALL TypeScript files in a Project. 738 | 739 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, TypeScript files have these keys: 740 | 741 | 742 | ### "cDF" - `Integer` 743 | 744 | `Create Declaration File` If this value is `1`, CodeKit will set the TypeScript compiler to create a `.d.ts` file. If it is `0`, that option will be set to false. 745 | 746 | 747 | ### "jxM" - `Integer` 748 | 749 | `JSX Handling` This value determines how the TypeScript compiler handles JSX code. It is one of these values: 750 | 751 | | Value | JSX Handling Mode | 752 | | ----------------- | --------------------- | 753 | | 0 | React | 754 | | 1 | Preserve | 755 | | 2 | ReactNative | 756 | 757 | 758 | ### "ma" - `Integer` 759 | 760 | `Source Map` If this value is `1`, CodeKit will create a source map when processing this file. If the value is `0`, it will *not* create a source map. 761 | 762 | 763 | ### "mi" - `Integer` 764 | 765 | `Minify Output` If this value is `1`, CodeKit will minify the output file using TerserJS. If the value is `0`, the output file will not be minified. 766 | 767 | 768 | ### "moR" - `Integer` 769 | 770 | `Module Resolution Type` This determines how the TypeScript compiler resolves modules. It is one of these values: 771 | 772 | | Value | Module Resolution | 773 | | ----------------- | --------------------- | 774 | | 0 | Node | 775 | | 1 | Classic | 776 | 777 | 778 | ### "moT" - `Integer` 779 | 780 | `Module Type` Thsi determines the Module Type the TypeScript compiler creates. It is one of these values: 781 | 782 | | Value | Module Type | 783 | | ----------------- | --------------------- | 784 | | 0 | CommonJS | 785 | | 1 | AMD | 786 | | 2 | System | 787 | | 3 | UMD | 788 | | 4 | ES2015 | 789 | | 5 | ESNext | 790 | 791 | 792 | ### "rC" - `Integer` 793 | 794 | `Remove Comments` If this value is `1`, CodeKit will enable the "Remove Comments" option on the TypeScript compiler. If it is `0`, that option will be set to false. 795 | 796 | 797 | ### "tEC" - `Integer` 798 | 799 | `Target ECMA Version` This determines the target ECMAScript version for which the TypeScript compiler generates code. It is one of these values: 800 | 801 | | Value | ECMAScript Version | 802 | | ----------------- | --------------------- | 803 | | 0 | ES3 | 804 | | 1 | ES5 | 805 | | 2 | ES2015 | 806 | | 3 | ES2016 | 807 | | 4 | ES2017 | 808 | | 2018 | ES2018 | 809 | | 5 | ESNext | 810 | 811 | . 812 | . 813 | . 814 | 815 | ## HAML Keys 816 | 817 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, HAML files have these keys: 818 | 819 | ### "cB" - `Integer` 820 | 821 | `Run Cache Buster` If this value is `1`, CodeKit will scan the compiled Output File for URLs and append a query parameter to each URL that loads a resource. This forces browsers to load the resource from disk rather than serve an outdated, cached copy. If the value is `0`, this step is not performed. 822 | 823 | 824 | ### "cDA" - `Integer` 825 | 826 | `Use CDATA` If this value is `1`, CodeKit will enable the "Use CDATA" option on the HAML compiler. If the value is `0`, that option will be set to false. 827 | 828 | 829 | ### "eHT" - `Integer` 830 | 831 | `Escape HTML Text` If this value is `1`, CodeKit will set the HAML compiler to escape HTML characters. If the value is `0`, it will set that compiler option to false. 832 | 833 | 834 | ### "hM" - `Integer` 835 | 836 | `Run HTML Minifier` If this value is `1`, CodeKit will run the compiled Output File through an HTML Minifier. If the value is `0`, that will not be done. 837 | 838 | 839 | ### "nEA" - `Integer` 840 | 841 | `No Escape In Attributes` If this value is `1`, CodeKit will set the HAML compiler to avoid escaping HTML characters in attributes. If the value is `0`, that option will be turned off. 842 | 843 | 844 | ### "oFM" - `Integer` 845 | 846 | `Output Format` This specifies which Output Format the HAML compiler should use. It is one of these values: 847 | 848 | | Value | Output Format | 849 | | ----------------- | --------------------- | 850 | | 0 | XHTML | 851 | | 1 | HTML4 | 852 | | 2 | HTML5 | 853 | 854 | 855 | ### "uDQ" - `Integer` 856 | 857 | `Use Double Quotes` If this value is `1`, the HAML compiler will use double-quotes. If the value is `0`, the compiler will use single-quotes. 858 | 859 | 860 | ### "uUN" - `Integer` 861 | 862 | `Use Unix Newlines` If this value is `1`, CodeKit will set the HAML compiler to use Unix newlines. If the value is `0`, that option will be set to false. 863 | 864 | 865 | . 866 | . 867 | . 868 | 869 | 870 | 871 | ## Pug Keys 872 | 873 | **NOTE:** CodeKit treats `*.jade` files as `*.pug` files, but compiles the former files with the legacy Jade compiler. The settings are the same for both types of files. 874 | 875 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, Pug files have these keys: 876 | 877 | 878 | ### "cB" - `Integer` 879 | 880 | `Run Cache Buster` If this value is `1`, CodeKit will scan the compiled Output File for URLs and append a query parameter to each URL that loads a resource. This forces browsers to load the resource from disk rather than serve an outdated, cached copy. If the value is `0`, this step is not performed. 881 | 882 | 883 | ### "cOD" - `Integer` 884 | 885 | `Compile-Debug` If this value is `1`, CodeKit will enable the "Compile Debug" option for the Pug compiler. If the value is `0`, that option will be set to false. 886 | 887 | 888 | ### "hM" - `Integer` 889 | 890 | `Run HTML Minifier` If this value is `1`, CodeKit will run the compiled Output File through an HTML Minifier. If the value is `0`, that will not be done. 891 | 892 | 893 | ### "oS" - `Integer` 894 | 895 | `Output Style` This value determines what type of output the Pug compiler produces. It is one of these values: 896 | 897 | | Value | Output Style | 898 | | ----------------- | --------------------- | 899 | | 0 | Indented | 900 | | 1 | Minified | 901 | 902 | 903 | . 904 | . 905 | . 906 | 907 | 908 | 909 | ## SLIM Keys 910 | 911 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, Slim files have these keys: 912 | 913 | 914 | ### "cB" - `Integer` 915 | 916 | `Run Cache Buster` If this value is `1`, CodeKit will scan the compiled Output File for URLs and append a query parameter to each URL that loads a resource. This forces browsers to load the resource from disk rather than serve an outdated, cached copy. If the value is `0`, this step is not performed. 917 | 918 | 919 | ### "cMO" - `Integer` 920 | 921 | `Compile Only` If this value is `1`, CodeKit will enable the "Compile Only" option on the SLIM compiler. If the value is `0`, that option will be set to false. 922 | 923 | 924 | ### "hM" - `Integer` 925 | 926 | `Run HTML Minifier` If this value is `1`, CodeKit will run the compiled Output File through an HTML Minifier. If the value is `0`, that will not be done. 927 | 928 | 929 | ### "llg" - `Integer` 930 | 931 | `Logicless` If this value is `1`, CodeKit will enable the "Logicless Mode" option on the SLIM compiler. If the value is `0`, that option will be set to false. 932 | 933 | 934 | ### "oS" - `Integer` 935 | 936 | `Output Style` This specifies the style of output the SLIM compiler should write. It is one of these values: 937 | 938 | | Value | Output Style | 939 | | ----------------- | --------------------- | 940 | | 0 | Indented | 941 | | 1 | Minified | 942 | 943 | 944 | ### "oFM" - `Integer` 945 | 946 | `Output Format` This specifies the type of file the SLIM compiler should produce. It is one of these values: 947 | 948 | | Value | Output Format | 949 | | ----------------- | --------------------- | 950 | | 0 | HTML | 951 | | 1 | XHTML | 952 | | 2 | XML | 953 | 954 | 955 | ### "rAC" - `Integer` 956 | 957 | `Rails Compatible` If this value is `1`, CodeKit will enable the "Generate Rails Compatible Code" option on the SLIM compiler. If the value is `0`, that option will be set to false. 958 | 959 | 960 | . 961 | . 962 | . 963 | 964 | ## Kit Keys 965 | 966 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, Kit files have these keys: 967 | 968 | ### "cB" - `Integer` 969 | 970 | `Run Cache Buster` If this value is `1`, CodeKit will scan the compiled Output File for URLs and append a query parameter to each URL that loads a resource. This forces browsers to load the resource from disk rather than serve an outdated, cached copy. If the value is `0`, this step is not performed. 971 | 972 | 973 | ### "hM" - `Integer` 974 | 975 | `Run HTML Minifier` If this value is `1`, CodeKit will run the compiled Output File through an HTML Minifier. If the value is `0`, that will not be done. Kit files can compile to **any** type (not just HTML), so enabling this option is only appropriate if the Output File is HTML. 976 | 977 | . 978 | . 979 | . 980 | 981 | 982 | 983 | ## Markdown Keys 984 | 985 | **NOTE:** CodeKit uses the MultiMarkdown compiler, which adds unique features to Markdown. The available options reflect this. 986 | 987 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, Markdown files have these keys: 988 | 989 | 990 | ### "cB" - `Integer` 991 | 992 | `Run Cache Buster` If this value is `1`, CodeKit will scan the compiled Output File for URLs and append a query parameter to each URL that loads a resource. This forces browsers to load the resource from disk rather than serve an outdated, cached copy. If the value is `0`, this step is not performed. 993 | 994 | 995 | ### "cS" - `Integer` 996 | 997 | `Critic Markup Style` This determines how the MMD compiler handles Critic Markup. It is one of these values: 998 | 999 | | Value | Critic Markup Handling| 1000 | | ----------------- | --------------------- | 1001 | | 0 | Ignore | 1002 | | 1 | Accept | 1003 | | 2 | Reject | 1004 | 1005 | 1006 | ### "eF" - `Integer` 1007 | 1008 | `Enable Footnotes` If this value is `1`, CodeKit will set the MMD compiler to enable footnotes. If the value is `0`, that option will be set to false. 1009 | 1010 | 1011 | ### "eL" - `Integer` 1012 | 1013 | `Enable Labels` If this value is `1`, CodeKit will set the MMD compiler to enable labels. If the value is `0`, that option will be set to false. 1014 | 1015 | 1016 | ### "eSQ" - `Integer` 1017 | 1018 | `Enable Smart Quotes` If this value is `1`, CodeKit will set the MMD compiler to support Smart Quotes. If the value is `0`, that option will be set to false. 1019 | 1020 | 1021 | ### "ema" - `Integer` 1022 | 1023 | `Mask Email Addresses` If this value is `1`, CodeKit will set the MMD compiler to mask email addresses. If the value is `0`, that option will be set to false. 1024 | 1025 | 1026 | ### "hM" - `Integer` 1027 | 1028 | `Run HTML Minifier` If this value is `1`, CodeKit will run the compiled Output File through an HTML Minifier. If the value is `0`, that will not be done. MultiMarkdown files can compile to several types (not just HTML), so enabling this option is only appropriate if the Output File is HTML. 1029 | 1030 | 1031 | ### "oFM" - `Integer` 1032 | 1033 | `Output Format` This controls the type of output file that MMD produces when compiling. It is one of these values: 1034 | 1035 | | Value | Output Format | 1036 | | ----------------- | --------------------- | 1037 | | 0 | HTML | 1038 | | 2 | LaTEX | 1039 | | 3 | Memoir | 1040 | | 4 | Beamer | 1041 | | 6 | FODT | 1042 | | 9 | Original Markdown | 1043 | | 11 | ODT | 1044 | | 12 | TEXT Bundle | 1045 | | 13 | Compressed TEXT Bundle| 1046 | | 14 | ePUB | 1047 | 1048 | 1049 | ### "oS" - `Integer` 1050 | 1051 | `Output Style` This controls the style of document that the MMD compiler produces. This option is meaningful only when the Output Format is set to HTML. It is one of these values: 1052 | 1053 | | Value | Output Style | 1054 | | ----------------- | --------------------- | 1055 | | 0 | Complete HTML Document| 1056 | | 1 | HTML Snippet | 1057 | 1058 | 1059 | ### "pHT" - `Integer` 1060 | 1061 | `Process HTML` If this value is `1`, the MMD compiler will be set to process HTML. If the value is `0`, the compiler will skip any HTML in the Markdown document. 1062 | 1063 | 1064 | ### "pME" - `Integer` 1065 | 1066 | `Parse Metadata` If this value is `1`, the MMD compiler will parse metadata while compiling. If the value is `0`, it will not. (Metadata is a unique MultiMarkdown feature.) 1067 | 1068 | 1069 | ### "rFN" - `Integer` 1070 | 1071 | `Random Footnote Numbers` If this value is `1`, the MMD compiler will use random numbers for footnotes. If the value is `0`, it will not. 1072 | 1073 | 1074 | ### "uCM" - `Integer` 1075 | 1076 | `Use Compatibility Mode` If this value is `1`, the MMD compiler will disable support for all MultiMarkdown extensions and process the input file as close as possible to John Gruber's original Markdown spec. If the value is `0`, MultiMarkdown features *will* be enabled. This setting overrides all others if it's `1`. 1077 | 1078 | . 1079 | . 1080 | . 1081 | 1082 | 1083 | 1084 | ## JSON Keys 1085 | 1086 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, JSON files have these keys: 1087 | 1088 | 1089 | ### "oO" - `Integer` 1090 | 1091 | `Order Output` If this value is `1`, CodeKit will sort keys alphabetically when processing the JSON file. (The order of items in Arrays will not be affected.) If the value is `0`, the order of keys in the file will be random. 1092 | 1093 | 1094 | ### "oS" - `Integer` 1095 | 1096 | `Output Style` This controls the style of the processed JSON file. It is one of these values: 1097 | 1098 | | Value | Output Style | 1099 | | ----------------- | --------------------- | 1100 | | 0 | Pretty-Printed | 1101 | | 1 | Minified | 1102 | 1103 | 1104 | . 1105 | . 1106 | . 1107 | 1108 | 1109 | 1110 | ## JPEG Keys 1111 | 1112 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, JPEG files have these keys: 1113 | 1114 | 1115 | ### "iS" - `Integer` 1116 | 1117 | `Initial Size` This is the size, in bytes, that the JPEG file was the first time CodeKit saw it. (CodeKit allows users to optimize images in-place, so the current size of the file is not necessarily its initial size.) 1118 | 1119 | 1120 | ### "jF" - `Integer` 1121 | 1122 | `JPEG Output Format` This determines what type of rendering the optimized JPEG will have. It is one of these values: 1123 | 1124 | | Value | Format | 1125 | | ----------------- | --------------------- | 1126 | | 0 | Keep Existing Format | 1127 | | 1 | Baseline | 1128 | | 2 | Progressive | 1129 | 1130 | 1131 | ### "oIPL" - `Integer` 1132 | 1133 | `Optimized In Place Lossy` If this value is `1`, this JPEG file has already been optimized in-place with lossy optimization (some quality reduction took place). If the value is `0`, the file has not previously been optimized in-place with lossy compression. CodeKit uses this value to warn the user before optimizing an image in-place multiple times with lossy compression. 1134 | 1135 | 1136 | ### "opt" - `Integer` 1137 | 1138 | `Optimized` If this value is `1`, this JPEG file has already been optimized in-place, but that optimization was lossless (no reduction in quality occurred). If the value is `0`, the file has not previously been losslessly optimized in-place. 1139 | 1140 | 1141 | ### "q" - `Integer` 1142 | 1143 | `Quality` This is a value between `0` and `100`, which specifies how aggressive to be when performing lossy optimizations. Higher values retain image quality, lower values sacrifice quality for smaller files. In general, values around `85` produce satisfactory images with 50-70% size reductions. 1144 | 1145 | . 1146 | . 1147 | . 1148 | 1149 | 1150 | 1151 | ## PNG Keys 1152 | 1153 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, PNG files have these keys: 1154 | 1155 | 1156 | ### "iS" - `Integer` 1157 | 1158 | `Initial Size` This is the size, in bytes, that the PNG file was the first time CodeKit saw it. (CodeKit allows users to optimize images in-place, so the current size of the file is not necessarily its initial size.) 1159 | 1160 | 1161 | ### "oIPL" - `Integer` 1162 | 1163 | `Optimized In Place Lossy` If this value is `1`, this PNG file has already been optimized in-place with lossy optimization (some quality reduction took place). If the value is `0`, the file has not previously been optimized in-place with lossy compression. CodeKit uses this value to warn the user before optimizing an image in-place multiple times with lossy compression. 1164 | 1165 | 1166 | ### "opt" - `Integer` 1167 | 1168 | `Optimized` If this value is `1`, this PNG file has already been previously optimized in-place, but that optimization was lossless (no reduction in quality occurred). If the value is `0`, the file has not previously been losslessly optimized in-place. 1169 | 1170 | 1171 | ### "oT" - `Integer` 1172 | 1173 | `Optimizer Type` This specifies which PNG Optimizer should be used to process this file. **NOTE**: This value is a bitmask (each bit represents a Boolean on/off). To enable a specific optimizer, you set the bit in that position to `1`. To disable that optimizer, you set the bit to `0`. There are currently only two optimizers. To run *only* PNGQuant, set the value of `oT` to `0`. To run *only* OptiPNG, set it to `1`. 1174 | 1175 | | Bit Position | Optimizer | 1176 | | ----------------- | --------------------- | 1177 | | 0 | PNGQuant | 1178 | | 1 | OptiPNG | 1179 | 1180 | 1181 | ### "q" - `Integer` 1182 | 1183 | `Quality` This is a value between `0` and `100`, which specifies how aggressive to be when performing lossy optimizations. Higher values retain image quality, lower values sacrifice quality for smaller files. In general, anything above `80` produces satisfactory images with 50-70% size reductions. 1184 | 1185 | . 1186 | . 1187 | . 1188 | 1189 | 1190 | 1191 | ## SVG Keys 1192 | 1193 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, SVG files have these keys: 1194 | 1195 | 1196 | ### "miP" - `Integer` 1197 | 1198 | `Use MultiPass` If this value is `1`, SVGO will run multiple passes to optimize the file. If the value is `0`, it will run only one pass. 1199 | 1200 | 1201 | ### "opt" - `Integer` 1202 | 1203 | `Optimized` If this value is `1`, this SVG file has already been previously optimized in-place. If the value is `0`, the file has not previously been optimized in-place. 1204 | 1205 | 1206 | ### "plM" - `Integer` 1207 | 1208 | `Plugin Mask` This is a 64-Bit bitmask: each bit of the number functions as a Boolean to turn a specific SVGO plugin on or off. To turn a plugin ON, set the value of the corresponding bit to `1`. To turn a plugin OFF, set the value of the bit to `0`. The plugin associated with each bit appears in the table below. 1209 | 1210 | **WARNING:** If you are parsing the Config File in JavaScript, you must use a `BigInt` for this value. If you are creating a Config File from scatch, you can use the `Number` type as long as you do not need to set any bits over `2^53`. 1211 | 1212 | | Bit Position | SVGO Plugin | 1213 | |--------------|---------------------------------------------------------| 1214 | | 0 | Cleanup Attributes | 1215 | | 1 | Remove DOCTYPE Declaration | 1216 | | 2 | Remove XML Processing Instructions | 1217 | | 3 | Remove Comments | 1218 | | 4 | Remove Metadata | 1219 | | 5 | Remove Title | 1220 | | 6 | Remove Description | 1221 | | 7 | Remove Useless Definitions | 1222 | | 8 | Remove Editor Namespace Data | 1223 | | 9 | Remove Empty Attributes | 1224 | | 10 | Remove Hidden Elements | 1225 | | 11 | Remove Empty Text Elements | 1226 | | 12 | Remove Empty Containers | 1227 | | 13 | Remove ViewBox | 1228 | | 14 | Cleanup Enable Background | 1229 | | 15 | Minify Styles | 1230 | | 16 | Convert Styles to Attributes | 1231 | | 17 | Convert Colors | 1232 | | 18 | Convert Path Data | 1233 | | 19 | Convert Transform | 1234 | | 20 | Remove Unknowns and Defaults | 1235 | | 21 | Remove Non-Inheritable Group Attributes | 1236 | | 22 | Remove Useless Stroke and Fill | 1237 | | 23 | Remove Unused Namespace | 1238 | | 24 | Cleanup IDs | 1239 | | 25 | Cleanup Numeric Values | 1240 | | 26 | Move Element Attributes to Group | 1241 | | 27 | Move Group Attributes to Elements | 1242 | | 28 | Collapse Groups | 1243 | | 29 | Remove Raster Images | 1244 | | 30 | Merge Paths | 1245 | | 31 | Convert Shape To Path | 1246 | | 32 | Sort Attributes | 1247 | | ~~33~~ | ~~DEPRECATED AND REMOVED~~ | 1248 | | 34 | Remove Dimensions | 1249 | | 35 | Remove Attributes | 1250 | | 36 | Add Classes to SVG Element | 1251 | | 37 | Remove Style Element | 1252 | | 38 | Remove XML Namespace | 1253 | | 39 | Remove Script Element | 1254 | | 40 | Inline Styles | 1255 | | 41 | Cleanup List of Values | 1256 | | 42 | Remove Off-Canvas Paths | 1257 | | 43 | Reuse Paths | 1258 | | 44 | Sort Defs Children | 1259 | | 45 | Convert Ellipse To Circle | 1260 | 1261 | 1262 | ### "pRP" - `Integer` 1263 | 1264 | `Pretty Printed` If this value is `1`, SVGO will produce output that is human-readable. If the value is `0`, the output will be minified. 1265 | 1266 | . 1267 | . 1268 | . 1269 | 1270 | 1271 | 1272 | ## GIF Keys 1273 | 1274 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, GIF files have these keys: 1275 | 1276 | 1277 | ### "iS" - `Integer` 1278 | 1279 | `Initial Size` This is the size, in bytes, that the GIF file was the first time CodeKit saw it. (CodeKit allows users to optimize images in-place, so the current size of the file is not necessarily its initial size.) 1280 | 1281 | 1282 | ### "opt" - `Integer` 1283 | 1284 | `Optimized` If this value is `1`, this GIF file has already been previously optimized in-place, but that optimization was lossless (no reduction in quality occurred). If the value is `0`, the file has not previously been losslessly optimized in-place. 1285 | 1286 | . 1287 | . 1288 | . 1289 | 1290 | 1291 | 1292 | ## Keys For Folder File Types 1293 | 1294 | The Folder type has no additional keys other than the [shared keys](#keys-shared-by-all-files) common to all files. 1295 | 1296 | . 1297 | . 1298 | . 1299 | 1300 | 1301 | 1302 | ## Keys For Other File Types 1303 | 1304 | In addition to the [shared keys](#keys-shared-by-all-files) common to all files, files of "Other" type have these keys: 1305 | 1306 | 1307 | ### "cB" - `Integer` 1308 | 1309 | `Run Cache Buster` If this value is `1`, CodeKit will scan this file for URLs and append a query parameter to each URL that loads a resource. This forces browsers to load the resource from disk rather than serve an outdated, cached copy. If the value is `0`, this step is not performed. 1310 | 1311 | 1312 | ### "hM" - `Integer` 1313 | 1314 | `Run HTML Minifier` If this value is `1`, CodeKit will run this file through an HTML Minifier. If the value is `0`, that will not be done. Enabling this option is appropriate only if the file is HTML. 1315 | 1316 | -------------------------- 1317 | . 1318 | . 1319 | . 1320 | . 1321 | 1322 | 1323 | # Project Settings 1324 | 1325 | This is a `{"key": value, ...}` Object that stores a massive amount configuration options. There are several main "sections" to Project Settings: 1326 | 1327 | * **Top-Level Settings** - These are top-level key/value pairs on the Project Settings object. 1328 | 1329 | * **Language Defaults** - When a new file is added to the Project, these objects store the initial settings that should be used for that file. These initial settings are also used as a fallback in case a `file` object does not contain a value for a particular setting. There is one of these objects for each type of file that CodeKit supports. There is ALSO one of these objects for each custom langauge the User has added to CodeKit. 1330 | 1331 | . 1332 | . 1333 | . 1334 | 1335 | ## Top-Level Settings 1336 | 1337 | 1338 | ### "abortBuildOnError" - `Integer` 1339 | 1340 | If this value is `1`, CodeKit will stop a Build whenever one file has an error. (Warnings do not count as errors.) If the value is `0`, the Build will continue. 1341 | 1342 | 1343 | ### "allowInjectionReloads" - `Integer` 1344 | 1345 | If this value is `1`, CodeKit will reload *just* stylesheets when a change occurs that affects only CSS. (It will reload the entire page if a change affects other types of files.) If this value is `0`, CodeKit will reload the entire page everytime a browser refresh is triggered. 1346 | 1347 | 1348 | ### "alwaysUseExternalServer" - `Integer` 1349 | 1350 | If this value is `1`, CodeKit's preview server will proxy all requests to the server at the address specified by `externalServerAddress`. If this value is `0`, CodeKit will use its internal HTTP server to handle requests. 1351 | 1352 | 1353 | ### "animateCSSInjections" - `Integer` 1354 | 1355 | If this value is `1`, CodeKit will animate changes to CSS when reloading stylesheets. If the value is `0`, it will not. 1356 | 1357 | 1358 | ### "autoBuildNewItems" - `Integer` 1359 | 1360 | If this value is `1`, CodeKit will automatically process/compile new files as they are added to the Project. (This is done *only* if the Project uses a Build folder, since auto-processing files without a Build folder could be destructive.) If the value is `0`, new items are not automatically processed. 1361 | 1362 | 1363 | ### "autoprefixerEnableIEGrid" - `Integer` 1364 | 1365 | If this value is `1`, the Autoprefixer "Support for IE Grid" option is enabled when running Autoprefixer. If the value is `0`, that option is set to false. 1366 | 1367 | 1368 | ### "babel7PresetType" - `Integer` 1369 | 1370 | This controls which presets are used when running Babel. The value is a bitmask—each bit represents a boolean that controls a specific preset, as depicted in the table below. To turn a preset ON, set the corresponding bit to `1`. To turn a preset OFF, set the corresponding bit to `0`. (The default value is `1`, which enables the `ENV` preset.) 1371 | 1372 | | Bit Position | Babel Preset | 1373 | | ----------------- | --------------------- | 1374 | | 0 | ENV | 1375 | | 1 | React | 1376 | | 2 | Flow | 1377 | 1378 | 1379 | ### "babelAllowRCFiles" - `Integer` 1380 | 1381 | If this value is `1`, Babel will look for and load `.babelrc` files while transpiling. If the value is `0`, those files will be ignored. 1382 | 1383 | 1384 | ### "babelAuxiliaryCommentAfter" - `String` 1385 | 1386 | This `String` is written after each change that Babel makes in transpiled code. The default value is an empty string: `""` 1387 | 1388 | 1389 | ### "babelAuxiliaryCommentBefore" - `String` 1390 | 1391 | This `String` is written before each change that Babel makes in transpiled code. The default value is an empty string: `""` 1392 | 1393 | 1394 | ### "babelConfigType" - `Integer` 1395 | 1396 | This controls where Babel gets its configuration. It is one of these values: 1397 | 1398 | | Value | Description | 1399 | | ----------------- | --------------------- | 1400 | | 0 | Auto - Babel selects which plugins to use based on the BrowsersList string. (Babel-Preset-ENV) | 1401 | | 1 | Manual - The plugins and presets specified by the user in CodeKit's UI are used. | 1402 | | 2 | Config File - All configuration options from CodeKit are ignored and the user is responsible for configuring Babel with a Babel configuration file in the Project. | 1403 | 1404 | 1405 | ### "babelCustomPluginsList" - `String` 1406 | 1407 | This is a comma-separated list of additional plugins that should be passed to Babel. The user is responsible for installing these plugins in a `node_modules` folder within the Project. The default value is an empty string: `""` 1408 | 1409 | ### "babelCustomPresetList" - `String` 1410 | 1411 | This is a comma-separated list of additional presets that should be passed to Babel. The user is responsible for installing these presets in a `node_modules` folder within the project. The default value is an empty string: `""` 1412 | 1413 | 1414 | ### "babelExcludeString" - `String` 1415 | 1416 | This is a comma-separated list of regex patterns that are passed to Babel as paths/items to skip when transpiling. The default value excludes any item with a path component matching `node_modules`, `core-js`, or `bower_components`: `"/\\/node_modules\\//, /\\/core-js\\//, /\\/bower_components\\//"` 1417 | 1418 | 1419 | ### "babelInsertModuleIDs" - `Integer` 1420 | 1421 | If this value is `1`, Babel will insert module IDs during transpiling. If the value is `0`, it will not. 1422 | 1423 | 1424 | ### "babelModuleID" - `String` 1425 | 1426 | This `String` specifies the module ID to insert if `babelInsertModuleIDs` is `1`. The default value is an empty string: `""` 1427 | 1428 | 1429 | ### "babelNoComments" - `Integer` 1430 | 1431 | If this value is `1`, Babel will not insert auxiliary comments. If it is `0`, the comments specified in `babelAuxiliaryCommentAfter` and `babelAuxiliaryCommentBefore` will be inserted. 1432 | 1433 | 1434 | ### "babelPlugins" - `{"key": {"key": value}, ...}` 1435 | 1436 | This is a list of all the standard Babel Plugins (those bundled with CodeKit) and whether they are enabled/disabled for this Project. Each entry in this Object looks like this: 1437 | 1438 | ```javascript 1439 | "babelPlugins": { 1440 | "arrow-functions": { 1441 | "active": 0 1442 | }, 1443 | ... 1444 | } 1445 | ``` 1446 | 1447 | Entries are keyed by the name of a specific plugin from the list below. If the plugin should be used when Babel runs, the `active` property is set to `1`. If the plugin should NOT be used when Babel runs, set the `active` property to `0`. Do not add any items other than those in the list below. To set custom plugins, use `babelCustomPluginsList`. 1448 | 1449 | **NOTE:** By default, Babel auto-selects which plugins to use based on the Browsers specified in the BrowsersList string. If you want to manually specify which plugins to run, you must set the `babelConfigType` property to `1`. 1450 | 1451 | List of Babel plugin names to use: 1452 | 1453 | ```javascript 1454 | "arrow-functions" 1455 | "async-generator-functions" 1456 | "async-to-generator" 1457 | "block-scoped-functions" 1458 | "block-scoping" 1459 | "class-properties" 1460 | "classes" 1461 | "computed-properties" 1462 | "decorators" 1463 | "destructuring" 1464 | "do-expressions" 1465 | "dotall-regex" 1466 | "duplicate-keys" 1467 | "exponentiation-operator" 1468 | "export-default-from" 1469 | "external-helpers" 1470 | "flow-strip-types" 1471 | "for-of" 1472 | "function-bind" 1473 | "function-name" 1474 | "function-sent" 1475 | "inline-consecutive-adds" 1476 | "inline-environment-variables" 1477 | "instanceof" 1478 | "jscript" 1479 | "literals" 1480 | "logical-assignment-operators" 1481 | "member-expression-literals" 1482 | "merge-sibling-variables" 1483 | "minify-booleans" 1484 | "minify-builtins" 1485 | "minify-constant-folding" 1486 | "minify-dead-code-elimination" 1487 | "minify-flip-comparisons" 1488 | "minify-guarded-expressions" 1489 | "minify-infinity" 1490 | "minify-mangle-names" 1491 | "minify-numeric-literals" 1492 | "minify-simplify" 1493 | "minify-type-constructors" 1494 | "modules-amd" 1495 | "modules-commonjs" 1496 | "modules-systemjs" 1497 | "modules-umd" 1498 | "named-capturing-groups-regex" 1499 | "new-target" 1500 | "node-env-inline" 1501 | "nullish-coalescing-operator" 1502 | "numeric-separator" 1503 | "object-assign" 1504 | "object-rest-spread" 1505 | "object-set-prototype-of-to-assign" 1506 | "object-super" 1507 | "optional-catch-binding" 1508 | "optional-chaining" 1509 | "parameters" 1510 | "partial-application" 1511 | "pipeline-operator" 1512 | "private-methods" 1513 | "property-literals" 1514 | "property-mutators" 1515 | "proto-to-assign" 1516 | "react-constant-elements" 1517 | "react-display-name" 1518 | "react-inline-elements" 1519 | "react-jsx" 1520 | "react-jsx-compat" 1521 | "react-jsx-self" 1522 | "react-jsx-source" 1523 | "regenerator" 1524 | "regexp-constructors" 1525 | "remove-console" 1526 | "remove-debugger" 1527 | "remove-undefined" 1528 | "reserved-words" 1529 | "runtime" 1530 | "shorthand-properties" 1531 | "simplify-comparison-operators" 1532 | "spread" 1533 | "sticky-regex" 1534 | "strict-mode" 1535 | "template-literals" 1536 | "throw-expressions" 1537 | "typeof-symbol" 1538 | "undefined-to-void" 1539 | "unicode-property-regex" 1540 | "unicode-regex" 1541 | ``` 1542 | 1543 | 1544 | ### "babelRetainLines" - `Integer` 1545 | 1546 | If this value is `1`, Babel will attempt to keep line numbers the same during transpiling. If the value is `0`, it will not. 1547 | 1548 | 1549 | ### "babelUseBuiltInsType" - `Integer` 1550 | 1551 | This controls the `useBuiltIns` Babel option. It is one of these values: 1552 | 1553 | | Value | UseBuiltIns Option | 1554 | | ----------------- | --------------------- | 1555 | | 0 | False | 1556 | | 1 | Entry | 1557 | | 2 | Usage | 1558 | 1559 | 1560 | ### "bowerAbbreviatedPath" - `String` 1561 | 1562 | This `String` provides the relative path from the Project Root Folder to the folder where Bower should install components. The default is `"bower_components"`, which will create a subfolder with that name in the Project Root Folder. 1563 | 1564 | 1565 | ### "bowerForceLatestOnConflict" - `Integer` 1566 | 1567 | If this value is `1`, Bower will automatically use the latest version of a component when a conflict arises. If the value is `0`, Bower will output an error and refuse to continue until the user resolves the conflict manually. 1568 | 1569 | 1570 | ### "bowerTargetDependencyListType" - `Integer` 1571 | 1572 | This controls to which dependency list in the `bower.json` an installed component is added. It is one of these values: 1573 | 1574 | | Value | Dependency List | 1575 | | ----------------- | --------------------- | 1576 | | 1 | Production | 1577 | | 2 | Development | 1578 | 1579 | 1580 | ### "bowerUseExactVersion" - `Integer` 1581 | 1582 | If this value is `1`, when a component is installed, the `bower.json` file will specify that the **exact** version installed is required. If the value is `0`, the `bower.json` file will use a semantic version string that allows any newer version of the component, up to but not including any version where the first non-zero version number has changed. 1583 | 1584 | 1585 | ### "browserRefreshDelay" - `Integer` 1586 | 1587 | This is the number of seconds that CodeKit will wait between the end of processing a file and issuing a command to refresh browsers. It is useful for people working on remote servers, where there is a lag between the time a file finishes processing and the time it finishes uploading to the remote server's disk. The default value is `0`. The maximum value is `10`. 1588 | 1589 | 1590 | ### "browserslistString" - `String` 1591 | 1592 | This `String` is used by Autoprefixer and Babel (if Babel is set to auto-configure itself). The value **MUST** be a valid browserslist string or Autoprefixer and Babel will fail to run. 1593 | 1594 | 1595 | ### "buildFolderActive" - `Integer` 1596 | 1597 | If this value is `1`, this Project uses a Build Folder. If the value is `0`, it does not. **NOTE:** When this setting is toggled in CodeKit, the app automatically adjusts every file's Output Path by either adding or removing the `buildFolderName` to the beginning of the Output Path, as appropriate. If you change this setting manually, YOU are responsible for making sure the Output Path of each file (or the `lanagugeDefaults` object used to automatically set Output Paths on each type of file) are set appropriately. 1598 | 1599 | 1600 | ### "buildFolderName" - `String` 1601 | 1602 | This is the name of the Build folder. It cannot be an empty string. The default value is `"build"`. 1603 | 1604 | 1605 | ### "cleanBuild" - `Integer` 1606 | 1607 | If this value is `1`, CodeKit will delete everything in the Build folder before beginning a new Build. If the value is `0`, existing items will not be deleted when a new build starts. 1608 | 1609 | 1610 | ### "coffeeLintFlags2" - ` 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | ---------------------------- 1620 | . 1621 | . 1622 | . 1623 | . 1624 | 1625 | # Build Steps 1626 | This is the top-level property named `buildSteps`, which is an `Array` of `{"string": value}`. There are currently three types of Build Steps: 1627 | 1628 | * "run a script" 1629 | * "process specific files" 1630 | * "process all remaining files" 1631 | 1632 | The `buildSteps` Array may contain any number of the first two types and **exactly one** of the third type. The order matters; it is the order in which the user expects the steps to execute. Each type of Build Step has a slightly different structure: 1633 | 1634 | 1635 | ### Process Certain Files 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | 1643 | 1644 | 1645 | 1646 | 1647 | --------------------------------------------------------------------------------