File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
tests/with-mocks/cli/command/func/with-logging/with-error/__snapshots__ Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ const fsExtra = require('fs-extra');
12
12
13
13
const jsonfile = require ( 'jsonfile' ) ;
14
14
15
+ const uuidV1 = require ( 'uuid' ) . v1 ;
16
+
15
17
// Internal imports:
16
18
17
19
const normalizedOptions = require ( './normalized-options' ) ;
@@ -151,6 +153,11 @@ const generateWithNormalizedOptions = ({
151
153
152
154
console . info ( 'CREATE: Generating the React Native library module' ) ;
153
155
156
+ // uuid (v1) for Windows only for now (at least)
157
+ const uuid = ( platforms . indexOf ( 'windows' ) !== - 1 )
158
+ ? uuidV1 ( ) . toUpperCase ( )
159
+ : null ;
160
+
154
161
const generateLibraryModule = ( ) => {
155
162
return fs . ensureDir ( moduleName ) . then ( ( ) => {
156
163
return Promise . all ( templates . filter ( ( template ) => {
@@ -173,6 +180,7 @@ const generateWithNormalizedOptions = ({
173
180
license,
174
181
view,
175
182
useAppleNetworking,
183
+ uuid,
176
184
generateExample,
177
185
exampleName,
178
186
} ;
Original file line number Diff line number Diff line change 1
- const uuid = require ( 'uuid' ) . v1 ( ) . toUpperCase ( ) ;
2
-
3
1
module . exports = platform => [ {
4
2
name : ( { name } ) => `${ platform } /${ name } .sln` ,
5
- content : ( { name } ) =>
3
+ content : ( { name, uuid } ) =>
6
4
`Microsoft Visual Studio Solution File, Format Version 12.00
7
5
# Visual Studio 14
8
6
VisualStudioVersion = 14.0.25123.0
209
207
` ,
210
208
} , {
211
209
name : ( { name } ) => `${ platform } /${ name } /${ name } .csproj` ,
212
- content : ( { name, namespace } ) =>
210
+ content : ( { name, namespace, uuid } ) =>
213
211
`<?xml version="1.0" encoding="utf-8"?>
214
212
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
215
213
<Import Project="$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')" />
Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ Array [
45
45
" error" : Array [
46
46
" Error: ENOPERM not permitted
47
47
at Object .ensureDir (... / tests / with - mocks / cli / command / func / with - logging / with - error / cli - command - with - logging - with - error .test .js :9 :27 )
48
- at ensureDir (... / lib / lib .js :155 :15 )
49
- at generateLibraryModule (... / lib / lib .js :281 :10 )
50
- at generateWithNormalizedOptions (... / lib / lib .js :298 :10 )
48
+ at ensureDir (... / lib / lib .js :162 :15 )
49
+ at generateLibraryModule (... / lib / lib .js :289 :10 )
50
+ at generateWithNormalizedOptions (... / lib / lib .js :306 :10 )
51
51
at createLibraryModule (... / lib / cli - command .js :...
52
52
at Object .func (... / tests / with - mocks / cli / command / func / with - logging / with - error / cli - command - with - logging - with - error .test .js :62 :9 )
53
53
" ,
You can’t perform that action at this time.
0 commit comments