From 1cebe27dbee59a789891ac7831ba458a79b9be02 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 6 Jan 2018 11:39:46 -0500 Subject: [PATCH] remove rollup and just build for es --- package.json | 21 ++++++--------------- rollup.config.ts | 34 ---------------------------------- 2 files changed, 6 insertions(+), 49 deletions(-) delete mode 100644 rollup.config.ts diff --git a/package.json b/package.json index e3b42872..acf4010e 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,25 @@ { "name": "@bitwarden/jslib", - "version": "0.0.11", + "version": "0.0.12", "description": "Common code used across bitwarden JavaScript projects.", "keywords": [ "bitwarden" ], - "main": "dist/index.umd.js", - "module": "dist/index.es5.js", + "module": "dist/es/index.js", "typings": "dist/types/index.d.ts", "files": [ "dist" ], "license": "GPL-3.0", - "engines": { - "node": ">=6.0.0" - }, "scripts": { - "lint": "tslint 'src/**/*.ts'", "prebuild": "rimraf dist/**/*", - "build": "tsc && tsc --module commonjs --outDir dist/lib && rollup -c rollup.config.ts && typedoc --out dist/docs --target es6 --theme minimal --mode file src", - "start": "concurrently \"tsc -w\" \"rollup -c rollup.config.ts -w\"" + "build": "tsc && typedoc --out dist/docs --target es6 --theme minimal --mode file src", + "start": "tsc -watch", + "lint": "tslint src/**/*.ts || true", + "lint:fix": "tslint src/**/*.ts --fix" }, "devDependencies": { - "@types/node": "^8.0.0", - "concurrently": "^3.5.1", "rimraf": "^2.6.2", - "rollup": "^0.53.0", - "rollup-plugin-commonjs": "^8.2.6", - "rollup-plugin-node-resolve": "^3.0.0", - "rollup-plugin-sourcemaps": "^0.4.2", "tslint": "^5.8.0", "typedoc": "^0.9.0", "typescript": "^2.6.2" diff --git a/rollup.config.ts b/rollup.config.ts deleted file mode 100644 index 32b87a0a..00000000 --- a/rollup.config.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Based upon https://github.com/alexjoverm/typescript-library-starter/blob/master/rollup.config.ts - -import commonjs from 'rollup-plugin-commonjs'; -import resolve from 'rollup-plugin-node-resolve'; -import sourceMaps from 'rollup-plugin-sourcemaps'; - -const pkg = require('./package.json'); -const libraryName = 'index'; - -export default { - input: `dist/es/${libraryName}.js`, - output: [ - { file: pkg.main, name: libraryName, format: 'umd' }, - { file: pkg.module, format: 'es' }, - ], - sourcemap: true, - // Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash') - external: [], - watch: { - include: 'dist/es/**', - }, - plugins: [ - // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs) - commonjs(), - - // Allow node_modules resolution, so you can use 'external' to control - // which external modules to include in the bundle - // https://github.com/rollup/rollup-plugin-node-resolve#usage - resolve(), - - // Resolve source maps to the original source - sourceMaps(), - ], -};