Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Build multiple modules instead of one index.js #7

Merged
merged 3 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
tsconfigRootDir: __dirname,
project: ['./tsconfig.lint.json'],
},
ignorePatterns: ['.eslintrc.js', 'scripts/*'],
ignorePatterns: ['.eslintrc.js', 'scripts/*', 'tsdx.config.js'],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/no-mutable-exports': 0,
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ https://seesparkbox.com/foundry/semantic_commit_messages

## [Unreleased]

## [0.2.3] - 2021-2-1
### Added:
- chore: Separate build modules instead of index.js

Hence the following is possible:
```javascript
// to import promise module
import promise from 'utilzed/dist/promise'

// the caveat will be having the need to use dist/
```
## [0.2.2] - 2021-2-1
### Fixed:
- fix: Fix `package.json` dependencies
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ npm install utilzed

```shell
# set specific version
npm install utilzed@0.1.3
npm install utilzed@0.2.3
```

### Important for pure ES6

```javascript
// If uses require function you will need to use .default
// For import in typescript or flow, this is not required

const utilzed = require('utilzed').default;
```

## Library Functions:
Expand Down
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
echo "build multiple modules"
tsdx build \
--entry=src/index.ts \
--entry=src/promise.ts \
--entry=src/validation.ts \
--entry=src/timeconvert.ts \
&& node ./scripts/flowgen.js \
&& node ./scripts/indexify.js \
Loading