Skip to content

Commit

Permalink
Fix packaging issues
Browse files Browse the repository at this point in the history
  • Loading branch information
stylemistake committed Jul 23, 2021
1 parent 5799e6a commit 5f29e7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 38 deletions.
18 changes: 0 additions & 18 deletions .yarn/juke/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [0.6.1] - 2021-07-23
## [0.6.2] - 2021-07-23

> Re-released due to issues with packaging. Updated local juke build binary and removed unnecessary console logs.
Expand Down
21 changes: 2 additions & 19 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createRequire } from 'module';
import fs from 'fs';

const require = createRequire(import.meta.url);
const Juke = require('./dist/index.cjs');
const Juke = require('./.yarn/juke/index.cjs');

process.chdir(new URL('.', import.meta.url).pathname);

Expand Down Expand Up @@ -59,30 +59,13 @@ export const TscTarget = Juke.createTarget({
executes: () => yarn('tsc'),
});

export const PackageJsonTarget = Juke.createTarget({
executes: async () => {
const pkg = require('./package.json');
delete pkg.scripts;
delete pkg.devDependencies;
delete pkg.files;
delete pkg.packageManager;
pkg.types = pkg.types.replace('dist/', '');
pkg.main = pkg.main.replace('dist/', '');
try {
fs.mkdirSync('dist');
}
catch {}
fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, 2) + '\n');
},
});

export const UpdateLocalParameter = Juke.createParameter({
type: 'boolean',
alias: 'u',
});

export const BuildTarget = Juke.createTarget({
dependsOn: [TscTarget, DtsTarget, BundleTarget, PackageJsonTarget],
dependsOn: [TscTarget, DtsTarget, BundleTarget],
executes: async ({ get }) => {
if (get(UpdateLocalParameter)) {
Juke.logger.info('Updating local Juke version');
Expand Down

0 comments on commit 5f29e7f

Please sign in to comment.