Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Optimize JavaScript build settings #260

Merged
merged 7 commits into from
Sep 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ jobs:
- name: Generate types
run: npm run generate:type
- name: Build bundle.js
run: npm run dist
run: npm run build
- name: Check differences
run: git diff --exit-code .
6 changes: 3 additions & 3 deletions Sources/Assets/bundle.js

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
"version": "0.14.1",
"description": "Visual debug your app, that is based on Apollo iOS",
"repository": "https://github.com/manicmaniac/ApolloDeveloperKit",
"author": "Ryosuke Ito <[email protected]>",
"license": "MIT",
"private": true,
"module": "src/index.ts",
"sideEffects": [
"src/index.ts"
],
"scripts": {
"build": "webpack --mode=development",
"dist": "webpack --mode=production",
"build": "webpack",
"lint": "eslint . --ext .ts",
"test": "jest",
"generate:type": "npm run generate:type:swift & npm run generate:type:typescript & wait",
"generate:type:swift": "quicktype -l swift --just-types -t Schema -s schema -o Sources/Classes/Schema/Schema.swift ApolloDeveloperKit.schema.json",
"generate:type:typescript": "quicktype -l typescript --just-types -t Schema -s schema -o src/schema.ts ApolloDeveloperKit.schema.json"
},
"author": "Ryosuke Ito <[email protected]>",
"license": "MIT",
"private": true,
"devDependencies": {
"@types/jest": "^26.0.10",
"@typescript-eslint/eslint-plugin": "^3.10.1",
Expand Down
11 changes: 1 addition & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
{
"compilerOptions": {
"outDir": "./Sources/Assets/",
"sourceMap": true,
"lib": [
"dom",
"es6",
"esnext.asynciterable"
],
"allowJs": true,
"esModuleInterop": true,
"removeComments": true,
"module": "es2015",
"target": "es2015",
"moduleResolution": "node",
"strict": true,
"baseUrl": "src/types",
"noImplicitAny": true
"baseUrl": "src/types"
},
"files": [
"src/index.ts",
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');
const path = require('path')

module.exports = {
entry: './src/index.ts',
mode: 'production',
module: {
rules: [
{
Expand All @@ -18,4 +18,4 @@ module.exports = {
filename: 'bundle.js',
path: path.resolve(__dirname, 'Sources/Assets')
}
};
}