Skip to content

Commit

Permalink
Fix bundled JS dist directory for SPM inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMDev committed Mar 23, 2021
1 parent 491fe37 commit ce7c486
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 28 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

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

16 changes: 4 additions & 12 deletions Apollo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@
9F1A966C258F34BB00A06EEB /* GraphQLSchema.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F1A9667258F34BB00A06EEB /* GraphQLSchema.swift */; };
9F1A966D258F34BB00A06EEB /* CompilationResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F1A9668258F34BB00A06EEB /* CompilationResult.swift */; };
9F1A966F258F34BB00A06EEB /* JavaScriptBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F1A966A258F34BB00A06EEB /* JavaScriptBridge.swift */; };
9F1A9680258F34E500A06EEB /* ApolloCodegenFrontend.bundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 9F1A967F258F34E500A06EEB /* ApolloCodegenFrontend.bundle.js */; };
9F21730E2567E6F000566121 /* DataLoaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FADC8531E6B86D900C677E6 /* DataLoaderTests.swift */; };
9F21735B2568F3E200566121 /* PossiblyDeferredTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F21735A2568F3E200566121 /* PossiblyDeferredTests.swift */; };
9F27D4641D40379500715680 /* JSONStandardTypeConversions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F27D4631D40379500715680 /* JSONStandardTypeConversions.swift */; };
Expand Down Expand Up @@ -276,6 +275,7 @@
C377CCAB22D7992E00572E03 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C377CCAA22D7992E00572E03 /* MultipartFormData.swift */; };
D87AC09F2564D60B0079FAA5 /* ApolloClientOperationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D87AC09E2564D60B0079FAA5 /* ApolloClientOperationTests.swift */; };
D90F1AFB2479E57A007A1534 /* WebSocketTransportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D90F1AF92479DEE5007A1534 /* WebSocketTransportTests.swift */; };
DE3C7974260A646300D2F4FF /* dist in Resources */ = {isa = PBXBuildFile; fileRef = DE3C7973260A646300D2F4FF /* dist */; };
E86D8E05214B32FD0028EFE1 /* JSONTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86D8E03214B32DA0028EFE1 /* JSONTests.swift */; };
F16D083C21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16D083B21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift */; };
F82E62E122BCD223000C311B /* AutomaticPersistedQueriesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F82E62E022BCD223000C311B /* AutomaticPersistedQueriesTests.swift */; };
Expand Down Expand Up @@ -765,7 +765,6 @@
9F1A9667258F34BB00A06EEB /* GraphQLSchema.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphQLSchema.swift; sourceTree = "<group>"; };
9F1A9668258F34BB00A06EEB /* CompilationResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompilationResult.swift; sourceTree = "<group>"; };
9F1A966A258F34BB00A06EEB /* JavaScriptBridge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JavaScriptBridge.swift; sourceTree = "<group>"; };
9F1A967F258F34E500A06EEB /* ApolloCodegenFrontend.bundle.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = ApolloCodegenFrontend.bundle.js; path = JavaScript/dist/ApolloCodegenFrontend.bundle.js; sourceTree = "<group>"; };
9F1A96AF258F36B200A06EEB /* SchemaLoadingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SchemaLoadingTests.swift; sourceTree = "<group>"; };
9F21735A2568F3E200566121 /* PossiblyDeferredTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PossiblyDeferredTests.swift; sourceTree = "<group>"; };
9F27D4631D40379500715680 /* JSONStandardTypeConversions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONStandardTypeConversions.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -845,6 +844,7 @@
C377CCAA22D7992E00572E03 /* MultipartFormData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultipartFormData.swift; sourceTree = "<group>"; };
D87AC09E2564D60B0079FAA5 /* ApolloClientOperationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApolloClientOperationTests.swift; sourceTree = "<group>"; };
D90F1AF92479DEE5007A1534 /* WebSocketTransportTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebSocketTransportTests.swift; sourceTree = "<group>"; };
DE3C7973260A646300D2F4FF /* dist */ = {isa = PBXFileReference; lastKnownFileType = folder; path = dist; sourceTree = "<group>"; };
E86D8E03214B32DA0028EFE1 /* JSONTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONTests.swift; sourceTree = "<group>"; };
F16D083B21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryFromJSONBuildingTests.swift; sourceTree = "<group>"; };
F82E62E022BCD223000C311B /* AutomaticPersistedQueriesTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutomaticPersistedQueriesTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1579,14 +1579,6 @@
path = ApolloPerformanceTests;
sourceTree = "<group>";
};
9F62DF8C2590458800E6E808 /* JavaScript */ = {
isa = PBXGroup;
children = (
9F1A967F258F34E500A06EEB /* ApolloCodegenFrontend.bundle.js */,
);
name = JavaScript;
sourceTree = "<group>";
};
9FA6ABBD1EC0A988000017BE /* ApolloCacheDependentTests */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1798,7 +1790,7 @@
9F62E03E2590896400E6E808 /* GraphQLError.swift */,
9F1A9668258F34BB00A06EEB /* CompilationResult.swift */,
9F1A966A258F34BB00A06EEB /* JavaScriptBridge.swift */,
9F62DF8C2590458800E6E808 /* JavaScript */,
DE3C7973260A646300D2F4FF /* dist */,
);
path = Frontend;
sourceTree = "<group>";
Expand Down Expand Up @@ -2354,7 +2346,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9F1A9680258F34E500A06EEB /* ApolloCodegenFrontend.bundle.js in Resources */,
DE3C7974260A646300D2F4FF /* dist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
13 changes: 2 additions & 11 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"repositoryURL": "https://github.com/daltoniam/Starscream",
"state": {
"branch": null,
"revision": "e6b65c6d9077ea48b4a7bdda8994a1d3c6969c8d",
"version": "3.1.1"
"revision": "df8d82047f6654d8e4b655d1b1525c64e1059d21",
"version": "4.0.4"
}
},
{
Expand All @@ -54,15 +54,6 @@
"revision": "94197b3adbbf926348ad8765476a158aa4e54f8a",
"version": "0.14.0"
}
},
{
"package": "swift-nio-zlib-support",
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git",
"state": {
"branch": null,
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd",
"version": "1.0.0"
}
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ let package = Package(
"Frontend/JavaScript",
],
resources: [
.copy("Frontend/JavaScript/dist/ApolloCodegenFrontend.bundle.js")
.copy("Frontend/dist/ApolloCodegenFrontend.bundle.js")
]),
.target(
name: "ApolloSQLite",
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions Sources/ApolloCodegenLib/Frontend/JavaScript/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { terser } from "rollup-plugin-terser";
const options = {
input: "src/index.ts",
output: {
file: "dist/ApolloCodegenFrontend.bundle.js",
file: "../dist/ApolloCodegenFrontend.bundle.js",
format: "iife",
name: "ApolloCodegenFrontend",
sourcemap: true,
Expand All @@ -29,4 +29,4 @@ const options = {
],
};

export default options;
export default options;

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit ce7c486

Please sign in to comment.