{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/polymer-project-config/issues/1","repository_url":"https://api.github.com/repos/Polymer/polymer-project-config","labels_url":"https://api.github.com/repos/Polymer/polymer-project-config/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer-project-config/issues/1/comments","events_url":"https://api.github.com/repos/Polymer/polymer-project-config/issues/1/events","html_url":"https://github.com/Polymer/polymer-project-config/pull/1","id":177305841,"number":1,"title":"polymer-project-config@v1","user":{"login":"FredKSchott","id":622227,"avatar_url":"https://avatars.githubusercontent.com/u/622227?v=3","gravatar_id":"","url":"https://api.github.com/users/FredKSchott","html_url":"https://github.com/FredKSchott","followers_url":"https://api.github.com/users/FredKSchott/followers","following_url":"https://api.github.com/users/FredKSchott/following{/other_user}","gists_url":"https://api.github.com/users/FredKSchott/gists{/gist_id}","starred_url":"https://api.github.com/users/FredKSchott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredKSchott/subscriptions","organizations_url":"https://api.github.com/users/FredKSchott/orgs","repos_url":"https://api.github.com/users/FredKSchott/repos","events_url":"https://api.github.com/users/FredKSchott/events{/privacy}","received_events_url":"https://api.github.com/users/FredKSchott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-15T22:30:49Z","updated_at":"2016-09-16T17:40:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Polymer/polymer-project-config/pulls/1","html_url":"https://github.com/Polymer/polymer-project-config/pull/1","diff_url":"https://github.com/Polymer/polymer-project-config/pull/1.diff","patch_url":"https://github.com/Polymer/polymer-project-config/pull/1.patch"},"body":"This PR pulls out and standardizes all logic from polymer-cli & polymer-build that had to do with polymer.json reading, parsing, and validation. The expected polymer.json format was starting to diverge between libraries, and some properties were being handled/parsed differently between changes.\r\n\r\nThis PR also takes the opportunity to make some changes to the polymer.json format that we've been meaning to make for a while (but were blocked by the dual-nature of -build/-cli parsing). polymer-project-config has been written to be as non-breaking as possible from current behavior, and continuing to support deprecated polymer.json fields /w a deprecation warning.\r\n \r\n### major changes\r\n\r\n- **`sourceGlobs` is now `sources`:** Name bikeshedding welcome, but including \"globs\" in the name felt unnecessarily Hungarian :)\r\n- **`includeDependencies` is now just `dependencies`:** More bikeshedding welcome, but the background is that people were finding the \"include\" part of the name confusing/vague. `dependencies` now matches simple naming of`sources`.\r\n- Old naming is still supported but deprecated (via warning).\r\n\r\n### breaking changes\r\n\r\n- __`sources` default behavior changed:__ Previously, sources has been a required collection of globs that needed to match all source files in your application. This caused confusion for many users and actual build problems for many others. Now `sources` defaults to an array of your shell, entrypoint, and fragments. This should continue to work for most users (doesn't break any cli templates) but may break for some users who were dynamically loading files out of their src/ directory without defining their own `sources` property.\r\n\r\n### other interesting changes / implications\r\n\r\n- `dependencies` vs. `sources` now have much more concrete purposes. Sources are fragments of the application (+ explicitly added files), and dependencies are files loaded/needed by those files.\r\n- Because of this, `dependencies` should now be the default property that a CLI user adds missing file paths to. Polymer build users can add wherever they want, based on their configuration.\r\n\r\n\r\n### still todo (later PRs)\r\n\r\n- new polymer-project-config README\r\n- docs: new page dedicated to polymer.json which all other areas could reference. Think https://docs.npmjs.com/files/package.json\r\n- docs & READMEs: point all current little polymer.json doc snippets to new page\r\n\r\n/cc @justinfagnani @robdodson "},"comment":{"url":"https://api.github.com/repos/Polymer/polymer-project-config/issues/comments/247661839","html_url":"https://github.com/Polymer/polymer-project-config/pull/1#issuecomment-247661839","issue_url":"https://api.github.com/repos/Polymer/polymer-project-config/issues/1","id":247661839,"user":{"login":"FredKSchott","id":622227,"avatar_url":"https://avatars.githubusercontent.com/u/622227?v=3","gravatar_id":"","url":"https://api.github.com/users/FredKSchott","html_url":"https://github.com/FredKSchott","followers_url":"https://api.github.com/users/FredKSchott/followers","following_url":"https://api.github.com/users/FredKSchott/following{/other_user}","gists_url":"https://api.github.com/users/FredKSchott/gists{/gist_id}","starred_url":"https://api.github.com/users/FredKSchott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredKSchott/subscriptions","organizations_url":"https://api.github.com/users/FredKSchott/orgs","repos_url":"https://api.github.com/users/FredKSchott/repos","events_url":"https://api.github.com/users/FredKSchott/events{/privacy}","received_events_url":"https://api.github.com/users/FredKSchott/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T17:40:20Z","updated_at":"2016-09-16T17:40:20Z","body":"Thanks for the review @justinfagnani. The three problems with the current naming/behavior that I tried to solve here are:\r\n\r\n1. Builds failed for users who didn't use the `src/` directory (fragments not found in `src/`).\r\n1. Users had to define all sources in `sourceGlobs` including files already described in fragments. It would be less confusing and easier to configure if `sourceGlobs` behaved like `includeDependencies` by just adding to (instead of overwriting) the list of files we already know about.\r\n1. `sources` vs. `dependencies` is confusing and arbitrary for users of the CLI.\r\n\r\nThe new distinction would be this:\r\n\r\n- For basic users of the CLI:\r\n  - \"sources\" are the fragements described in your polymer.json, \"dependencies\" are all files loaded by these fragments (even ones in `src/`)\r\n  - if files are missing, user adds a glob to `dependencies`\r\n  - `sources` would never be mentioned, clearing up the confusion about which to use\r\n- For users of polymer-build:\r\n  - use `sources` & `dependencies` to configure your two pipelines as needed.\r\n\r\nThis removes the need to explain the difference between \"sources\" and \"dependencies\" to CLI users who it has no effect on/for (everything is a fragment or a dependency of those fragments). The concept is introduced later with polymer-build, where the distinction actually has an effect on the build."}}
{"actor":{"display_login":"FredKSchott"}}