Skip to content

Commit

Permalink
Merge pull request #8 from k2tzumi/fix-makefile
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
k2tzumi authored Mar 4, 2023
2 parents 49dac4f + b3fb673 commit c922d20
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.clasp.json:
make login
clasp create --title JobBroker --type standalone --rootDir ./dist
clasp setting fileExtension js
rm -f .clasp.json-e
Expand All @@ -17,7 +18,7 @@ node_modules:

.PHONY: login
login: ## Google login
login: .clasp.json
login:
clasp login

.PHONY: build
Expand Down Expand Up @@ -58,7 +59,7 @@ test: node_modules
.PHONY: clean
clean: ## clean webpack bundle
clean:
rm -f dist/index.js
rm -f dist/index.js*

.PHONY: undeploy
undeploy: ## all undeploy Google apps scripts
Expand Down
23 changes: 20 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ module.exports = {
path: path.join(__dirname, "dist"),
filename: "index.js",
library: "JobBroker",
libraryTarget: "this"
libraryTarget: "this",
globalObject: 'this',
environment: {
arrowFunction: false
}
},
resolve: {
extensions: [".ts", ".js"],
Expand All @@ -24,10 +28,23 @@ module.exports = {
module: {
rules: [
{
test: /\.ts$/,
test: /\.[tj]s$/,
exclude: /node_modules/,
use: {
loader: 'ts-loader',
loader: 'babel-loader',
options: {
presets: [
[
"@babel/preset-env",
{
"targets": {
"browsers": ["ie 8"]
}
}
],
"@babel/preset-typescript"
]
}
}
},
],
Expand Down

0 comments on commit c922d20

Please sign in to comment.