I am trying to develope polymer web pages.We have to refer polymer elements from bower_components under project to use them. but i dont have files available over there.Is there any library available which has all components(eg. paper/iron etc) html files so that I can refer them into my project.?
The recommended way to install a component is to use bower. Bower manages dependencies for you and handles updating.
You can read about installing components from bower, ZIP, and GitHub here.
If you want a single ZIP with all the currently available components you can read my answer to Where to download all polymer elements as zip file?.
There is also a project at http://element-party.xyz/ that can be used to reference the latest versions of components.
You can import all the latest polymer elements easily into your jsbin (or otherwise) by simply doing:
<base href="http://element-party.xyz/" />
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="all-elements.html" />
Components can be reference collectively, as shown above, or individually. Click on the Usage tab at http://element-party.xyz/ to learn more. http://element-party.xyz/ frequently updates to the bleeding edge, because of this I would not recommend using it in production.
You can also take a look at http://polygit.org/.
The Magic Server serves files directly from github (via
cdn.rawgit.com) in a manner that is compatible with HTML Imports
natural deduplication feature.
This server concept is primarily for hit-and-run testing, jsbins, etc. The performance is less than ideal and there is very little error reporting or other niceties.
http://polygit.org/ does have an interesting ability to specify Custom Configuration that allows for specifying specific versions of files. <component>[+<org>]+<ver>|:<branch>|*
GoTo and click the download button or grab their project from github and all their source are belong to you ;)
Related
I am writing a R package for my Msc's project, together with some .Rmd analysis that uses my package and generates some html reports.
I consider both the package code AND the resulting analysis as deliverables for my project, so I would like to showcase the two in a same location, maybe the same github which is already hosting my package. Question is, can I just add a /reports directory to the package structure and put my html files inside ? As package will be mostly internal use, I don't plan on submitting it to CRAN anytime soon if that matters. However, I would also like to avoid distributing my reports to other potential users.
I've just found out about the .Rbuildignore file which seems like it would do the trick, but I'd be curious to hear what's the standard practice in this case or any other suggestions you may have.
Thanks,
I'm probably missing something very basic here, but I've spent quite a while searching for just about any term I could come up with.
I wanted to check out Dart and Dart.Polymer, so I grabbed some examples from various tutorials. I managed to get everything working, but it seems ALL HTML/JS/CSS content from custom Polymer elements and paper-/iron-/... elements get pasted to index.html, along with various other JavaScript stuff.
This leads to my index.html being 16.000+ lines long in release mode builds, (20.000 in debug) in this Dart Academy Tutorial, and here is the corresponding source in GitHub
The tutorial also links to a live version that has pretty HTML/imports.
The same happens with the basic Polymer sample project in Webstorm.
My different setups:
Windows 10 and Ubuntu 14.04 (tried both)
Dart SDK current stable and dev version
pub build --mode:release and debug, from commandline and within Webstorm
various transformers, various orders, various dependency versions in pubspec.yaml
Aside from the index.html file my output folder seems fine, elements are present in e.g. output_folder/build/web/packages/polymer_elements/.
I know that everything that is compiled into the index is necessary, but why does it not generate links to the files in the created build/polymer_elements folder? I assume it is possible and the live versions of the examples I found have not been edited manually to link to all elements and scripts and cut them from index.html. I know it probably does not even affect load times in a significant way, but it still bugs me.
Thanks for any help in advance, don't be shy to point out if I read over something very basic or just did not search for the right term :D
This is a deployment optimization, similar to the vulcanize tool for polymer js, except that its the default in Dart. Html imports create tons of extra requests which is slower than just downloading the one large file.
Inlining transformed code (JS/CSS) is normal behavior and none of the options to dart2js will affect this.
I believe the demo output linked in the tutorial you mentioned was unfortunately not the actual dart output. I believe https://polymer-checkout.firebaseapp.com/ is a demo of the original polymer version, not the dart version.
(and why do you think the jQuery team are unable or unwilling to write decent documentation?;)
For example, go to http://jqueryui.com/download/all/ and download either
jQuery UI 1.10.3 (source, demos, themes, tests)
jQuery UI 1.10.3 Themes
#1
There is a MANIFEST file.
There is a README.md file but no explanation of the the layout of the archive.
There are several files with a JSON extension e.g. ui.accordion.jquery.json. They contain some information about the particular UI widget. I don't know what these are used for, do you know?
A file named package.json. It seems just to be some library info in JSON format. Do you know what this is for? I suspect it's linked to the other .json files, but who knows?
There is an directory named external that holds javascripts. Do you know what this is for?
There is the jquery-1.9.1.js file. No minified version.
A licence in MIT-LICENSE.txt.
An AUTHORS.txt file, which contains the names of the contributors, that are repeated several times throughout the archive. Not one of them managed to list what's in the archive thoroughly though ;)
A demos directory with what appears to be all the demos from the website.
A Gruntfile.js that the README says is used to build jQuery. Whatever "building" jQuery means.
A tests directory.
There is a directory named ui that seems to hold all the jQuery UI effects javascripts, also minified in a subdirectory, and an i18n subdirectory for those widgets that need internationalization.
There is a directory named themes. In it there is a subdir called base that holds the base theme stylesheet. This subdir also contains an images dir for the base theme. It also holds stylesheets for several of the effects e.g. jquery.ui.accordion.css. Do these only work for the base theme or can they be applied to any theme? If not, why does only base have them? (see below) There is also a minified subdir which has minified versions of all the stylesheets.
#2
The archive contains a MANIFEST file
but no README.
An AUTHORS file.
A package.json file with a small amount of information about the project.
It has several themes but no base.
There are no effects/widget files in either the root directory or each of the themes' directories.
Each theme directory contains an images subdirectory with image files associated with that theme, a jquery-ui.css stylesheet, a minified version of this, and a jquery.ui.theme.css. The jquery-ui.css in each theme directory is different to each directory. Do you know what each of these files is for? Why aren't all the specific changes in the jquery.ui.theme.css file?
Why do I need to know this?
This may come up in the comments so I'll answer it here. I've written a couple of libraries to help with deploying the correct version / theme in Ruby Rack projects, Rack JQueryUI and Rack JQueryUI Themes. Every time there's a version change of jQuery UI I have to deal with these undocumented archives, that also seem to change in layout / contents between versions. I've not had good feedback when speaking with the jQuery team - I find they are lamentable at documentation and it's obviously not a priority for them, they'd rather be renaming functions or something - so I'd rather just have someone helpful answer me here, and this will make a good place to keep it (out of their reach, so to speak).
I'm most interested in the questions around the theme directories as that will directly help me right now, but I've extended the scope of the question because I believe it will help others and I am curious.
Let's start with an explanation of what jQuery UI downloads are: They're a full bundle of development and production files. Keep in mind that jQuery UI is downloaded over 11,000 times per day (and that's just the download builder usage). The ways in which these downloads are used can vary greatly among users. The contents of these downloads are intended to serve the largest number of users. It's important to note that the development bundle is almost an exact copy of the source repository.
source, demos, themes, tests
MANIFEST: This is a file containing a list of every other file in the zip, along with checksums. Very few users will care about the manifest, but for those who do care, it provides critical information.
README.md: (note that you listed README.txt): This is the README for the jquery-ui git repository. It's an exact copy of what you will see if you view the project on GitHub.
*.json: These are plugin manifest files for the jQuery Plugin Registry. These files are never stored in the master branch (or any other branch), but are always included in tags. Because they provide useful information, they're included in the downloads. You can read more about the manifest file structure.
package.json: package.json is a standard file for use with npm/node. All jQuery projects rely on node to do linting, testing, builds, releases, etc. This is completely separate from the other JSON files which are for the jQuery Plugin Registry. They have very similar structures, because the plugin manifest files were designed based on npm.
external: This directory contains third party scripts which are used in demos and tests.
jquery-1.9.1.js: This is the latest stable version of jQuery that jQuery UI was tested against. We never include minified jQuery versions in the jQuery UI repository since they're horrible for debugging.
MIT-LICENSE.txt: The license which defines the terms under which you can use the files in the download.
AUTHORS.txt: A list of contributors to the jquery-ui repository. This does not include contributors to other parts of the jQuery UI project, such as work on any of our various sites or documentation.
demos: A directory of demos for the selected components (in this case all components). The demos actually originate in the jquery-ui repo and are copied to jqueryui.com during releases.
Gruntfile.js: We use Grunt for linting, testing, and building. Grunt is a JavaScript task runner for node. Building jQuery UI means minification and concatenation.
tests: A directory of tests for the selected components (in this case all components).
ui: A copy of the source files, with #VERSION replaced with the release's version number. The jquery-ui.js file is generated during the build by concatenating all of the source files together. The minified directory is generated during the build by minifying the individual files. And of coure jquery-ui.min.js is generated by both concatenating and minifying the source files.
themes: A copy of the source files, with #VERSION replaced with the release's version number. This undergoes the same process as the ui directory regarding concatenation and minification. The individual component files are theme-independent. So jquery.ui.accordion.css will work with any theme. These are the required CSS files for use with the JS files. You can build any theme you want, but if you don't use the functional CSS for the component, then nothing is guaranteed to work. Full themes (what pretty much all users actually use), contain all of the functional CSS plus the theme CSS in a single file.
themes
Themes are generated by ThemeRoller. They do not live in any repository and as such do not contain artifacts of any repository. This is why there is no README.
MANIFEST: Same as above, the manifest contains checksums for the files in the download.
AUTHORS.txt: A copy of AUTHORS.txt from jquery-ui. This should exactly match the source download. While this isn't a list of people who have contributed to themes, we view this as part of the code and include the same list of authors.
package.json: A copy of package.json from jquery-ui. This file does seem a bit strange, since it's not coming from a repository. We should probably remove this.
themes: A directory of generated themes. These do not contain the source variables/tokens. The base theme is not a generated theme and therefore is not included. You'll notice that generated themes also have a different directory structure. Each theme contains three files: jquery.ui.theme.css is just the theme CSS; this is what can be used with the functional CSS provided in the base theme. jquery-ui.css is a full theme; it includes the theme CSS plus the functional CSS. jquery-ui.min.css is a minified copy of jquery-ui.css.
jQuery UI has decided to simplify its package (extremely) in order to help avoid confusions such as the above. From 1.11 and on, we distribute
https://github.com/jquery/download.jqueryui.com/pull/214. On any new questions just let us know.
I have a new HTML helper, SelectionOtherTextBoxFor. It is a textbox linked to a <select> element1 for capturing the actual other value if the user selects 'Other' in the select list.
It has some JavaScript, HtmlHelper code, and some attribute code.
How do I package this so that other developers can just install and use it, without a list of files and where to put them? I suspect Nuget, but maybe there is a simpler way.
Otherwise, please may I turn this into how do I go about doing this in NuGet?
The easiest would probably be to package the code in a class library that other developers could reference in their projects. As far as the javascript part is concerned, you could ship it alongside the class library.
If you want to automate the process, NuGet is definitely the way to go. You should read the Creating and Publishing a NuGet package guide which contains very detailed instructions on how you could create a NuGet package and include dependencies in it. In this case you will have the assembly containing the custom helper and attribute and javascript file as a content to the package. The javascript file could then by default be deployed in ~/Scripts when some developer installs the NuGet.
Personally I have always used NuGet for those kind of things as it offers lots of flexibilities.
When editing JSF XHTML files and using autocomplete for resource bundle keys, IntelliJ seems to scan the whole project including libraries for ALL property files - this is very annoying because you get many thousands of irrelevant keys mixed up with your own small JSF declared resource bundle. Is it possible to ignore library property files? This was default behaviour in Netbeans for example, one of the things that really annoys me in IntelliJ.
Unfortunately, it's not possible to control it in the current IDEA version (12), all the files are always scanned. Please submit a request to make it configurable and we'll consider implementing it in the future updates.