Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import functionality #5

Open
lukeapage opened this issue Jan 11, 2013 · 2 comments
Open

Import functionality #5

lukeapage opened this issue Jan 11, 2013 · 2 comments

Comments

@lukeapage
Copy link

How about a button that adds a new file and then exposes the ability for you to set filenames for each added file, so that you can import one thats still on the screen?

Not sure if its useful for people, but it would be useful for me!

@bfricka
Copy link
Owner

bfricka commented Jan 12, 2013

Can you clarify this? Specifically:

  • Do you want to be able to paste in test and then save that with a file name that can be imported into the editor?
  • Or are you looking to be able to upload files and them reference them via imports?

I think it would be useful to include something like this, and additionally to offer imports referencing popular LESS projects like boostrap. This is definitely going to have to be put on hold though for awhile, as it's not going to be trivial if we want it done correctly, and in a way that is useful.

@scottrippey
Copy link
Collaborator

My initial impression is that he'd like to press a button that adds an additional code editor on the page, and assign it a virtual filename. Then, use an @import statement to include the virtual filename. Thus, you'd be able to test all sorts of @import functionality.
However, purely client-side, this seems like it'd be hard to get the Less code to change the meaning of the @import statement.

So, let's assume that a server-component exists. You create a snippet, it gets assigned a key like "aaa1". Then you create another snippet, and use @import "aaa1.less";. You can easily open both files in separate windows, so no complicated UI work needs to be done.

And if Gists were supported (instead of a custom server component), then you could just @import "someGistKey.less" .... but I'm not familiar with the GitHub API so I don't know if the Gist would be served up correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants