Skip to content

Commit

Permalink
Apply shebang at build file (#12)
Browse files Browse the repository at this point in the history
* env: apply sourceMap

* fix: apply shebang at build file

* update: package version and build
  • Loading branch information
hyesungoh authored Jul 4, 2022
1 parent 1172119 commit cd79032
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-comet-land",
"version": "1.1.1",
"version": "1.1.2",
"license": "MIT",
"description": "Generate a app with comet-land",
"repository": {
Expand All @@ -19,6 +19,7 @@
"scripts": {
"build": "webpack",
"start": "npm run build && node dist/index.js",
"start:force": "node dist/index.js",
"lint": "eslint",
"pretest": "npm run build"
},
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"compilerOptions": {
"target": "es5",
"module": "es6",
"module": "CommonJS",
"moduleResolution": "node",
"strict": true,
"jsx": "react",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist"
"outDir": "dist",
"sourceMap": true
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "dist"],
Expand Down
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const path = require('path');
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');

module.exports = {
mode: 'production',
devtool: 'inline-source-map',
externalsPresets: { node: true },
externals: [nodeExternals()],
target: 'node',
Expand All @@ -24,4 +26,10 @@ module.exports = {
},
],
},
plugins: [
new webpack.BannerPlugin({
banner: '#!/usr/bin/env node',
raw: true,
}),
],
};

0 comments on commit cd79032

Please # to comment.