Skip to content

Commit

Permalink
feat: setup build configurations and templates
Browse files Browse the repository at this point in the history
  • Loading branch information
imakerjun committed Jul 19, 2023
1 parent dc2c17b commit 015a55f
Show file tree
Hide file tree
Showing 11 changed files with 4,113 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"rules": {},
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program",
"program": "${workspaceFolder}/src/index.js",
"request": "launch",
"runtimeArgs": ["-r", "esm"],
"skipFiles": [
"<node_internals>/**"
],
"sourceMaps": true,
"localRoot": "${workspaceFolder}/dist",
"preLaunchTask": "build",
"type": "node"
},
]
}
11 changes: 11 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "yarn build-dev",
"isBackground": true
}
]
}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# js-jest-calculator
<p align="middle" >
<img width="100px;" src="https://github.com/next-step/js-calculator/raw/main/src/images/calculator_icon.png"/>
</p>
<h2 align="middle">계산기</h2>
<p align="middle">jest를 이용해 테스트해보는 계산기</p>
Empty file added __tests__/Calculator.test.js
Empty file.
Empty file added docs/REQUIREMENTS.md
Empty file.
48 changes: 48 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "@woowacourse/javascript-racingcar",
"version": "1.0.0",
"description": "우아한테크코스 웹 프론트엔드 레벨1 자동차 경주 미션",
"main": "src/index.js",
"scripts": {
"start": "npm run build-prod && node dist/bundle.js",
"build-dev": "webpack --mode development",
"build-prod": "webpack --mode production",
"test": "jest --watch"
},
"repository": {
"type": "git",
"url": "git+https://github.com/woowacourse/javascript-racingcar.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/woowacourse/javascript-racingcar/issues"
},
"homepage": "https://github.com/woowacourse/javascript-racingcar#readme",
"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@types/jest": "^29.2.5",
"babel-jest": "^29.3.1",
"babel-loader": "^9.1.2",
"clean-webpack-plugin": "^4.0.0",
"eslint": "^8.31.0",
"esm": "^3.2.25",
"jest": "^29.3.1",
"prettier": "^2.8.2",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"jest": {
"transform": {
"\\.[jt]sx?$": "babel-jest"
}
},
"babel": {
"presets": [
"@babel/preset-env"
]
}
}
Empty file added src/index.js
Empty file.
30 changes: 30 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const path = require("path");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");

module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
},
resolve: {
extensions: [".js", ".mjs"],
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
},
},
},
],
},
plugins: [new CleanWebpackPlugin()],
devtool: "inline-source-map",
target: "node",
};
Loading

0 comments on commit 015a55f

Please sign in to comment.