Closed aeosynth closed 10 years ago
Thanks for the request. Dan, I haven't looked at the build system. How hard would it be to setup a build into the MDV repo that is just for MDV?
Not too hard. The build steps are a part of the platform repo already, so it should be pretty simple.
Looks like the concatenation for builds is specified here: https://github.com/Polymer/platform/blob/master/build.json
The way the gruntfile uses this is fairly straightforward, but I'm not sure which files you'd need to get a standalone build of ONLY MDV.
[
"../WeakMap/weakmap.js",
"../observe-js/src/observe.js",
"build/if-poly.js",
"../ShadowDOM/build.json",
"src/patches-shadowdom-polyfill.js",
"src/ShadowCSS.js",
"build/else.js",
"src/patches-shadowdom-native.js",
"build/end-if.js",
"src/lang.js",
"src/dom.js",
"src/template.js",
"src/inspector.js",
"../NodeBind/src/NodeBind.js",
"../TemplateBinding/src/TemplateBinding.js",
"../polymer-expressions/build.json",
"src/patches-mdv.js",
"../HTMLImports/build.json",
"../CustomElements/build.json",
"src/patches-custom-elements.js",
"src/microtask.js",
"../PointerEvents/build.json",
"../PointerGestures/build.json"
]
"src/patches-mdv.js"
seems to wire up the Object.observe polyfill, and I'm guessing you'd need the if-poly.js
to end-if.js
for Shadow DOM stuff. I'm guessing you could rip out most lines that points to a build.json
(depending on whether you want polymer-expressions
support (I do).
[
"../WeakMap/weakmap.js",
"../observe-js/src/observe.js",
"build/if-poly.js",
"../ShadowDOM/build.json",
"src/patches-shadowdom-polyfill.js",
"src/ShadowCSS.js",
"build/else.js",
"src/patches-shadowdom-native.js",
"build/end-if.js",
"src/lang.js",
"src/dom.js",
"src/template.js",
"src/inspector.js",
"../NodeBind/src/NodeBind.js",
"../TemplateBinding/src/TemplateBinding.js",
"../polymer-expressions/build.json",
"src/patches-mdv.js",
"src/microtask.js",
]
Biggest question I see is whether "src/*.js" are required. Might give it a shot. But if anybody knows for sure, would like to know.
I think the proper dependency list for an "MDV" build is
[
"../observe-js/src/observe.js",
"../NodeBind/src/NodeBind.js",
"src/TemplateBinding.js"
"../polymer-expressions/build.json"
]
This sort of thing should be defined as the build.json
file in TemplateBinding itself (minus the polymer-expressions part).
@rafaelw Does this seem feasible?
I'm totally clueless about the build system. Seems reasonable to have a build in TemplateBinding that excludes polymer-expressions and a build in polymer-expressions which includes all of that plus polymer-expressions and esprima.
Dan, can you make that happen, or tell me what I need to do?
Yep, I can make that happen.
Fixed via #145
i would like a standalone build of mdv, which doesn't require changing browser settings, or including polymer's entire platform.js