Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An AMD loader plugin for Sweet.js

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 build
Octocat-spinner-32 example Modified to leverage sweet.js new changes. October 22, 2012
Octocat-spinner-32 src Modified to leverage sweet.js new changes. October 22, 2012
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 README.md
Octocat-spinner-32 grunt.js
Octocat-spinner-32 package.json
README.md

require-sweet

require-sweet is a Require.js plugin that allows you to require sweet.js dependencies into your project. This means you can leverage macros in your JavaScript on the fly, and later during your build!

Download

Usage

You leverage require-sweeten like any other require.js plugin! Simply place "sweeten!" before your dependency path, make sure to leave off the file extension.

define(['sweeten!a/javascript/dep-with-macros'], function(dep) {
  // dep is compiled to JS at this point.
});

You can also see the "example" folder, where require-sweet is being used to run a few macros.

Build

npm install && grunt build

Implementation Details

This project leverages git submodules to embed the sweet.js project. This allows us to automate the build for a new version of the plugin as the sweet.js project moves forward. We leverage grunt to build the plugin.

Author

Credits

The text loading mechanisms is extracted from require-cs, the work done by James Burke.

License

Available via the MIT or new BSD license.

Something went wrong with that request. Please try again.