Skip to content

Commit

Permalink
chore: change build target to es5 and not adding support for browser …
Browse files Browse the repository at this point in the history
…modules for now
  • Loading branch information
tusharf5 committed May 9, 2020
1 parent 123a656 commit 14e6585
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## v2.0.0-beta.1
## v2.0.0

Migrating to this version might require a few of the users you to channge the way how they were importing the libray.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const createStore = require('runtime-memcache');
### Browser (use a script tag)

```html
<script src="https://unpkg.com/[email protected]-beta.1/dist/umd/index.js"></script>
<script src="https://unpkg.com/[email protected]/dist/umd/index.js"></script>
<script>
console.log(RMC());
const store = new RMStore();
</script>
```

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "runtime-memcache",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "A no dependency javascript runtime key-value cache store for small chunks of arbitrary data (strings, objects, numbers)",
"homepage": "https://github.com/tusharf5/runtime-memcache",
"main": "./dist/umd/index.js",
Expand All @@ -24,7 +24,7 @@
"lint": "eslint 'src/**/*.{ts}' 'tests/**/*.{ts}'",
"format": "npx prettier --write '**/*.{ts,js,json}'",
"build": "webpack --mode=production",
"prebuild": "rm -rf dist && tsc -p . && tsc -p tsconfig.cjs.json && rm -rf dist/tests && rm -rf dist/src",
"prebuild": "rm -rf dist && tsc -p . && rm -rf dist/tests && rm -rf dist/src",
"prepublish": "npm run build && npm run test"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const createStore = require('../dist/esm/index').default;
const createStore = require('../dist/umd/index');

jest.setTimeout(30000);

Expand Down
7 changes: 0 additions & 7 deletions tsconfig.cjs.json

This file was deleted.

4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"compilerOptions": {
"outDir": "./dist/esm/",
"sourceMap": true,
"module": "es6",
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"target": "es6",
"target": "es5",
"declaration": true,
"removeComments": false,
"noImplicitAny": true,
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ const path = require('path');

const umd = {
entry: {
index: path.resolve(__dirname, './dist/cjs/index.js'),
index: path.resolve(__dirname, './dist/esm/index.js'),
},
output: {
path: path.resolve(__dirname, './dist/umd'), // builds to ./dist/umd/
filename: '[name].js', // index.js
library: 'RMC', // aka window.RMC
library: 'RMStore', // aka window.RMStore
libraryTarget: 'umd', // supports commonjs, amd and web browsers
globalObject: 'this',
libraryExport: 'default',
Expand Down

0 comments on commit 14e6585

Please sign in to comment.