Skip to content

Commit

Permalink
v5 prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
eavichay committed Jun 21, 2021
1 parent 9777e71 commit 0ed723a
Show file tree
Hide file tree
Showing 32 changed files with 974 additions and 922 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.17.0
1 change: 1 addition & 0 deletions babel.config.js → babel.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// babel.config.js
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
'@babel/preset-typescript',
],
};
10 changes: 5 additions & 5 deletions benchmarks/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Slim } from '../dist/index.js';
import '../src/repeat.directive.js';
import '../src/attribute.directive.js';
import '../src/event.directive.js';
import { Slim } from '../src/index.js';
import '../src/directives/repeat.directive.js';
import '../src/directives/attribute.directive.js';
import '../src/directives/event.directive.js';

function _random(max) {
return Math.round(Math.random()*1000)%max;
Expand Down Expand Up @@ -137,7 +137,7 @@ const store = {
},
};

class MainApp extends Slim.Component {
class MainApp extends Slim {
items = [];
selected = null;
test = [1, 2, 3, 4, 5];
Expand Down
20 changes: 15 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
export default {
testPathIgnorePatterns: ['/old-src/'],
testURL: 'http://localhost/',
testEnvironment: 'jsdom'
}
import('jsdom');
import 'jsdom-global/register.js';

export default async () => {
const SlimModule = await import('./dist/index.js');
global.Slim = SlimModule.Slim;
return {
testPathIgnorePatterns: ['/old-src/'],
testURL: 'http://localhost/',
testEnvironment: 'jsdom',
globals: {
window: {},
},
};
};
Loading

0 comments on commit 0ed723a

Please sign in to comment.