Skip to content

Commit

Permalink
refactor: move electron-builder according to lerna structure
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Dec 31, 2016
1 parent 3078539 commit ee20136
Show file tree
Hide file tree
Showing 127 changed files with 407 additions and 603 deletions.
2 changes: 1 addition & 1 deletion .idea/scopes/src.xml

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

55 changes: 5 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"node-gyp-rebuild": "./out/cli/node-gyp-rebuild.js"
},
"scripts": {
"compile": "ts-babel packages/electron-builder-http . packages/electron-auto-updater test",
"lint": "node ./test/lint.js",
"compile": "ts-babel packages/electron-builder-http packages/electron-builder packages/electron-auto-updater test",
"lint": "node ./packages/lint.js",
"pretest": "node ./test/vendor/yarn.js run compile && node ./test/vendor/yarn.js run lint",
"check-deps": "node ./test/out/helpers/checkDeps.js",
"test": "node ./test/out/helpers/runTests.js",
Expand Down Expand Up @@ -56,54 +56,8 @@
"license": "MIT",
"bugs": "https://github.com/electron-userland/electron-builder/issues",
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"7zip-bin": "^2.0.4",
"ansi-escapes": "^1.4.0",
"archiver": "^1.3.0",
"asar-electron-builder": "^0.13.5",
"bluebird-lst-c": "^1.0.5",
"chalk": "^1.1.3",
"chromium-pickle-js": "^0.2.0",
"cli-cursor": "^1.0.2",
"cuint": "^0.2.2",
"debug": "2.5.2",
"electron-download-tf": "3.1.0",
"electron-macos-sign": "~1.4.0",
"fs-extra-p": "^3.0.3",
"hosted-git-info": "^2.1.5",
"ini": "^1.3.4",
"interactive": "^0.1.9",
"is-ci": "^1.0.10",
"isbinaryfile": "^3.0.1",
"js-yaml": "^3.7.0",
"lodash.template": "^4.4.0",
"mime": "^1.3.4",
"minimatch": "^3.0.3",
"node-emoji": "^1.4.3",
"normalize-package-data": "^2.3.5",
"parse-color": "^1.0.0",
"plist": "^2.0.1",
"pretty-ms": "^2.1.0",
"progress": "^1.1.8",
"progress-stream": "^1.2.0",
"read-installed": "^4.0.3",
"sanitize-filename": "^1.6.1",
"semver": "^5.3.0",
"source-map-support": "^0.4.8",
"stat-mode": "^0.2.2",
"tunnel-agent": "^0.4.3",
"update-notifier": "^1.0.3",
"uuid-1345": "^0.99.6",
"yargs": "^6.5.0",
"electron-builder-http": "1.0.0"
},
"devDependencies": {
"@develar/semantic-release": "^6.3.26",
"@types/electron": "^1.4.30",
"@types/ini": "^1.3.29",
"@types/jest": "^16.0.2",
"@types/js-yaml": "^3.5.29",
"@types/source-map-support": "^0.2.28",
"babel-plugin-array-includes": "^2.0.3",
"babel-plugin-transform-async-to-module-method": "^6.16.0",
"babel-plugin-transform-es2015-destructuring": "^6.19.0",
Expand All @@ -112,6 +66,7 @@
"babel-plugin-transform-inline-imports-commonjs": "^1.2.0",
"decompress-zip": "^0.3.0",
"depcheck": "^0.6.7",
"electron-download-tf": "3.1.0",
"jest-cli": "^18.0.0",
"jest-environment-node-debug": "^0.0.2",
"lerna": "2.0.0-beta.31",
Expand All @@ -131,8 +86,8 @@
],
"testRegex": "\\.js$",
"modulePaths": [
"<rootDir>",
"<rootDir>/packages"
"<rootDir>/packages",
"<rootDir>/packages/electron-builder/node_modules"
],
"setupTestFrameworkScriptFile": "<rootDir>/test/jestSetup.js"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/electron-auto-updater/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@
"source-map-support": "^0.4.8",
"electron-builder-http": "1.0.0"
},
"devDependencies": {
"@types/electron": "^1.4.30",
"@types/js-yaml": "^3.5.29"
},
"typings": "./out/electron-auto-updater.d.ts"
}
4 changes: 2 additions & 2 deletions packages/electron-auto-updater/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"files": [
"../../typings/semver.d.ts",
"../../typings/debug.d.ts",
"../../node_modules/@types/node/index.d.ts",
"../../node_modules/fs-extra-p/index.d.ts",
"../../node_modules/bluebird-lst-c/index.d.ts",
"../electron-builder-http/out/electron-builder-http.d.ts"
],
"include": [
"src/**/*.ts"
"src/**/*.ts",
"node_modules/@types/*/*.d.ts"
]
}
3 changes: 3 additions & 0 deletions packages/electron-builder-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
],
"dependencies": {
},
"devDependencies": {
"@types/node": "^6.0.55"
},
"typings": "./out/electron-builder-http.d.ts"
}
2 changes: 1 addition & 1 deletion packages/electron-builder-http/src/httpExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class HttpExecutorHolder {

get httpExecutor(): HttpExecutor {
if (this._httpExecutor == null) {
this._httpExecutor = new (require((<any>global).__test_app == null ? "./nodeHttpExecutor" : "out/util/nodeHttpExecutor").NodeHttpExecutor)()
this._httpExecutor = new (require((<any>global).__test_app == null ? "./nodeHttpExecutor" : "electron-builder/out/util/nodeHttpExecutor").NodeHttpExecutor)()
}
return this._httpExecutor
}
Expand Down
3 changes: 2 additions & 1 deletion packages/electron-builder-http/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"electron-builder-http": "out/electron-builder-http.d.ts"
},
"include": [
"src/**/*.ts"
"src/**/*.ts",
"node_modules/@types/*/*.d.ts"
]
}
7 changes: 7 additions & 0 deletions packages/electron-builder-http/yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"@types/node@^6.0.55":
version "6.0.55"
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.55.tgz#e5cb679a43561f42afd1bd6d58d3992ec8f31720"
96 changes: 96 additions & 0 deletions packages/electron-builder/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"name": "electron-builder",
"description": "A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box",
"version": "0.0.0-semantic-release",
"main": "out/index.js",
"files": [
"out",
"templates",
"certs/root_certs.keychain"
],
"bin": {
"build": "./out/cli/build-cli.js",
"install-app-deps": "./out/cli/install-app-deps.js",
"node-gyp-rebuild": "./out/cli/node-gyp-rebuild.js"
},
"repository": "electron-userland/electron-builder",
"engines": {
"node": ">=0.4.0"
},
"keywords": [
"electron",
"builder",
"build",
"installer",
"install",
"packager",
"pack",
"nsis",
"app",
"dmg",
"msi",
"exe",
"setup",
"Windows",
"OS X",
"MacOS",
"Mac",
"appx"
],
"author": "Stefan Judis",
"license": "MIT",
"bugs": "https://github.com/electron-userland/electron-builder/issues",
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"7zip-bin": "^2.0.4",
"ansi-escapes": "^1.4.0",
"archiver": "^1.3.0",
"asar-electron-builder": "^0.13.5",
"bluebird-lst-c": "^1.0.5",
"chalk": "^1.1.3",
"chromium-pickle-js": "^0.2.0",
"cli-cursor": "^1.0.2",
"cuint": "^0.2.2",
"debug": "2.5.2",
"electron-download-tf": "3.1.0",
"electron-macos-sign": "~1.4.0",
"fs-extra-p": "^3.0.3",
"hosted-git-info": "^2.1.5",
"ini": "^1.3.4",
"interactive": "^0.1.9",
"is-ci": "^1.0.10",
"isbinaryfile": "^3.0.1",
"js-yaml": "^3.7.0",
"lodash.template": "^4.4.0",
"mime": "^1.3.4",
"minimatch": "^3.0.3",
"node-emoji": "^1.4.3",
"normalize-package-data": "^2.3.5",
"parse-color": "^1.0.0",
"plist": "^2.0.1",
"pretty-ms": "^2.1.0",
"progress": "^1.1.8",
"progress-stream": "^1.2.0",
"read-installed": "^4.0.3",
"sanitize-filename": "^1.6.1",
"semver": "^5.3.0",
"source-map-support": "^0.4.8",
"stat-mode": "^0.2.2",
"tunnel-agent": "^0.4.3",
"update-notifier": "^1.0.3",
"uuid-1345": "^0.99.6",
"yargs": "^6.5.0",
"electron-builder-http": "1.0.0"
},
"devDependencies": {
"@types/node": "^6.0.55",
"@types/ini": "^1.3.29",
"@types/jest": "^16.0.2",
"@types/js-yaml": "^3.5.29",
"@types/source-map-support": "^0.2.28"
},
"typings": "./out/electron-builder.d.ts",
"publishConfig": {
"tag": "next"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 5 additions & 9 deletions tsconfig.json → packages/electron-builder/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
"skipLibCheck": true
},
"declaration": {
"electron-builder": "out/electron-builder.d.ts",
"": "test/typings/electron-builder.d.ts"
"electron-builder": "out/electron-builder.d.ts"
},
"docs": "docs/Options.md",
"docs": "../../docs/Options.md",
"paths": {
"fs-extra-p": [
"node_modules/fs-extra-p/index.d.ts"
Expand All @@ -30,15 +29,12 @@
"node_modules/bluebird-lst-c/index.d.ts",
"node_modules/7zip-bin/index.d.ts",
"node_modules/electron-macos-sign/index.d.ts",
"packages/electron-builder-http/out/electron-builder-http.d.ts"
"../electron-builder-http/out/electron-builder-http.d.ts"
],
"include": [
"src/**/*.ts",
"typings/*.d.ts",
"node_modules/@types/ini/*.d.ts",
"node_modules/@types/js-yaml/*.d.ts",
"node_modules/@types/node/*.d.ts",
"node_modules/@types/source-map-support/*.d.ts"
"../../typings/*.d.ts",
"node_modules/@types/*/*.d.ts"
],
"exclude": [
]
Expand Down
5 changes: 4 additions & 1 deletion test/lint.js → packages/lint.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict"

const Linter = require("tslint").Linter
const fs = require("fs")
const path = require("path")

const configuration = {
Expand Down Expand Up @@ -68,7 +69,9 @@ const options = {
}

let hasErrors = false
for (const projectDir of [path.join(__dirname, ".."), path.join(__dirname, "..", "packages", "electron-auto-updater"), __dirname]) {
const packages = fs.readdirSync(__dirname).filter(it => !it.includes(".")).sort().map(it => path.join(__dirname, it))
for (const projectDir of packages) {
console.log(`Linting ${path.basename(projectDir)}`)
const program = Linter.createProgram("tsconfig.json", projectDir)
for (const file of Linter.getFileNames(program)) {
const fileContents = program.getSourceFile(file).getFullText()
Expand Down
3 changes: 0 additions & 3 deletions templates/appx/assets/SampleAppx.150x150.png

This file was deleted.

3 changes: 0 additions & 3 deletions templates/appx/assets/SampleAppx.310x150.png

This file was deleted.

3 changes: 0 additions & 3 deletions templates/appx/assets/SampleAppx.44x44.png

This file was deleted.

3 changes: 0 additions & 3 deletions templates/appx/assets/SampleAppx.50x50.png

This file was deleted.

3 changes: 0 additions & 3 deletions templates/install-spinner.gif

This file was deleted.

6 changes: 3 additions & 3 deletions test/src/ArtifactPublisherTest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GitHubPublisher } from "out/publish/gitHubPublisher"
import { GitHubPublisher } from "electron-builder/out/publish/gitHubPublisher"
import { join } from "path"
import { BintrayPublisher } from "out/publish/BintrayPublisher"
import { createPublisher } from "out/builder"
import { BintrayPublisher } from "electron-builder/out/publish/BintrayPublisher"
import { createPublisher } from "electron-builder/out/builder"
import isCi from "is-ci"
import { HttpError } from "electron-builder-http/out/httpExecutor"

Expand Down
8 changes: 4 additions & 4 deletions test/src/BuildTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import { move, outputJson } from "fs-extra-p"
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"
import { assertThat } from "./helpers/fileAssert"
import { BuildOptions, Platform, PackagerOptions, DIR_TARGET, Arch } from "out"
import { normalizeOptions, build } from "out/builder"
import { createYargs } from "out/cli/cliOptions"
import { BuildOptions, Platform, PackagerOptions, DIR_TARGET, Arch } from "electron-builder"
import { normalizeOptions, build } from "electron-builder/out/builder"
import { createYargs } from "electron-builder/out/cli/cliOptions"
import { extractFile } from "asar-electron-builder"
import { ELECTRON_VERSION } from "./helpers/config"
import isCi from "is-ci"
import { checkWineVersion } from "out/packager"
import { checkWineVersion } from "electron-builder/out/packager"

test("cli", async () => {
const yargs = createYargs()
Expand Down
2 changes: 1 addition & 1 deletion test/src/RepoSlugTest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getRepositoryInfo } from "out/repositoryInfo"
import { getRepositoryInfo } from "electron-builder/out/repositoryInfo"

test("repo slug from TRAVIS_REPO_SLUG", async () => {
const oldValue = process.env.TRAVIS_REPO_SLUG
Expand Down
2 changes: 1 addition & 1 deletion test/src/extraMetadataTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { modifyPackageJson, appTwoThrows, app, appTwo } from "./helpers/packTester"
import { Platform, DIR_TARGET } from "out"
import { Platform, DIR_TARGET } from "electron-builder"
import { assertThat } from "./helpers/fileAssert"
import * as path from "path"
import { extractFile } from "asar-electron-builder"
Expand Down
6 changes: 3 additions & 3 deletions test/src/filesTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { assertPack, modifyPackageJson, getPossiblePlatforms, app } from "./help
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"
import { assertThat } from "./helpers/fileAssert"
import { Platform, DIR_TARGET } from "out"
import { Platform, DIR_TARGET } from "electron-builder"
import pathSorter from "path-sort"
import Mode from "stat-mode"
import { Permissions } from "stat-mode"
import { TmpDir } from "out/util/tmp"
import { copyDir } from "out/util/fs"
import { TmpDir } from "electron-builder/out/util/tmp"
import { copyDir } from "electron-builder/out/util/fs"

test.ifDevOrLinuxCi("files", app({
targets: Platform.LINUX.createTarget(DIR_TARGET),
Expand Down
2 changes: 1 addition & 1 deletion test/src/globTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { assertPack, modifyPackageJson, app } from "./helpers/packTester"
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"
import { assertThat } from "./helpers/fileAssert"
import { Platform, DIR_TARGET } from "out"
import { Platform, DIR_TARGET } from "electron-builder"
import { statFile } from "asar-electron-builder"

test.ifDevOrLinuxCi("unpackDir one", app({
Expand Down
2 changes: 1 addition & 1 deletion test/src/helpers/fileAssert.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { stat, Stats } from "fs-extra-p"
import * as path from "path"
import { exists } from "out/util/fs"
import { exists } from "electron-builder/out/util/fs"

// http://joel-costigliola.github.io/assertj/
export function assertThat(actual: any): Assertions {
Expand Down
Loading

0 comments on commit ee20136

Please sign in to comment.