Merging files via transformer - dart

Say I'm creating a site.
Currently I need to run a task which will compile template files and merge them into a .js file.
So I'm reading this guide about transformers and trying to create one.
But seems that I can only handle assets in transformer individually, via transform.primaryInput.id.
So, I'm wondering, how can I merge some assets into one file via a transformer?

I'm answering my own question.
What I need is an aggregate transformer.
This article should solve the problem: https://www.dartlang.org/tools/pub/transformers/aggregate.html

Related

Best way to migrate single project from Jira 5.0 to Jira 8?

I want to move a single project from a Jira 5.0 instance to a new Jira 8.0 instance being already used for other projects - so the process must not bring in configurations, workflows, etc. nor should alter existing projects.
I'm only interested in importing issues and related data:
title, description, etc (obviously)
attachments (images, files, whatever)
issue links
issue type (with mapping to new types in case they don't match)
... (other properties that I'm forgetting right now)
I've just started searching for the topic and already found several options - and it's not clear if they're all available to be, mosly due to the starting Jira version, they are:
Export to CSV and import to CSV
Export to XML
Import from JSON (though I've yet to find a JSON export)
Rest API
Import project from backup
... and surely others
Of course I'd like the most complete yet less error-prone method, though if resorting to the REST API will be the only way to be sure to import all I want, I'm ready to write a script / program.
So, what should I choose?
P.S.: I'm not sure if this fits this community, is there a more proper one?
The easiest way is to get csv export, get all attachments (jira_home/data/attachments). Then copy attachments to a new instance to jira_home/import. You'll need to edit export file to match names and paths of your attachments in order to import them successfully.
And last step is import csv to your Jira 8 instance.
I suggest trying this on dev/stage environment first because there are many small details that can affect import.
Some useful data is here:
https://confluence.atlassian.com/adminjiraserver/importing-data-from-csv-938847533.html

Creating MERGED file from ditamap and then filtering it

I'm a newbie in DITA OT and I am trying to get just the merged file from my ditamap and after upply xsl to it, but I dont need any other output.
I was thinking that I could use some part of the dita-ot source code that is doing merging or to make sort of "cutted" plugin that produces just the merged xml file and proccess xsl for it, and then gives the filtered xml file.
As I understood, there is a build.xml that is making this job using dost.jar, but I cannot configure, what exactly do I need to use from it. Or is it possible to create just merged file seperately, not starting the transformation, so I can use it for my later needs?
I am very appreciate for any help.
I created a special DITA OT plugin which can be integrated in the DITA OT and used to create just the merged document:
https://github.com/oxygenxml/dita-merged/tree/master/com.oxygenxml.merged
If you choose to publish to PDF and you set the parameter clean.temp to no, after the transformation is over you should obtain in the transformation temporary files directory a file called mapFileName_MERGED.xml which has all topic references expanded.

Upload file to the specified path (OneDrive)?

I prefer iOS code but the solutions in other languages may refer to this question too.
I use LiveSDK to access to OneDrive. Here is a link to the example which uses upload action (onClickUploadButton:)
But I can't understand how to specify the custom upload path - only default "me/skydrive" works. How do you solve the problem when you need to upload a concrete file to a concrete path which may not exist? Should I create all the folders separately and/or get their IDs to place a file exactly into them?

Create yeoman generator from json instead of prompts?

When I create a project, I first create a project.json file (used internally, not as part of some package). Then for some projects I run yeoman with our own custom generators.
What I would like is for yeoman to pick up my projects.json and read that instead of prompting me for settings.
Is this possible, and if so; how do I do this? Basically I think I need to know:
How do I load the file from the project-root into index.js (and defer to prompts if it doesn't exist)
How to I bind the properties from the json to 'this'.
A Yeoman generator is just a searchable and composable Node.js project running within the context of Yeoman.
As so, it can do anything.
So, if you want to write a generator reading a project.json configuration file to know what to generate - well just do it!
http://yeoman.io/authoring/

MVC T4 Template: Change output file name

Simple question, could'nt find a straight answer. How can I modify the output file name of a T4 Template?
I'm using a T4 Template to bundle and minify all my javascript files. Now I want to include the current Assembly Hashcodein my filename. But how can I access this filename?
A workaround would be to rename the ouput file after generating it but this doesnt't seem nice to me.
You need to do something called auto-versioning, and this is usually done by URL rewriting. The physical files are not actually renamed.
See this question for details on javascript and css auto versioning:
How to force browser to reload cached CSS/JS files?
Note that if you use templates to generate a different physical file for every time you generate a file then you will lose a lot of benefits of source control (revisions etc), and you will end up with an unmanageably large set of files on disk.

Resources