Coder Social home page Coder Social logo

blueprint's People

Contributors

dependabot[bot] avatar dj-domains avatar nguyenduyh33 avatar reesemclean avatar skarin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

blueprint's Issues

How to add timestamp and multiple choice variables to Blueprint?

Hello,
I reallly like your Extension!

I use snippets a lot to insert timestamps and have even created some snippets that allow me to choose from multiple choices.

Question:

  • How can I integrate the timestamp and multiple choice variables shown below into Blueprint so that when I create a new project, these options are chosen during creation?

Example of a snippet using date timestamp:

{
        "New_Meeting": {
            "prefix": "New_M",
            "scope": "markdown",
            "body": [
                "# Meeting: ${1:Enter Meeting Title}",
                " ",
                "${CURRENT_DAY_NAME}, ${CURRENT_MONTH_NAME}, ${CURRENT_DATE}, ${CURRENT_YEAR}, ${CURRENT_HOUR}:${CURRENT_MINUTE}",
                " ",
                "## Called By",
                " ",
                "- ${2:Enter Name}",
                " ",
                "### Attendees",
                " ",
                "- ${3:Enter Name}",
                "- ${4:Enter Name}",
                "- ${5:Enter Name}",
                " ",
                "### Next Steps",
                " ",
                "---",
                " ",
                "### Agenda",
                " ",
                "### Notes",
                " ",
                "- $0"
            ],
            "description": "New Meeting"
        }
}

Example of snippet using multiple choice:

