This project lets you use .soy-file templates from Google Closure projects in TypeScript projects using webpack without giving up the many benefits of TypeScripts strong type system. Basically, this loader will generate typings for the soy templates.
Simply install via NPM:
npm install --save-dev soy-declaration-loader
Then, configure your webpack to load .soy files using soy-declaration-loader:
module: {
loaders: [
{
test: /\.soy$/,
include: [
path.resolve(__dirname, './src/main/resources/soy')
],
loader: 'soy-declaration-loader'
}
]
}
This will make them available from TypeScript at compile time.
If you want to help develop, please make sure the tests don't break. Check out this repository and run the tests with npm run test
.
Also, when contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the Unlicense - see the LICENSE.md file for details.