From 3f2a33e20b3fe832f664db512e08dbca0085166e Mon Sep 17 00:00:00 2001 From: Patrick Michalina Date: Thu, 4 Oct 2018 21:22:16 -0500 Subject: [PATCH] feat: library now publishes to UMD format --- .gitignore | 3 ++- circle.yml | 3 --- package-lock.json | 16 ++++++++++++++++ package.json | 7 ++++--- tsconfig.json | 5 +++-- tsconfig.system.json | 33 --------------------------------- 6 files changed, 25 insertions(+), 42 deletions(-) delete mode 100644 tsconfig.system.json diff --git a/.gitignore b/.gitignore index f0e185a..2a79a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -139,4 +139,5 @@ fabric.properties # *.ipr # Sonarlint plugin -.idea/sonarlint \ No newline at end of file +.idea/sonarlint +.tmp \ No newline at end of file diff --git a/circle.yml b/circle.yml index 469f595..fc7c2d9 100644 --- a/circle.yml +++ b/circle.yml @@ -47,9 +47,6 @@ jobs: - run: name: Build command: npm run build - - run: - name: Build.System - command: npm run build.system - run: name: Semantic Release command: node_modules/.bin/semantic-release diff --git a/package-lock.json b/package-lock.json index cdaffb0..503dd09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -299,6 +299,12 @@ } } }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, "@types/jest": { "version": "23.3.3", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.3.tgz", @@ -9315,6 +9321,16 @@ "glob": "^7.0.5" } }, + "rollup": { + "version": "0.66.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.66.4.tgz", + "integrity": "sha512-oV6dzR2zDYVOMUmrM1XMTW0NlZqKeZANAWH+A7BwCfE+mAfJ6xRkYbrM3qAossgyMxPN9aFBu8kRXf5HYB5gvw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "@types/node": "*" + } + }, "rsvp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", diff --git a/package.json b/package.json index 4ba0e1d..964f515 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,10 @@ "scripts": { "test": "jest", "test.watch": "jest --watch", - "build": "tsc", - "build.system": "tsc -p tsconfig.system.json && uglifyjs dist/packages/system/index.js -o dist/packages/system/index.min.js --source-map", + "build": "tsc && npm run rollup && uglifyjs dist/index.js -o dist/index.min.js --source-map", "dist": "ts-node ./scripts/publish-prep.ts", - "lint": "tslint --project tsconfig.json --config tslint.json" + "lint": "tslint --project tsconfig.json --config tslint.json", + "rollup": "rollup dist/index.js --file dist/index.js -m --format umd --name \"typescript-monads\"" }, "release": { "pkgRoot": "dist" @@ -35,6 +35,7 @@ "codecov": "^3.1.0", "jest": "23.6.0", "jest-junit": "^5.2.0", + "rollup": "^0.66.4", "semantic-release": "^15.9.17", "ts-jest": "23.10.3", "ts-node": "^7.0.1", diff --git a/tsconfig.json b/tsconfig.json index a14e13d..6649879 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es5", - "module": "commonjs", + "module": "es2015", "moduleResolution": "node", "lib": ["es2015", "dom"], "outDir": "dist", @@ -21,7 +21,8 @@ "strictNullChecks": true, "strictFunctionTypes": true, "forceConsistentCasingInFileNames": true, - "declaration": true + "declaration": true, + "sourceMap": true }, "include": [ "src/**/*.ts" diff --git a/tsconfig.system.json b/tsconfig.system.json deleted file mode 100644 index 1a47fba..0000000 --- a/tsconfig.system.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "system", - "moduleResolution": "node", - "lib": ["es2015", "dom"], - "isolatedModules": false, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "noImplicitAny": true, - "noImplicitUseStrict": false, - "noEmitHelpers": false, - "noLib": false, - "noUnusedLocals": true, - "noEmitOnError": true, - "allowSyntheticDefaultImports": false, - "skipLibCheck": true, - "skipDefaultLibCheck": true, - "strict": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "outFile": "dist/packages/system/index.js", - "sourceMap": true - }, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "src/interfaces/**" - ] -} \ No newline at end of file