Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Feature: Custom Functions #783

Closed
wants to merge 3 commits into from
Closed

Feature: Custom Functions #783

wants to merge 3 commits into from

Conversation

am11
Copy link
Contributor

@am11 am11 commented Mar 22, 2015

Supersedes #644.

@am11 am11 added the Dev - WIP label Mar 22, 2015
@am11 am11 force-pushed the matryo-branch branch 4 times, most recently from 0a502bf to 5211c5d Compare March 22, 2015 16:55
@am11 am11 force-pushed the matryo-branch branch 7 times, most recently from 3889737 to 4d0c8ee Compare March 22, 2015 20:39
@am11
Copy link
Contributor Author

am11 commented Mar 22, 2015

This is a historical moment!

historical-moment

@am11 am11 mentioned this pull request Mar 22, 2015
bridge.success(data);
}

var result = callback.apply(this, args.concat(done));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callback.apply(options.context, args.concat(done)) for consistency with importers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is what I just told @matryo on gitter chat :)
This PR is experimental. the real meat is still #644. 😉

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. Let me know how (if) I can help. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jakobo Yes this makes complete sense. Ultimately I can see that the context could be used to call built-in sass functions, or functions defined through the sass files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally. We've already seen the context object be useful in import-once importer development, and I have no doubt that image manipulation custom functions will memoize using the context for performance. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jakobo, wow image manipulation, like generating and mapping sprites? One day I will learn all the powers and mysteries behind this.conext, but I don't get time to actually use node-sass like others do! 😸

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jakobo, now that #644 is merged, would you like to send a PR for this.context and the tests which goes with it? (-8

You may want to play with this cool new feature as well. 😉

@am11 am11 closed this Mar 23, 2015
@am11 am11 deleted the matryo-branch branch March 23, 2015 05:33
@am11 am11 removed the Dev - WIP label Mar 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants