Merged PR 217176: [VanillaNapa] add javascript core modules

[VanillaNapa] add javascript core modules
This commit is contained in:
Yulong Wang 2017-03-24 00:32:49 +00:00 коммит произвёл Yulong Wang
Родитель 8038a45f8e
Коммит b4bf91e7ee
5 изменённых файлов: 46 добавлений и 2 удалений

2
.gitignore поставляемый
Просмотреть файл

@ -1,2 +1,4 @@
node_modules
.npmrc
!tsconfig.json

Просмотреть файл

@ -3,6 +3,7 @@
<ItemGroup>
<ProjectFile Include="examples\dirs.proj" />
<ProjectFile Include="lib\js-core-modules.proj" />
<ProjectFile Include="modules\dirs.proj" />
<ProjectFile Include="src\napa.vcxproj" />
<ProjectFile Include="test\dirs.proj" />

24
lib/js-core-modules.proj Normal file
Просмотреть файл

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For information about msbuild in Bing see https://www.bingwiki.com/Msbuild
-->
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Must exist in every MSbuild project file and should be the first node -->
<Import Project="$(EnvironmentConfig)" />
<!-- Add custom inputs for cloudbuild dependency graph -->
<ItemGroup>
<QCustomInput Include="$(NapaBuildRoot)\**\*" />
<QCustomInput Include="**\*.ts" />
<QCustomInput Include="**\*.js" />
<QCustomInput Include="tsconfig.json" />
</ItemGroup>
<!-- Must exist in every vcxproj and should be the last node -->
<Import Project="$(ExtendedTargetsPath)\NoTarget.targets" />
<!-- Build TypeScript files-->
<Target Name="BeforeBuild">
<Exec Command="$(TSCompile) --outDir $(IntermediateOutputPath)" />
</Target>
</Project>

10
lib/tsconfig.json Normal file
Просмотреть файл

@ -0,0 +1,10 @@
{
"compilerOptions": {
"module": "commonjs",
"allowJs": true,
"baseUrl": ".",
"paths": {
"*": ["*"]
}
}
}

Просмотреть файл

@ -3,6 +3,7 @@
<Import Project="$(EnvironmentConfig)" />
<ItemGroup>
<QCustomProjectReference Include="$(NapaVanillaRoot)\lib\js-core-modules.proj" />
<QCustomProjectReference Include="..\napa\addon.vcxproj" />
<QCustomProjectReference Include="..\node\addon.vcxproj" />
</ItemGroup>
@ -29,9 +30,15 @@
<Copy SourceFiles="napa-cl.bat" DestinationFolder="$(PackageOutPath)\tools" ContinueOnError="false" SkipUnchangedFiles="true" />
<Copy SourceFiles="package.json" DestinationFolder="$(PackageOutPath)" ContinueOnError="false" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(NapaBuildRoot)\node\.npmrc" DestinationFolder="$(PackageOutPath)" ContinueOnError="false" SkipUnchangedFiles="true" />
<!-- Core modules -->
<ItemGroup>
<IncFiles Include="$(NapaVanillaRoot)\inc\**\*"/>
<JsCoreModuleFiles Include="$(NapaVanillaRoot)\lib\$(O)\**\*"/>
</ItemGroup>
<Copy SourceFiles="@(JsCoreModuleFiles)" DestinationFiles="@(JsCoreModuleFiles->'$(PackageOutPath)\lib\%(RecursiveDir)%(Filename)%(Extension)')" ContinueOnError="false" SkipUnchangedFiles="true" />
<ItemGroup>
<IncFiles Include="$(NapaVanillaRoot)\inc\**\*.js"/>
</ItemGroup>
<Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(PackageOutPath)\inc\%(RecursiveDir)%(Filename)%(Extension)')" ContinueOnError="false" SkipUnchangedFiles="true" />