Skip to content

Commit a37da87

Browse files
author
Martin Bektchiev
authored
fix(grunt): Add platforms folder to produced NPM package (#6015)
1 parent 0082dfb commit a37da87

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎gruntfile.js‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = function(grunt) {
3232
if (blockCommentPrivate.test(content)) {
3333
return false;
3434
}
35-
35+
3636
var processed = content;
3737
processed = processed.replace(/\/\/[\/\s]*@private[^]*?\/\/[\/\s]*?@endprivate/gm, "");
3838
return processed;
@@ -106,7 +106,7 @@ module.exports = function(grunt) {
106106
copyAppsSrc.push("!" + localCfg.srcAppDirs[i] + "/**/*.map");
107107
copyAppsSrc.push("!" + localCfg.srcAppDirs[i] + "/**/*.ts");
108108
}
109-
109+
110110
var nodeTestEnv = JSON.parse(JSON.stringify(process.env));
111111
nodeTestEnv.NODE_PATH = localCfg.outTnsCoreModules;
112112
localCfg.nodeTestsDir = path.join(localCfg.outDir, 'unit-tests');
@@ -236,6 +236,11 @@ module.exports = function(grunt) {
236236
],
237237
dest: localCfg.outDir + "/"
238238
},
239+
platformsFiles: {
240+
expand: true,
241+
src: "tns-core-modules/platforms/**/*.*",
242+
dest: localCfg.outDir + "/"
243+
},
239244
apps: {
240245
expand: true,
241246
src: copyAppsSrc,
@@ -321,6 +326,7 @@ module.exports = function(grunt) {
321326
// Register Tasks
322327
grunt.registerTask("collect-modules-raw-files", [
323328
"copy:jsLibs",
329+
"copy:platformsFiles",
324330
"copy:license"
325331
]);
326332

@@ -372,7 +378,7 @@ module.exports = function(grunt) {
372378
"copy:modulesPackageDef",
373379
"exec:packModules"
374380
]);
375-
381+
376382
grunt.registerTask("compile-modules", [
377383
"clean:build",
378384
"shell:getGitSHA",
@@ -446,7 +452,7 @@ module.exports = function(grunt) {
446452
shelljs.exec("npm pack", {cwd: outAppDir});
447453
});
448454
});
449-
455+
450456
grunt.registerTask("get-ready-packages", ["copy:readyPackages"]);
451457

452458
grunt.registerTask("default", (skipTsLint ? [] : ["shell:tslint"]).concat([

0 commit comments

Comments
 (0)