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

support for prepend and append #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

support for prepend and append #31

wants to merge 3 commits into from

Conversation

minimit
Copy link

@minimit minimit commented Oct 22, 2014

with

// @codekit-prepend path/to/file.js
// @codekit-append path/to/file.js

As I explained it's the syntax this 'precompiler' sofwares use. #30

The lines added are very simple, I just:

  • added one regex for prepend and one regex for append (you should be able to add your own if you want)
  • executed expand() with the new argument regex
  • added directive checks
  • with the functions prependString() and appendString() I cached the results, that I add to newText during buffer.

Also I added optional [] on multiple files for this syntax

// @codekit-prepend "path/to/file.js", "path/to/file.js"

// @codekit-prepend path/to/file.js
// @codekit-append path/to/file.js
@minimit
Copy link
Author

minimit commented Oct 23, 2014

I don't know how to run the tests. Will look into it if it's needed.

@pixelfuture
Copy link

This is brilliant. Can we get this committed? This is exactly what I need.

@KenEucker
Copy link
Collaborator

All that this pull request needs now is some tests created around the use cases for this feature. I will circle back to this item after we get through the more critical PRs and resolve the conflicts if I need to.

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

Successfully merging this pull request may close these issues.

3 participants