Skip to content

Commit

Permalink
Modifications to the swagger spec (API.yaml) triggers a restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Jun 6, 2018
1 parent 66720df commit 5debcc6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
34 changes: 22 additions & 12 deletions app/templates/backpack.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
webpack: (config, options, webpack) => {
config.entry.main = [
'./server/index.ts'
]
config.entry.main = ['./server/index.ts'];

config.resolve = {
extensions: [".ts", ".js", ".json"]
extensions: ['.ts', '.js', '.json'],
};

config.module.rules.push(
{
test: /\.ts$/,
loader: 'awesome-typescript-loader'
}
config.plugins.push(
new CopyWebpackPlugin(
[
{
from: 'server/common/swagger/Api.yaml',
to: 'server/common/swagger/Api.yaml',
},
],
options
)
);

return config
}
}
config.module.rules.push({
test: /\.ts$/,
loader: 'awesome-typescript-loader',
});

return config;
},
};
1 change: 1 addition & 0 deletions app/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"awesome-typescript-loader": "^3.4.1",
"backpack-core": "^0.4.3",
"chai": "^4.1.2",
"copy-webpack-plugin": "^4.5.1",
"mocha": "^4.0.1",
"shelljs": "^0.7.8",
"supertest": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-express-no-stress-typescript",
"version": "1.2.6",
"version": "1.2.7",
"description": "Create awesome APIs with Typescript, ExpressJS and Swagger.",
"main": "app/index.js",
"scripts": {
Expand Down

0 comments on commit 5debcc6

Please sign in to comment.