{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/4800","labels_url":"https://api.github.com/repos/meteor/meteor/issues/4800/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/4800/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/4800/events","html_url":"https://github.com/meteor/meteor/issues/4800","id":96906437,"number":4800,"title":"Preview of batch plugins and other 1.2 features","user":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Release%20Process","name":"Project:Release Process","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-23T21:11:54Z","updated_at":"2015-07-24T12:21:10Z","closed_at":null,"body":"This issue is a good place to track concerns found with the `PLUGINS-PREVIEW@1` release.\r\n\r\nWe've been working hard over the past few months on a number of features for Meteor 1.2.  @Slava  and I have been focused on adding new capabilities to build plugins, and we have a preview release ready!  Try it out with `meteor --release PLUGINS-PREVIEW@1`.\r\n\r\nThis release adds new plugin APIs: `Plugin.registerCompiler`, `Plugin.registerLinter`, and `Plugin.registerMinifier`.\r\n\r\n`registerCompiler` is a replacement for the now-deprecated `registerSourceHandler` feature. Compilers are like source handlers, but they always run when you're building your app instead of when packages are published, and they have access to all of the relevant files in your app and its packages at once. This lets us implement things like CSS preprocessor `@import`s that work across package boundaries.\r\n\r\n`registerLinter` allows you to write linters that handle different file types and show warnings when you run your app or publish a package (or run the new `meteor lint` command).\r\n\r\n`registerMinifier` allows you to define your own minifiers to use instead of the standard minifiers, which are no longer baked into the tool but now can be replaced.\r\n\r\nThe new APIs are documented at https://github.com/meteor/meteor/wiki/Build-Plugins-API\r\n\r\nSome notes:\r\n\r\n* You'll need to add the `standard-minifiers` package to your app when testing this. (When this is released for real as Meteor 1.2, `meteor update` will add that to your app automatically.)\r\n* The `less` and `stylus` packages now support cross-package imports!  If you specify a file like `@import \"{package}/file.js\"` (with the curly braces), it will load the file from that package. Use `@import \"{}/file.js\"` to load a file from your app.\r\n* There's a new core `jshint` package which is a linter for js files using JSHint.\r\n* We've made one backwards-incompatible change to packages. To include static assets in packages, you now need to explicitly specify `{isAsset: true}` in your `api.addFiles` call. This is not necessary for static assets in apps, and doesn't affect published packages, just package sources.\r\n* Because of this change to these packages, we've bumped their major version numbers. Packages that include `less` files will need to publish a new version using this preview (or an RC) before you can use them.\r\n* We've improved rebuild time in `meteor run` in various ways, including via new caches and new APIs that allow plugins to define their own caches.\r\n* There's a lot of other stuff in here too! For example, there's a new core `ecmascript` package which uses Babel to let you write Meteor code in ES2015 (similar to `grigio:babel`).  There's automatic compression on the wire for DDP.  There's some improvements to Livequery oplog tailing performance.  There are several months worth of incremental bugfixes.  Pretty exciting!\r\n\r\nWere not quite ready for the formal 1.2 release candidate process, but we'd love to hear how this release works for your apps!  And plugin authors (or those interested in becoming plugin authors), we'd love to see how the new APIs work for you!"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/124501832","html_url":"https://github.com/meteor/meteor/issues/4800#issuecomment-124501832","issue_url":"https://api.github.com/repos/meteor/meteor/issues/4800","id":124501832,"user":{"login":"rclai","id":1316261,"avatar_url":"https://avatars.githubusercontent.com/u/1316261?v=3","gravatar_id":"","url":"https://api.github.com/users/rclai","html_url":"https://github.com/rclai","followers_url":"https://api.github.com/users/rclai/followers","following_url":"https://api.github.com/users/rclai/following{/other_user}","gists_url":"https://api.github.com/users/rclai/gists{/gist_id}","starred_url":"https://api.github.com/users/rclai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rclai/subscriptions","organizations_url":"https://api.github.com/users/rclai/orgs","repos_url":"https://api.github.com/users/rclai/repos","events_url":"https://api.github.com/users/rclai/events{/privacy}","received_events_url":"https://api.github.com/users/rclai/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T12:21:10Z","updated_at":"2015-07-24T12:21:10Z","body":"What would be the best way for a package that uses a core package say, `stylus`, to use as the version constraint to run this preview?\r\n\r\nI noticed that doing `api.use('stylus@1.0.0 || 2.0.0', 'client')` did not work, but rather had to do `'stylus@1.0.0 || 2.0.0-plugins'`."}}