Skip to content

Commit

Permalink
fix: typescript support in new roll.config.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
uxder committed May 18, 2021
1 parent 805ee3d commit a7806c6
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
22 changes: 19 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@amagaki/amagaki": "^0.4.0",
"@blinkk/degu": "0.0.346",
"@blinkk/degu": "0.0.347",
"browser-sync": "^2.26.13",
"concurrently": "^5.3.0",
"glob": "^7.1.6",
Expand All @@ -38,6 +38,7 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-typescript": "^8.2.1",
"npm-run-all": "^4.1.5",
"rollup": "^2.48.0",
"rollup-plugin-browsersync": "^1.3.1",
Expand Down
3 changes: 3 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import notify from 'rollup-plugin-notify';
import typescript from '@rollup/plugin-typescript';



// Production state is based on whether we are watching for changes or not.
Expand All @@ -16,6 +18,7 @@ export default [
plugins: [
notify(),
resolve(),
typescript(),
commonjs(),
production && terser()
]
Expand Down
14 changes: 14 additions & 0 deletions src/ts/main.ts
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
import * as dom from '@blinkk/degu/lib/dom/dom';
import * as is from '@blinkk/degu/lib/is/is';

console.log('Add JS here');

class App {
public test() {
if (is.mobile()) {
dom.event(document.documentElement, 'test', {});
}
}
}

const app = new App();
app.test();

0 comments on commit a7806c6

Please sign in to comment.