add doric-cli init content
This commit is contained in:
@@ -419,7 +419,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\nexport NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" # This loads nvm\n[ -s \"$NVM_DIR/bash_completion\" ] && \\. \"$NVM_DIR/bash_completion\" # This loads nvm bash_completion\n\ncd ../../js-framework && npm run build\n";
|
||||
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\nexport NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" # This loads nvm\n[ -s \"$NVM_DIR/bash_completion\" ] && \\. \"$NVM_DIR/bash_completion\" # This loads nvm bash_completion\n\ncd ../../js-framework && npm run build\ncd ../demo && npm run build\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
@@ -21,16 +21,7 @@ @implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.text = @"Hello,Doric";
|
||||
[label sizeToFit];
|
||||
label.centerX = self.view.width/2;
|
||||
label.centerY = self.view.height/2;
|
||||
[self.view addSubview:label];
|
||||
|
||||
UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(test:)];
|
||||
[label addGestureRecognizer:recognizer];
|
||||
label.userInteractionEnabled = YES;
|
||||
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Snake" ofType:@"js"];
|
||||
NSString *jsContent = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
|
||||
self.doricContext = [[DoricContext alloc] initWithScript:jsContent source:@"Snake"];
|
||||
@@ -39,8 +30,5 @@ - (void)viewDidLoad {
|
||||
@"height":[NSNumber numberWithFloat:self.view.height]},nil];
|
||||
}
|
||||
|
||||
- (void)test:(UIView *)view {
|
||||
NSLog(@"test");
|
||||
[self.doricContext callEntity:@"log",nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user