Is it possible to use a template from the command line?

Since there are no fodler templates, I have created a simple batch file to copy files from a "seed" folder and name them appropriately.  The next step would be to actually utilize my existing file templates.  Is this possible?

3 comments
Comment actions Permalink

Hi there,

Please clarify your requirements / what you want to do.

0
Comment actions Permalink

Well I've created a batch file that creates a folder structure for my Polymer elements.

@echo off
set seed=seed-element
set target=%1
@echo Creating new element named "%target%"
echo Creating Folder...
md %target%
echo copying seed files from %seed%...
copy %seed%\%seed%.html %target%\%target%.html >nul
copy %seed%\%seed%.less %target%\%target%.less >nul
copy %seed%\demo.html %target%\demo.html >nul
copy %seed%\index.html %target%\index.html >nul
copy %seed%\readme.md %target%\readme.md >nul
copy %seed%\bower.json %target%\bower.json >nul
copy %seed%\tests %target%\tests >nul
echo Done!


It would be awesome if I could replace some of the copy commands with something like "template polymer %target%.html" which would be like right-clicking and selecting "New > Polymer" which executes the following template I have created:

<link rel="import" href="../polymer/polymer.html">

<polymer-element name="${NAME}" noscript>
    <template>
        <link href="${NAME}.css" rel="stylesheet">
        <!--HTML Goes here-->
    </template>
</polymer-element>


I hope this makes sense.

Basically, instead of right-clicking and selecting new > template, I want to be able to do it from a command.

0
Comment actions Permalink

That is not currently possible. Check tickets in that another thread: http://devnet.jetbrains.com/message/5520585#5520585

I may only suggest to implement something like that via Phing or alike (Phing has enough built-in tasks that can handle file copying as well as file modifications based on certain patterns).

0

Please sign in to leave a comment.