{
    "Front_Matter": {
            "prefix": "Front_M",
            "scope": "markdown",
            "body": [
                "---"
                "Author: This Guy",
                "Title: ${1:Enter Title}",
                "Created: ${CURRENT_DAY_NAME}, ${CURRENT_MONTH_NAME}, ${CURRENT_DATE}, ${CURRENT_YEAR}, ${CURRENT_HOUR}:${CURRENT_MINUTE}",
                "Last Updated: ",
                "Category: ${2:Enter Category}",
                "Classification: ${3| CONFIDENTIAL, OPERATIONALLY SENSITIVE, FOR INTERNAL USE ONLY, COVERED BY NDA, DO NOT COPY NOR DISTRIBUTE WITHOUT PERMISSION, PUBLIC|}",
                "Tags: ${4: Enter Tags}",
                "---",
                " ",
                "# $0"
            ],
            "description": "New Front Matter"
}

Thank you!

Options for author, date, time

It would be nice if there is some option to just put in the author name. Or maybe more general if some values can be predefined in some configuration file and used by the templates.

Date and time would be also nice (ideally with some formating options for example similar to the date command line executable)

Change how casing is defined in templates

I propose we change the template syntax from this:

{{nameKebabCase}}

to this

{{kebabCase name}}

For the content of of the template this can be done through helpers in handlebars.

We would need to write helpers for each of the casing methods and change the context being passed into the handlebars template from

{
    nameKebabCase: string;
    nameSnakeCase: string;
    namePascalCase: string;
    nameCamelCase: string;
}

to this:

{
    name: string
}

For the file name I think we could change it from __namekebabcase__ to __kebabCase_name__. Better ideas?

This would enable adding casing support for custom fields if that was ever supported. This change should be made before the initial release so templates don't have to be changed.

nesting {{helper name}} within {} causes parsing error

G'day mate! Thanks for the insanely useful plugin, its awesome!

However I can't get the pascalHelper to add my filename as my CSS class name (CSS Modules), have pictured below. Any suggestions, did I miss something obvious? Appears to be an issue with nesting the helper moustache within another set of curly braces?

Cheers,

Mick

screen shot 2018-06-25 at 5 25 49 pm

screen shot 2018-06-25 at 5 26 01 pm

Add ability to create sub-folders

This is already saving me a ton of time, but it's still a 2-step process:

  1. Right click, New Folder, enter name
  2. Right click, New File from Template, enter name

I thought MAYBE I could get away with the setup below, but when I use New File from Template, nothing happens now, so I assume it's not supported:

image

If that worked, I could just do step #2 above and it'd create the sub-folder for me.

PS: This thing is amazing, thanks to everyone involved.

Please publish this extension to the open-vsx.org registry (to support VSCodium)

I would love to use this extension with VSCodium. For that to work, the extension would need to be published to the open-source registry at openvsx. A guide on how to do that can be found here: https://github.com/eclipse/openvsx/wiki/Publishing-Extensions

Alternatively, the extension could be added to the publish-extensions repo as a workaround, but that would not be a good long-term solution for reasons described here.

I know it’s a few steps to follow, but please consider this! I’d be very grateful. <3

Take selected folder into account

When selecting folder with arrow keys and creating template from "shift+command+p" menu template will be generated in root folder. I think it should create template inside selected folder instead.

Consider the name as the path with the name as a leaf

Is that possible to treat the name as the path once it contains slashes?
´src/component/TestPage´ can create files under src/component/ folder for name TestPage.
Right now it will use slash as a whitespace to transform the name.

Any plans to create cli?

Thank you

Dynamic placeholder template conflicts with GitHub Actions

The format used by blueprint for dynamic variables placeholders "${{ my_var }}" is the same used by GitHub Actions workflows.

It would nice to have a way to use a different placeholder, otherwise blueprint wont work fine for generaing GitHub Actions workflows files.

Change Location of "New Template" in Context Menu

Hi,

For many of us with "muscle memory", the first item in the context menu is "New File". This extension puts "New File from Template" at the top of the list.

image

Please can this be optional / or a setting a user can change? Personally, I'd move it under "New File" or even under "New Folder".

Thanks for making a great extension.

What is manifest.json?

Hi. I did noted file manifest.json at some samples. What is it? Is there description of these file?

Support for simple upper case

For c header files i use include guards like

#ifndef HEADER_H
#define HEADER_H
...
#endif

HEADER_H is typically the corresponding header filename in uppercase.

Sometimes I have some software module with numbers. In that case the upperCase implementation does not work, because i get blanks then:

e.g. for header1.h i would get:
#ifndef HEADER 1_H

which will not work. I'd like to have an option to just get the characters uppercase without separation of words.

Currently as a workaround i use upperSnakeCase, but then i get HEADER_1_H (However I'd prefer HEADER1_H)

escape {{

one of my templates is doing this:

return <Widget style={{
            x,
            y
        }} staticStyle={staticStyles} />;

How do i escape the {{? aka, don't let it get picked up by blue print? I tried prefixing with {{ but it actually renders that out in the response.

Error when create from template which with image file

Steps:

  1. Click "new file from template"
  2. Choose a template with jpg or png inside
  3. Enter name

Error:

Lexical error on line 1. Unrecognized text.
������JFIF�������������C
----^

svg is ok,but jpg & png will error
maybe an option to ignore file/foler analyze

Global blueprint folder?

First up this is awesome. Exactly what I was looking for.

One niggling thing - is there any away to define blueprint dir outside of the workspace scope? So could I define 1 folder of blueprints & have all my spaces use them?

Prefer double underscore "__" over double brackets "{{" for templates

Fantastic extension! I wanted something like this so bad!

I would like to suggest using the double underscore escape method even inside of templates. Handlebars are not compatible with a vast majority of file types. For example, they will completely break the Javascript/Typescript syntax.

code

In this example, VS Code will freak out with cryptic errors, the file is marked as containing errors, and will appear red in the sidebar recursively to the project folder. It's not possible to switch off VS Code's internal validation for particular folders without workarounds such as remapping file associations to something like text file for particular folders.

Blueprint files should be able to be valid language-linted files, but that's impossible with the current template literals.

Double underscore based literals (with no spaces!) would be highly compatible (and unique!) for HTML, Javascript, CSS, C++, Java as underscores are generally accepted in variable names. A simple config option could choose between "{{" and "__", and handlebars could be replaced with simple regex substitution (why not? handlebars wasn't designed to handle every file format anyway).

It would help solve issues with escaping, language-specific constraints and linting, conflicts with other handlebars: #58, #69, #56, #39

Examples for in-template substitution would be: __name__, __camelCaseName__, __snakeCaseName__, ... Or even better, prefix with bp: __bpName__.

proposal for "change workdir" feature

Hi. Is it possible to realize feature wich will change the current workdir to destination (after project's dircetory created from template)? (Analog of feature "Create Project's Directory" or "Create Subdirectory" in the most of IDEs)

For example, I have a template like a:

* __pascalCase_name__ <--Root project's folder
** ...  <--Project's files.
** ...
** ...

At that time users should to make root project directory and open it manually in the file explorer.
Thanks.

Support vscode workspace

It seems if I open a folder inside a vscode workspace, it can't find the correct buleprint-templates folder.

image

Vue component template bug

Create a Vue template component:

<template>
   <div class="{{snakeCase name}}">
     {{msg}}
   </div>
</template>

As a result, the line {{msg}} disappears, although it does not refer to the name of the component.

<template>
  <div class="component_name">
    
  </div>
</template>

extension API

hi, is there an API so that other extensions can register new templates in your extension? (at least for a window session of vscode) Preferably something allowing callbacks when the user wants to create them, so extensions can provide dynamic data such as latest versions of dependencies in a package descriptor.

See https://code.visualstudio.com/api/references/vscode-api#extensions

Append to files

Hi
How could I get the template appended to an existing file?
Thank you
Stefano

Format template selection menu to be more user friendly.

With the new support for multiple folders the template selection menu is now a little sloppy:

screen shot 2018-04-30 at 10 38 49 pm

We should investigate tidying this up so that the template name is the first thing that is shown and the thing most emphasized.

If a user has only one template folder path we may want to hide the path?
Or maybe, only show the path on the first item for each template folder path?

Way to generate template on the command line?

I'm currently using this extension and even have a dedicated project for use with it - https://github.com/Tram-One/tram-blueprints. What I would like to do, as part of a pipeline in this project, is generate a template, run linting and run tests - just to make sure everything passes.

Is there a way in a CI environment I can create a blueprint template so that I can run these tests and linting?

Custom function

Is there any possibility which user can have custom functions to be invoked during template creation?
Or is there any feature which user can avoid typing some ruled string which can be generated? Rather than using $variable_name 😃

Allow user to specify custom content in the manifest.

In the manifest add an option like so:

{
  customInputs: [{
    type: "string",
    key: "prefix"
    value: "PQ"
  }]
}

We could start with just a string type which may not have much value by itself. Later we could extend the syntax to other types such as a list or text input:

{
  customInputs: [{
    type: "list",
    key: "styleType",
    choices: ["scss", "css"]
  },
  {
    type: "textInput",
    key: "parentClass",
    defaultValue: ""
  }]
}

Copy hidden subfolders

Hi. Is it possible to copy subfolder? For example my template contains folder .vscode with some settings, is it possible to copy it?

Doesn't support Windows paths

Your extension uses the foward slash for the linux/unix based OS's, but for Windows it can't ever find the path to the blueprint-templates folder:
No Templates found in C:\users\Nate\Documents\Work\Powershell/blueprint-templates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.