Skip to content

Instantly share code, notes, and snippets.

@wess
Created August 15, 2012 15:19
Show Gist options
  • Save wess/3360974 to your computer and use it in GitHub Desktop.
Save wess/3360974 to your computer and use it in GitHub Desktop.
write option
[PRouter addOption:@[@"n", @"new"] callback:^(NSString *value) {
NSDictionary *manifest = @{
@"name" : @"",
@"description" : @"",
@"version" : @"",
@"author" : @"",
@"url" : @"",
@"keywords" : @[]
};
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSString *currentPath = [fileManager currentDirectoryPath];
NSString *manifestPath = [NSString stringWithFormat:@"%@/MANIFEST.plist", currentPath];
[manifest writeToFile:manifestPath atomically:YES];
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment