Add sprintf.js v1.0.2.

This script provides sprintf() for JavaScript. It can be used for
example for translating strings used in JavaScript with variables.

It is licensed under BSD-3-Clause and can be found on GitHub:
https://github.com/alexei/sprintf.js
This commit is contained in:
Klaus Weidenbach
2015-05-14 10:39:56 +02:00
parent f866a42a42
commit c62e75d789
15 changed files with 497 additions and 4 deletions

View File

@@ -0,0 +1,36 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
uglify: {
options: {
banner: "/*! <%= pkg.name %> | <%= pkg.author %> | <%= pkg.license %> */\n",
sourceMap: true
},
build: {
files: [
{
src: "src/sprintf.js",
dest: "dist/sprintf.min.js"
},
{
src: "src/angular-sprintf.js",
dest: "dist/angular-sprintf.min.js"
}
]
}
},
watch: {
js: {
files: "src/*.js",
tasks: ["uglify"]
}
}
})
grunt.loadNpmTasks("grunt-contrib-uglify")
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.registerTask("default", ["uglify", "watch"])
}