Skip to content

Commit

Permalink
chore(hadron-build): remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemy committed Jul 10, 2024
1 parent 7d6fcd6 commit ab470db
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 267 deletions.
10 changes: 0 additions & 10 deletions packages/hadron-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ npm install --save-dev hadron-build;

### `hadron-build info`

### `hadron-build develop`

### `hadron-build clean`

### `hadron-build release`

### `hadron-build upload`
Expand All @@ -33,12 +29,9 @@ hadron-build <command> [options]

Commands:
release :shipit:
clean Remove generated directories.
config Configuration.
develop [options] Run the app in development mode.
test [options] Run app tests.
upload [options] Upload assets from `release`.
ui [options] Compile the app UI.
verify [options] Verify the current environment meets the app\'s requirements.

Options:
Expand Down Expand Up @@ -74,12 +67,9 @@ Options:
"scripts": {
"check": "hadron-build check",
"test-check-ci": "npm run test",
"clean": "hadron-build clean",
"compile-ui": "hadron-build ui",
"fmt": "hadron-build fmt",
"postuninstall": "hadron-build clean",
"release": "hadron-build release",
"start": "hadron-build develop",
}
}
```
Expand Down
3 changes: 0 additions & 3 deletions packages/hadron-build/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ const yargs = require('yargs')
.wrap(120)
.usage('$0 <command> [options]')
.command(require('./commands/release'))
.command(require('./commands/clean'))
.command(require('./commands/info'))
.command(require('./commands/develop'))
.command(require('./commands/upload'))
.command(require('./commands/download'))
.command(require('./commands/ui'))
.command(require('./commands/verify'))
.demand(1, 'Please specify a command.')
.strict()
Expand Down
27 changes: 0 additions & 27 deletions packages/hadron-build/commands/clean.js

This file was deleted.

77 changes: 0 additions & 77 deletions packages/hadron-build/commands/develop.js

This file was deleted.

3 changes: 1 addition & 2 deletions packages/hadron-build/commands/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const run = require('./../lib/run');
const rebuild = require('@electron/rebuild').rebuild;
const { signArchive } = require('./../lib/signtool');

const ui = require('./ui');
const verify = require('./verify');

exports.command = 'release';
Expand Down Expand Up @@ -496,7 +495,7 @@ exports.builder = {
}
};

_.assign(exports.builder, ui.builder, verify.builder);
_.assign(exports.builder, verify.builder);


/**
Expand Down
96 changes: 0 additions & 96 deletions packages/hadron-build/commands/ui.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/hadron-build/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
'use strict';
exports = function() {};

exports.clean = require('./commands/clean');
exports.develop = require('./commands/develop');
exports.release = require('./commands/release');
exports.ui = require('./commands/ui');
exports.upload = require('./commands/upload');
exports.download = require('./commands/download');
exports.verify = require('./commands/verify');
Expand Down
1 change: 0 additions & 1 deletion packages/hadron-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@npmcli/arborist": "^6.2.0",
"@octokit/rest": "^18.6.2",
"asar": "^3.0.3",
"async": "^3.2.2",
"bluebird": "^3.7.2",
"chalk": "^4.1.2",
"cli-table": "^0.3.1",
Expand Down
4 changes: 0 additions & 4 deletions packages/hadron-build/test/fixtures/hadron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,8 @@
}
},
"scripts": {
"start": "hadron-build develop",
"prepublish": "hadron-build release",
"postuninstall": "hadron-build clean",
"test-check-ci": "npm run test",
"clean": "hadron-build clean",
"compile-ui": "hadron-build ui",
"release": "hadron-build release",
"upload": "hadron-build upload"
},
Expand Down
44 changes: 0 additions & 44 deletions packages/hadron-build/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,7 @@ describe('hadron-build', () => {
expect(hadronBuild).to.be.a('function');
});

describe('::clean', () => {
it('should include options from commands::ui', () => {
expect(commands.clean.builder).to.have.property('less_cache');
});
});

describe('::develop', () => {
it('should include options from commands::ui', () => {
expect(commands.develop.builder).to.have.property('less_cache');
});

it('should include tasks from commands::ui');

it('should include options from commands::verify', () => {
expect(commands.develop.builder).to.have.property('nodejs_version');
expect(commands.develop.builder).to.have.property('npm_version');
});

it('should include tasks from commands::verify');


describe('::handler', () => {
it('should set `NODE_ENV` to development');
it('should set `DEVTOOLS` to `1` when --devtools is specified');
it('should spawn electron-prebuilt');
});
});

describe('::release', () => {
it('should include options from commands::ui', () => {
expect(commands.release.builder).to.have.property('less_cache');
});

it('should include options from commands::verify', () => {
expect(commands.release.builder).to.have.property('nodejs_version');
expect(commands.release.builder).to.have.property('npm_version');
Expand Down Expand Up @@ -116,18 +84,6 @@ describe('hadron-build', () => {
it('should spawn electron-mocha');
});
});
describe('::upload', () => {

});
describe('::ui', () => {
it('should include a `less_cache` option', () => {
expect(commands.ui.builder).to.have.property('less_cache');
});

it('should default `less_cache` to `src/app/less-cache`');

it('should generate the less cache');
});

describe('::verify', () => {
it('should have a `nodejs_version` option', () => {
Expand Down

0 comments on commit ab470db

Please sign in to comment.