Skip to content

Commit de61ab8

Browse files
committed
Prep for v5.5.1
1 parent 4a81b1f commit de61ab8

29 files changed

+1034
-351
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Releases
22

3+
## vNext
4+
5+
## v5.5.1
6+
* CHORE: Internal grunt-ts compiler now upgraded to v5.5.0 / TypeScript 1.8.9.
7+
* CHORE: Grunt-ts itself now compiles cleanly with `--forceConsistentCasingInFileNames`, `--noFallthroughCasesInSwitch`, and `--noImplicitReturns` enabled.
8+
* DOCS: Completed documentation for new v5.5 (TypeScript 1.8) features.
9+
310
## v5.5.0
411
* FEAT: Support TypeScript 1.8+
512
* FIX: "Visual Studio config issue: {} when src contains nested arrays". Thanks very much to first-time contributor @davidparsson for the PR! (#353)

Gruntfile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ module.exports = function (grunt) {
5959
comments: true,
6060
sourceMap: true,
6161
verbose: true,
62-
fast: 'always'
62+
fast: 'always',
63+
forceConsistentCasingInFileNames: true,
64+
noFallthroughCasesInSwitch: true,
65+
noImplicitReturns: true,
66+
pretty: true
6367
},
6468
build: {
6569
src: ['tasks/**/*.ts']

README.md

Lines changed: 197 additions & 9 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "basarat",
33
"name": "grunt-ts",
44
"description": "Compile and manage your TypeScript project",
5-
"version": "5.5.0",
5+
"version": "5.5.1",
66
"homepage": "https://github.com/TypeStrong/grunt-ts",
77
"repository": {
88
"type": "git",

tasks-internal/modules/amdLoader.js

Lines changed: 17 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tasks-internal/modules/amdLoader.ts

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,26 @@ export function getReferencesInOrder(referenceFile: string, referencePath: strin
110110
export function updateAmdLoader(referenceFile: string, files: IReferences, loaderFile: string,
111111
loaderPath: string, outDir: string, newLine = utils.eol) {
112112

113+
let commonPath: string;
114+
const makeRelativeToOutDir = function(files: string[]) {
115+
files = _.map(files, (file) => {
116+
// Remove common path and replace with absolute outDir
117+
file = file.replace(commonPath, outDir);
118+
119+
// remove extension '.ts' / '.tsx':
120+
file = file.substr(0, file.lastIndexOf('.'));
121+
122+
// Make relative to amd loader
123+
file = utils.makeRelativePath(loaderPath, file);
124+
125+
// Prepend "./" to prevent "basePath" requirejs setting from interferring:
126+
file = './' + file;
127+
128+
return file;
129+
});
130+
return files;
131+
};
132+
113133
// Read the original file if it exists
114134
if (fs.existsSync(referenceFile)) {
115135
grunt.log.verbose.writeln('Generating amdloader from reference file ' + referenceFile);
@@ -145,32 +165,13 @@ export function updateAmdLoader(referenceFile: string, files: IReferences, loade
145165
// Finally: outDir path + remainder section
146166
if (outDir) {
147167
// Find common path
148-
var commonPath = utils.findCommonPath(files.before.concat(files.generated.concat(files.unordered.concat(files.after))), pathSeperator);
168+
commonPath = utils.findCommonPath(files.before.concat(files.generated.concat(files.unordered.concat(files.after))), pathSeperator);
149169
grunt.log.verbose.writeln('Found common path: ' + commonPath);
150170

151171
// Make sure outDir is absolute:
152172
outDir = path.resolve(outDir);
153173
grunt.log.verbose.writeln('Using outDir: ' + outDir);
154174

155-
function makeRelativeToOutDir(files: string[]) {
156-
files = _.map(files, (file) => {
157-
// Remove common path and replace with absolute outDir
158-
file = file.replace(commonPath, outDir);
159-
160-
// remove ts extension '.ts':
161-
file = file.substr(0, file.length - 3);
162-
163-
// Make relative to amd loader
164-
file = utils.makeRelativePath(loaderPath, file);
165-
166-
// Prepend "./" to prevent "basePath" requirejs setting from interferring:
167-
file = './' + file;
168-
169-
return file;
170-
});
171-
return files;
172-
}
173-
174175
grunt.log.verbose.writeln('Making files relative to outDir...');
175176
files.before = makeRelativeToOutDir(files.before);
176177
files.generated = makeRelativeToOutDir(files.generated);

tasks-internal/modules/cacheUtils.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tasks-internal/modules/compile.js

Lines changed: 91 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)