Skip to content

Commit

Permalink
fix release step
Browse files Browse the repository at this point in the history
  • Loading branch information
ukyo committed Mar 29, 2018
1 parent edfe705 commit b7e3ef8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
dist-npm
dist-release
dist/test*.js
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,12 @@ Write central directory headers and the end central dirctory header.
writer.writeEnd();
```

## ES2015 Modules
## Import subdirectries

You can import modules separately.
You can import modules from subdirectries.

```js
import {deflate} from "jsziptools/core";
import { deflate } from "jsziptools/core";
import * as zip from "jsziptools/zip";

deflate(...);
Expand Down
142 changes: 0 additions & 142 deletions dist/jsziptools.min.js

This file was deleted.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"name": "jsziptools",
"version": "3.0.0-rc2",
"version": "3.0.0-rc3",
"description": "It's a utility of zlib, gzip and zip format binary data.",
"main": "./dist-npm/index.js",
"types": "./dist-npm/index.d.ts",
"main": "./jsziptools.min.js",
"types": "./index.d.ts",
"directories": {
"example": "examples",
"test": "test"
},
"scripts": {
"test": "testem",
"build:browser": "webpack --mode production",
"build:npm": "mkdir -p dist-npm && tsc -d --outDir dist-npm",
"build:npm": "tsc -d --outDir dist-release",
"build:test": "webpack --mode production --config webpack.config.test.js",
"release": "npm run build:test && npm test -- ci && npm run build:browser && npm run build:npm",
"prepublish": "npm run release"
"release": "npm run build:test && npm test -- ci && npm run build:browser && npm run build:npm"
},
"repository": {
"type": "git",
Expand Down
9 changes: 9 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

rm -rf dist-release
npm run release
cp package.json dist-release/package.json
cp README.md dist-release/README.md
cp LICENSE dist-release/LICENSE
cd dist-release
npm publish
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const LicenseInfoWebpackPlugin = require('license-info-webpack-plugin').default;
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const path = require('path');

module.exports = {
entry: './src/browser.ts',
output: {
path: path.resolve(__dirname, 'dist-release'),
filename: 'jsziptools.min.js',
},
module: {
Expand Down

0 comments on commit b7e3ef8

Please sign in to comment.