@nativescript/windows 0.1.0-alpha.3 → 0.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,10 +139,12 @@ namespace __PROJECT_NAME__
139
139
  private static string ResolveEntryScriptPath()
140
140
  {
141
141
  var baseDir = AppContext.BaseDirectory;
142
- var defaultPath = Path.Combine(baseDir, "App", "main.js");
142
+ var defaultLower = Path.Combine(baseDir, "app", "main.js");
143
+ var defaultUpper = Path.Combine(baseDir, "App", "main.js");
143
144
  var packageJsonPath = Path.Combine(baseDir, "package.json");
144
145
 
145
- if (!File.Exists(packageJsonPath)) return defaultPath;
146
+ if (!File.Exists(packageJsonPath))
147
+ return File.Exists(defaultLower) ? defaultLower : defaultUpper;
146
148
 
147
149
  try
148
150
  {
@@ -160,7 +162,7 @@ namespace __PROJECT_NAME__
160
162
  }
161
163
  catch { }
162
164
 
163
- return defaultPath;
165
+ return File.Exists(defaultLower) ? defaultLower : defaultUpper;
164
166
  }
165
167
 
166
168
  private static RuntimePackageConfig ParsePackageConfig(string packageJsonPath)
@@ -181,8 +183,10 @@ namespace __PROJECT_NAME__
181
183
  var normalized = scriptPath.Replace('/', Path.DirectorySeparatorChar);
182
184
  var direct = Path.IsPathRooted(normalized) ? normalized : Path.Combine(baseDir, normalized);
183
185
  if (File.Exists(direct)) return direct;
184
- var appPath = Path.Combine(baseDir, "App", normalized);
185
- return File.Exists(appPath) ? appPath : null;
186
+ var appLower = Path.Combine(baseDir, "app", normalized);
187
+ if (File.Exists(appLower)) return appLower;
188
+ var appUpper = Path.Combine(baseDir, "App", normalized);
189
+ return File.Exists(appUpper) ? appUpper : null;
186
190
  }
187
191
 
188
192
  public void Dispose()
@@ -32,7 +32,7 @@
32
32
  <Content Include="Properties\Default.rd.xml" />
33
33
 
34
34
  <!-- App JS/resource files — copied to the output directory on every build -->
35
- <Content Include="App\**\*">
35
+ <Content Include="app\**\*">
36
36
  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
37
37
  </Content>
38
38
 
@@ -80,4 +80,11 @@
80
80
  <Message Text="[NativeScript] Publishing DotNetBridge..." Importance="high" />
81
81
  <Exec Command="dotnet publish &quot;$(NSWindowsRoot)\dotnet-bridge\DotNetBridge.csproj&quot; -c Release -o &quot;$(NSWindowsRoot)\dotnet-bridge\publish&quot; --no-self-contained /nologo" />
82
82
  </Target>
83
+
84
+ <!-- Allow project-level Windows overrides: place App_Resources\Windows\app.csproj to extend/override generated settings -->
85
+ <Import Project="App_Resources\Windows\app.csproj" Condition="Exists('App_Resources\Windows\app.csproj')" />
86
+
87
+ <!-- CLI-generated plugin imports (managed by the CLI during prepare) -->
88
+ <Import Project="plugins\Plugins.props" Condition="Exists('plugins\Plugins.props')" />
89
+ <Import Project="plugins\Plugins.targets" Condition="Exists('plugins\Plugins.targets')" />
83
90
  </Project>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript/windows",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "NativeScript for using Windows v8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,12 +0,0 @@
1
- const page = new Windows.UI.Xaml.Controls.Page();
2
- const text = new Windows.UI.Xaml.Controls.TextBlock();
3
- text.Text = "Hello from NativeScript on Windows!";
4
- text.FontSize = 24;
5
- text.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center;
6
- text.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Center;
7
-
8
- const grid = new Windows.UI.Xaml.Controls.Grid();
9
- grid.Children.Append(text);
10
- page.Content = grid;
11
-
12
- Windows.UI.Xaml.Window.Current.Content = page;