diff --git a/generators/app/templates/package.json b/generators/app/templates/package.json index 601c9ef..6dc50d8 100644 --- a/generators/app/templates/package.json +++ b/generators/app/templates/package.json @@ -1,10 +1,16 @@ { - "main": "lib/binding.js", + "main": "dist/binding.js", "dependencies": { "node-addon-api": "^1.1.0" }, "scripts": { - "test": "node --napi-modules ./test/test_binding.js" + "test": "node --napi-modules ./test/test_binding.js", + "build": "node-gyp rebuild" }, - "gypfile": true + "gypfile": true, + "files": [ + "binding.gyp", + "src", + "dist" + ] } diff --git a/generators/app/templates/package.ts.json b/generators/app/templates/package.ts.json index 8609bb7..01e6a6d 100644 --- a/generators/app/templates/package.ts.json +++ b/generators/app/templates/package.ts.json @@ -5,6 +5,7 @@ }, "scripts": { "pretest": "tsc", - "test": "node --napi-modules ./test/test_binding.js" + "test": "node --napi-modules ./test/test_binding.js", + "build": "node-gyp rebuild && tsc" } } \ No newline at end of file diff --git a/src/app/index.ts b/src/app/index.ts index d563fff..c827cb6 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -233,6 +233,7 @@ module.exports = class extends Generator { const files = [ ["binding.gyp"], + [".gitignore"], [bindingWrapperSrc, bindingWrapperTarget], ];