Skip to content

Commit 8d1d497

Browse files
committed
fix: 🐛 Npm publish package bug fix
This commit includes regex bug fixes for package published to npm BREAKING CHANGE: 🧨 YES
1 parent e2672cc commit 8d1d497

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.npmignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
./**/node_modules
3+
coverage
4+
./**/coverage

lib/fastify-generator.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const copyProjectFiles = (config, destination) => {
1010
const source = path.join(__dirname, prjFolder);
1111
return new Promise((resolve, reject) => {
1212
ncp.limit = 16;
13-
ncp(source, destination, { filter: /^((?!node_modules|coverage|package-lock.json).)*$/ }, (err) => {
13+
ncp(source, destination, { stopOnErr: true }, (err) => {
1414
if (err) {
1515
reject(err);
1616
}
@@ -53,7 +53,7 @@ const fastifyGenTs = async (config, destination) => {
5353
await updatePackageJson(destination);
5454
downloadNodeModules(config, destination);
5555
} catch (err) {
56-
console.error(err);
56+
throw err;
5757
}
5858
};
5959

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "fastify-typescript-generator",
3-
"version": "0.0.5",
3+
"version": "0.1.0",
44
"description": "Generate new Fastify applications similar to express-generate which but sets it up to use TypeScript instead",
5+
"preferGlobal": true,
56
"scripts": {
67
"fastify-generator-typescript": "node cli.js",
78
"start": "node cli.js",

0 commit comments

Comments
 (0)