wip readme
This commit is contained in:
parent
688b7b08a9
commit
93121bc92a
42
README.md
42
README.md
|
@ -48,27 +48,53 @@ Useful links: [N-API Docs](https://nodejs.org/api/n-api.html),
|
||||||
## Snippets
|
## Snippets
|
||||||
|
|
||||||
|
|
||||||
### binding.gyp
|
|
||||||
|
|
||||||
### Crossplatform commands
|
### Crossplatform commands
|
||||||
|
|
||||||
```
|
```
|
||||||
'variables': {
|
'variables': {
|
||||||
'rm' : '<!(node -e "require(\'addon-tools-raub\').rm()")',
|
'rm' : '<!(node -p "require(\'addon-tools-raub\').rm")',
|
||||||
'cp' : '<!(node -e "require(\'addon-tools-raub\').cp()")',
|
'cp' : '<!(node -p "require(\'addon-tools-raub\').cp")',
|
||||||
'mkdir' : '<!(node -e "require(\'addon-tools-raub\').mkdir()")',
|
'mkdir' : '<!(node -p "require(\'addon-tools-raub\').mkdir")',
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
On both Windows and Unix those are the console commands for various
|
On both Windows and Unix those commands now have the same result:
|
||||||
file system operations. No need for GYP conditions, yay!
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
'target_name' : 'make_directory',
|
||||||
|
'type' : 'none',
|
||||||
|
'dependencies' : ['addon'],
|
||||||
|
'actions' : [{
|
||||||
|
'action_name' : 'Directory created.',
|
||||||
|
'inputs' : [],
|
||||||
|
'outputs' : ['build'],
|
||||||
|
'action': ['<(mkdir)', '-p', '<(binary)']
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'target_name' : 'copy_binary',
|
||||||
|
'type' : 'none',
|
||||||
|
'dependencies' : ['make_directory'],
|
||||||
|
'actions' : [{
|
||||||
|
'action_name' : 'Module copied.',
|
||||||
|
'inputs' : [],
|
||||||
|
'outputs' : ['binary'],
|
||||||
|
'action' : [
|
||||||
|
'<(cp)',
|
||||||
|
'build/Release/addon.node',
|
||||||
|
'<(binary)/addon.node'
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Addon binary directory
|
### Addon binary directory
|
||||||
|
|
||||||
```
|
```
|
||||||
'variables': {
|
'variables': {
|
||||||
'binary' : '<!(node -e "require(\'addon-tools-raub\').bin()")',
|
'binary' : '<!(node -p "require(\'addon-tools-raub\').bin")',
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue