From 1c039592cea2f5d0a2b69a5acf3531e4fb490af2 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 30 Apr 2019 09:44:46 +0200 Subject: [PATCH] fix(core): update --- .gitignore | 3 ++- package.json | 4 ++-- readme.md | 8 ++++++++ rollup.config.js | 25 +++++++++++++------------ ts_web/index.ts | 3 +++ 5 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 ts_web/index.ts diff --git a/.gitignore b/.gitignore index e713ab4..ee945c7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ dist_web/ dist_serve/ dist_ts_web/ -# custom \ No newline at end of file +# custom +.rpt2_cache \ No newline at end of file diff --git a/package.json b/package.json index 12c546b..406018d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "author": "Lossless GmbH", "license": "MIT", "scripts": { - "test": "(tstest test/)", + "test": "(tstest test/) && rollup -c rollup.config.js", "build": "(tsbuild)", "format": "(gitzone format)" }, @@ -32,4 +32,4 @@ "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-typescript2": "^0.20.1" } -} +} \ No newline at end of file diff --git a/readme.md b/readme.md index 9120f53..cb6bdcb 100644 --- a/readme.md +++ b/readme.md @@ -17,10 +17,18 @@ a bundler using rollup for painless bundling of web projects [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/) ## Usage + Use TypeScript for best in class intellisense. tsbundle will bundle modern JavaScript websites in an Google Bot conformant way so things like AdSense do work. +> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) +> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) + +[![repo-footer](https://gitzone.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com) + +For further information read the linked docs at the top of this readme. + > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) diff --git a/rollup.config.js b/rollup.config.js index e642a88..308c2eb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,22 +1,23 @@ -import resolve from 'rollup-plugin-node-resolve' -import commonjs from 'rollup-plugin-commonjs' -import sourceMaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' -import json from 'rollup-plugin-json' +import resolve from 'rollup-plugin-node-resolve'; +import commonjs from 'rollup-plugin-commonjs'; +import sourceMaps from 'rollup-plugin-sourcemaps'; +import typescript from 'rollup-plugin-typescript2'; +import json from 'rollup-plugin-json'; +import babel from 'rollup-plugin-babel'; -const pkg = require('./package.json') +const pkg = require('./package.json'); export default { input: `ts_web/index.ts`, output: { - file: 'dist/bundle.js', + file: 'dist/bundle.js', format: 'es', - sourcemap: true - }, + sourcemap: true + }, // Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash') external: [], watch: { - include: 'src/**', + include: 'src/**' }, plugins: [ // Allow json resolution @@ -33,5 +34,5 @@ export default { // Resolve source maps to the original source sourceMaps(), babel() - ], -} + ] +}; diff --git a/ts_web/index.ts b/ts_web/index.ts new file mode 100644 index 0000000..f4c21c9 --- /dev/null +++ b/ts_web/index.ts @@ -0,0 +1,3 @@ +const myConst = 'hello'; + +console.log(myConst);