-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathparams.json
1 lines (1 loc) · 11.4 KB
/
params.json
1
{"name":"Anvil JS","note":"Don't delete this file! It's used internally to help with page regeneration.","tagline":"Hammer your code into shape","google":"","body":"# Anvil\r\n\r\nAnvil started as a way to build a single javascript module from several source files. Build tools that require a lot of explicit/declarative instructions distract from getting work on the project done.\r\n\r\nAnvil has been rewritten as a general build system with a plugin architecture. It should be easy to add features or change almost any behavior as needed. There's a lot of work going on now that will add new ways to use and extend anvil.\r\n\r\n## What Does It Do?\r\n\r\nAll parts of the build process are implemented as plugins. Some plugins ship along with anvil's source so that it can do _something_ out of the box. Most of the interesting features will likely be plugins that you install.\r\n\r\nA baseline install can do the following:\r\n\r\n* Install, remove, enable or disable plugins\r\n* Automatically install any plugins your build file defines as dependencies\r\n* Run local tasks (follows the same api as a plugin)\r\n* Continuously and incrementally build the project as files change\r\n* Create default build files based on installed plugins\r\n* Combine resource files through a comment-based import syntax\r\n* Concat resource files in specified order using\r\n * JSON or YAML file that lists files to create from other files\r\n * individual JSON or YAML files\r\n* Replace tokens (with customizable syntax) in source with \r\n * values from package.json\r\n * JSON or YAML key/value files\r\n* Add file headers to final build output based on output file type\r\n\r\n## Installation\r\n\r\n npm install anvil.js -g\r\n\r\n## By Convention\r\n\r\nWithout a build file, anvil will use its default conventions to attempt to build your project.\r\n\r\n## The Build File ( minimalist example )\r\n\r\n {\r\n \"source\": \"src\",\r\n \"spec\": \"spec\"\r\n \"output\": \"build\"\r\n \"dependencies\": [ \"anvil.mocha\" ]\r\n }\r\n\r\n* source is the path where _all_ project source belongs; this can be a flat or complex hierarchy\r\n* output is a list of paths to copy build output to.\r\n* spec is the folder where test specifications can be found\r\n* dependencies is a list of anvil plugin names that should be installed before the build can proceed\r\n\r\n## Building By Convention\r\n\r\nIf you don't specify your own build file, anvil assumes you intend to use a build.json file. If one isn't present, it will use its own conventions to build your project. If that's all you need, great! Chances are you'll want a build.json that's configured for your specific project.\r\n\r\n## Writing New Build Files\r\n\r\nKeeping up with all the plugin defaults can be difficult. To see what's available by default for each plugin, you can write a new build file for customization.\r\n\r\n anvil --write {name}\r\n\r\nThis command creates a build file in the current directory at {name}.json. It will include all the default settings for all the installed and built-in plugins.\r\n\r\n## Combining source files, Import Style\r\n\r\nAnvil allows you to combine source files by using a commented command\r\n\r\n**Javascript**\r\n\r\n // import(\"dependency.{ext}\");\r\n\r\n**Coffeescript**\r\n\r\n ### import \"dependency.{ext}\" ###\r\n\r\n**Stylus, LESS, CSS**\r\n\r\n CSS: \t\t\t/* import \"dependency.{ext}\" */ \r\n LESS, Stylus:\t// import \"dependency.{ext}\r\n\r\nWhen you use anvil to compile your project, it will traverse all the files in your source directory and combine them so that your top level files are what get output. \r\n\r\n**Warning** Currently, anvil is not clever enough to detect circular dependencies created via import statements and it will _shatter your world_ if you do this.\r\n\r\n## Combining source files, Concatenation Style\r\n\r\nAnvil provides you with two ways to drive concatenation: yaml lists or individual yaml files\r\n\r\n### List Files\r\nAnvil allows you to combine source files by listing the order of concatenation in a JSON or YAML format. Note: the paths must all be absolute OR relative to the top level of your source folder.\r\n\r\n#### JSON Format\r\n {\r\n \"./file1.js\": [ \"./file1a.js\", \"./file1b.js\", \"./file1c.js\" ],\r\n \"./file2.js\": [ \"./file2a.js\", \"./file2b.js\", \"./file2c.js\" ],\r\n }\r\n\r\n#### YAML Format\r\n\r\n ./file1.js:\r\n - ./file1a.js\r\n - ./file1b.js\r\n - ./file1c.js\r\n\r\n file2.js:\r\n - ./file2a.js\r\n - ./file2b.js\r\n - ./file2c.js\r\n\r\n\r\nAnvi will create file1.js and file2.js by concatenating the corresponding list of files in the order they appear.\r\n\r\n### Individual Files\r\nThis approach allows you to create a list of files to concatenate to create the final outcome. The name and location of the file will be identical to the original but anvil will strip the .json or .yaml extension off.\r\n\r\n#### JSON Format\r\n { \"imports\": [ \"./file1a.js\", \"./file1c.js\", \"./file1c.js\" ] }\r\n\r\n#### YAML Format\r\nfile1.js.yaml's contents:\r\n\r\n - ./file1a.js \r\n - ./file1b.js \r\n - ./file1c.js \r\n\r\n\r\nEach example would produce file1.js and concat each of the three listed files together to create its contents. ***NOTE***: The paths in an individual concat file _must_ be relative to the concat file itself.\r\n\r\n## Building With Specific Build Files\r\n\r\nTo build with a specific build file\r\n\r\n anvil -b <buildfile>\r\n\r\n## Continuous Integration\r\n\r\nAnvil will watch your source directory for changes and incrementally rebuild changed files ( and any affected files ).\r\n\r\n anvil --ci\r\n\r\nYou can configure a build to always run in this mode by adding the following JSON snippet to your build.json file:\r\n \r\n \"fileLoader\": {\r\n \"continuous\": \"true\"\r\n }\r\n\r\n## Console log\r\n\r\nAnvil uses color-coded messages to let you see what's happening during the build. Here's the color key:\r\n\r\n magenta - debug\r\n default - events\r\n blue - build steps\r\n green - success\r\n yellow - warning\r\n red - error\r\n\r\nBy default anvil will print everything but debug and warning messages unless you provide a --verbose argument or add this to your build.json :\r\n\r\n \"log\": {\r\n \"debug\": true\r\n }\r\n\r\nYou can tell anvil to run in quiet mode (it will still print errors (red) and step completions (green) )\r\n\r\n anvil -q\r\n\r\n# Plugins & Tasks\r\nAnvil has two primary points for extension: plugins (things installed by anvil from npm) and tasks (local plugins).\r\n\r\n## Plugins\r\nAnvil installs plugins from npm to a global location: ~/.anvilplugins/node_modules and keeps a manifest of installed and enabled plugins at: ~/.anvilplugins/plugins.json.\r\n\r\nOnce a plugin is installed, anvil will load it and use it in the build process unless you:\r\n * Disable it globally with '''anvil disable {pluginname}''' at the command line\r\n * Explicitly include other plugins besides it in the build file\r\n * Explicitly exclude it in the build file\r\n\r\n### When Plugins Misbehave\r\nAnvil will attempt to automatically disable a plugin that throws an exception that would break the build. This is to try and prevent an installed plugin from breaking your build system.\r\n\r\n### Installing & Uninstalling\r\nAnvil provides simple command line arguments to install or uninstall plugins to itself at a global level:\r\n\r\n anvil install {pluginname}\r\n\r\nor\r\n\r\n anvil uninstall {pluginname}\r\n\r\nYou can also install plugins from a file path using the relative path to the plugin directory in place of the plugin's name.\r\n\r\n### Enabling & Disabling\r\nAnvil provides command line arguments that allow you to enable or disable plugins at the global level:\r\n\r\n anvil enable {pluginname}\r\n\r\nor\r\n\r\n anvil disable {pluginname}\r\n\r\nDisabled plugins should never be loaded into a build session.\r\n\r\n### Updating Plugins\r\nAnvil will check npm for updates to all globally installed plugins with one simple command:\r\n\r\n anvil update\r\n\r\nThis command will take longer the more plugins you have installed and the more plugins which require updates from npm. Note: anvil automatically does this every time you install a new anvil version from npm.\r\n\r\n\r\n### Including Specific Plugins\r\nAnvil's build file now supports explicit inclusion only so that only plugins which you specify in the build file will be run as part of the build.\r\n\r\n \"plugins\": {\r\n \"include\": [ \"anvil.one\", \"anvil.two\", ... ]\r\n }\r\n\r\n### Excluding Specified Plugins\r\nAnvil also supports explicit exclusion so that all plugins except for those you specify in the build file will be run as part of the build.\r\n\r\n \"plugins\": {\r\n \"exclude\": [ \"anvil.one\", \"anvil.two\", ... ]\r\n }\r\n\r\n### Installing Plugins Locally For A Project\r\nYou can now install a plugin locally to a project using npm like so:\r\n\r\n npm install {pluginname}\r\n\r\nIn order for anvil to know about the plugin, you must add the following option to your build file:\r\n\r\n \"plugins\": {\r\n \"local\": [ \"myLocallyInstalledPluginName\" ]\r\n }\r\n\r\nPlease note: if you have already installed a global version of the plugin, anvil will always prefer the locally installed plugin; if you wish to use a global version of the plugin, you must use npm to uninstall the local version. Anvil does not manage locally installed plugins.\r\n\r\n# Contributors\r\n\r\nSpecial thanks to the following individuals who have contributed source code or ideas to help make anvil less buggy and more useful:\r\n\r\n * Jim Cowart\r\n * Aaron McCall\r\n * Mike Stenhouse\r\n * Robert Messerle\r\n * Mike Hostetler\r\n * Jonathan Creamer\r\n * Brian Edgerton\r\n * Elijah Manor\r\n * Doug Neiner\r\n * Eli Perelman\r\n * Derick Bailey\r\n\r\n# Legal Bits\r\n\r\n\"Anvil.js\"( also referred to as \"Anvil\") is owned by Alex Robson. All rights not explicitly granted in the MIT or GPL license are reserved. See the included LICENSE-* files for more details.\r\n\r\nExtensions to Anvil (plugins, commands, tasks, etc.) are not part of Anvil itself, and are the sole property of their respective maintainers. While every effort is made to ensure accountability, there is absolutely no guarantee, warrantee, or assertion made as to the quality, fitness for a specific purpose, or lack of malice in any given extension. Extensions published on the npm registry are not affiliated with or endorsed by myself (Alex Robson) or my employer unless otherwise stated in the repository for the extension.\r\n\r\nIf you have a complaint about an extension, and cannot resolve it with the package owner, please express your concerns to [email protected].\r\n\r\n### In plain english\r\n\r\nThis is mine; not my employer's. They have graciously supported the efforts and made contributions but are in no way responsible or liable for it's suitability or function.\r\n\r\nIf you create and publish an extension, it's yours, and you are solely accountable\r\nfor it. Not me, not my employer.\r\n\r\nIf other people create and publish an extension, it's theirs. Not mine, not my employer's.\r\n\r\nMalicious extensions could be published; consider the author behind the extension and perhaps review the code. There is no vetting process for published extensions.\r\n\r\nIf this concerns you, inspect the source before installing or using any extension."}