You've already forked StringFilr
mirror of
https://github.com/FullScreenShenanigans/StringFilr.git
synced 2026-04-28 13:00:51 -07:00
Cleaned up builds with preprocess: one output file
This commit is contained in:
+15
-1
@@ -21,11 +21,17 @@ module.exports = function (grunt) {
|
||||
"dest": "<%= meta.paths.source %>/<%= pkg.name %>.js"
|
||||
}
|
||||
},
|
||||
"clean": ["<%= meta.paths.dist %>"],
|
||||
"copy": {
|
||||
"default": {
|
||||
"files": [{
|
||||
"src": "<%= meta.paths.source %>/<%= pkg.name %>.ts",
|
||||
"dest": "<%= meta.paths.dist %>/<%= pkg.name %>-<%= pkg.version %>.ts"
|
||||
}, {
|
||||
"src": "<%= meta.paths.source %>/References/*.ts",
|
||||
"dest": "<%= meta.paths.dist %>/",
|
||||
"expand": true,
|
||||
"flatten": true
|
||||
}, {
|
||||
"src": "README.md",
|
||||
"dest": "<%= meta.paths.dist %>/"
|
||||
@@ -51,17 +57,25 @@ module.exports = function (grunt) {
|
||||
}
|
||||
}
|
||||
},
|
||||
"preprocess": {
|
||||
"dist": {
|
||||
"src": "<%= meta.paths.dist %>/<%= pkg.name %>-<%= pkg.version %>.ts",
|
||||
"dest": "<%= meta.paths.dist %>/<%= pkg.name %>-<%= pkg.version %>.ts"
|
||||
}
|
||||
},
|
||||
"mocha_phantomjs": {
|
||||
"all": ["Tests/*.html"]
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks("grunt-contrib-clean");
|
||||
grunt.loadNpmTasks("grunt-contrib-copy");
|
||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||
grunt.loadNpmTasks("grunt-mocha-phantomjs");
|
||||
grunt.loadNpmTasks("grunt-preprocess");
|
||||
grunt.loadNpmTasks("grunt-tslint");
|
||||
grunt.loadNpmTasks("grunt-typescript");
|
||||
grunt.registerTask("default", [
|
||||
"tslint", "typescript", "copy", "uglify", "mocha_phantomjs"
|
||||
"tslint", "typescript", "clean", "copy", "uglify", "preprocess", "mocha_phantomjs"
|
||||
]);
|
||||
};
|
||||
Vendored
+10
-4
@@ -1,13 +1,19 @@
|
||||
declare module StringFilr {
|
||||
export interface IStringFilrSettings {
|
||||
// An Object containing data stored as children of sub-Objects.
|
||||
/**
|
||||
* An Object containing data stored as children of sub-Objects.
|
||||
*/
|
||||
library: any;
|
||||
|
||||
// A String to use as a default key to rescue on, if provided.
|
||||
/**
|
||||
* A String to use as a default key to rescue on, if provided.
|
||||
*/
|
||||
normal?: string;
|
||||
|
||||
// Whether it's ok for the library to have Objects that don't contain the
|
||||
// normal key (by default, false).
|
||||
/**
|
||||
* Whether it's ok for the library to have Objects that don't contain the
|
||||
* normal key (by default, false).
|
||||
*/
|
||||
requireNormalKey?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
// @ifdef INCLUDE_DEFINITIONS
|
||||
/// <reference path="StringFilr.d.ts" />
|
||||
// @endif
|
||||
|
||||
// @include ../Source/StringFilr.d.ts
|
||||
|
||||
module StringFilr {
|
||||
"use strict";
|
||||
@@ -8,8 +12,6 @@ module StringFilr {
|
||||
* names. You can think of the internal "library" Object as a tree structure,
|
||||
* such that you can pass in a listing (in any order) of the path to data for
|
||||
* retrieval.
|
||||
*
|
||||
* @author "Josh Goldberg" <josh@fullscreenmario.com>
|
||||
*/
|
||||
export class StringFilr implements IStringFilr {
|
||||
// The library of data.
|
||||
@@ -25,9 +27,6 @@ module StringFilr {
|
||||
private requireNormalKey: boolean;
|
||||
|
||||
/**
|
||||
* Resets the StringFilr.
|
||||
*
|
||||
* @constructor
|
||||
* @param {IStringFilrSettings} settings
|
||||
*/
|
||||
constructor(settings: IStringFilrSettings) {
|
||||
|
||||
+12
-13
@@ -13,21 +13,20 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/FullScreenShenanigans/StringFilr/issues"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/FullScreenShenanigans/StringFilr/blob/master/LICENSE.txt"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chai": "2.2.X",
|
||||
"grunt": "0.4.X",
|
||||
"grunt-cli": "0.1.X",
|
||||
"grunt-contrib-copy": "0.8.X",
|
||||
"grunt-contrib-uglify": "0.8.X",
|
||||
"grunt-mocha-phantomjs": "0.6.X",
|
||||
"chai": "~2.2.X",
|
||||
"grunt-contrib-clean": "~0.6.0",
|
||||
"grunt": "~0.4.X",
|
||||
"grunt-cli": "~0.1.X",
|
||||
"grunt-contrib-copy": "~0.8.X",
|
||||
"grunt-contrib-uglify": "~0.8.X",
|
||||
"grunt-mocha-phantomjs": "~0.6.X",
|
||||
"grunt-tslint": "2.0.X",
|
||||
"grunt-typescript": "0.6.X",
|
||||
"mocha": "~2.2.X"
|
||||
"mocha": "~2.2.X",
|
||||
"grunt-preprocess": "~4.1.X",
|
||||
"tslint": "~2.0.X",
|
||||
"typescript": "~1.4.X"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user