Skip to content

Commit

Permalink
Apply Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmakes committed Jul 21, 2019
1 parent 39363ee commit d591819
Show file tree
Hide file tree
Showing 18 changed files with 5,652 additions and 5,661 deletions.
42 changes: 21 additions & 21 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": {
"version": 3
},
"targets": "last 2 versions"
}
]
],
"plugins": [
[
"@babel/plugin-transform-typescript",
{
"allowNamespaces": true
}
]
]
}
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": {
"version": 3
},
"targets": "last 2 versions"
}
]
],
"plugins": [
[
"@babel/plugin-transform-typescript",
{
"allowNamespaces": true
}
]
]
}
42 changes: 21 additions & 21 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"env": {
"es6": true,
"node": true,
"mocha": true,
"jasmine": true
},
"extends": "eslint:recommended",
"rules": {
"no-cond-assign": 2,
"no-console": 1,
"no-const-assign": 2,
"no-class-assign": 2,
"no-this-before-super": 2,
"no-unused-vars": 1,
"no-var": 2,
"object-shorthand": [2, "always"]
}
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"env": {
"es6": true,
"node": true,
"mocha": true,
"jasmine": true
},
"extends": "eslint:recommended",
"rules": {
"no-cond-assign": 2,
"no-console": 1,
"no-const-assign": 2,
"no-class-assign": 2,
"no-this-before-super": 2,
"no-unused-vars": 1,
"no-var": 2,
"object-shorthand": [2, "always"]
}
}
118 changes: 59 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,33 @@ Below is a well-founded recommendation using the [Bublé](https://buble.surge.sh
```js
// karma.conf.js
module.exports = function(config) {
config.set({
files: [
/**
* Make sure to disable Karma’s file watcher
* because the preprocessor will use its own.
*/
{ pattern: "test/**/*.spec.js", watched: false }
],

preprocessors: {
"test/**/*.spec.js": ["rollup"]
},

rollupPreprocessor: {
/**
* This is just a normal Rollup config object,
* except that `input` is handled for you.
*/
plugins: [require("rollup-plugin-buble")()],
output: {
format: "iife", // Helps prevent naming collisions.
name: "<your_project>", // Required for 'iife' format.
sourcemap: "inline" // Sensible for testing.
}
}
});
};
config.set({
files: [
/**
* Make sure to disable Karma’s file watcher
* because the preprocessor will use its own.
*/
{ pattern: 'test/**/*.spec.js', watched: false },
],

preprocessors: {
'test/**/*.spec.js': ['rollup'],
},

rollupPreprocessor: {
/**
* This is just a normal Rollup config object,
* except that `input` is handled for you.
*/
plugins: [require('rollup-plugin-buble')()],
output: {
format: 'iife', // Helps prevent naming collisions.
name: '<your_project>', // Required for 'iife' format.
sourcemap: 'inline', // Sensible for testing.
},
},
})
}
```

<br>
Expand All @@ -95,38 +95,38 @@ Below shows an example where [configured preprocessors](http://karma-runner.gith
```js
// karma.conf.js
module.exports = function(config) {
config.set({
files: [{ pattern: "test/**/*.spec.js", watched: false }],

preprocessors: {
"test/buble/**/*.spec.js": ["rollup"],
"test/babel/**/*.spec.js": ["rollupBabel"]
},

rollupPreprocessor: {
plugins: [require("rollup-plugin-buble")()],
output: {
format: "iife",
name: "<your_project>",
sourcemap: "inline"
}
},

customPreprocessors: {
/**
* Clones the base preprocessor, but overwrites
* its options with those defined below...
*/
rollupBabel: {
base: "rollup",
options: {
// In this case, to use a different transpiler:
plugins: [require("rollup-plugin-babel")()]
}
}
}
});
};
config.set({
files: [{ pattern: 'test/**/*.spec.js', watched: false }],

preprocessors: {
'test/buble/**/*.spec.js': ['rollup'],
'test/babel/**/*.spec.js': ['rollupBabel'],
},

rollupPreprocessor: {
plugins: [require('rollup-plugin-buble')()],
output: {
format: 'iife',
name: '<your_project>',
sourcemap: 'inline',
},
},

customPreprocessors: {
/**
* Clones the base preprocessor, but overwrites
* its options with those defined below...
*/
rollupBabel: {
base: 'rollup',
options: {
// In this case, to use a different transpiler:
plugins: [require('rollup-plugin-babel')()],
},
},
},
})
}
```

## Support
Expand Down
140 changes: 70 additions & 70 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
module.exports = function(config) {
config.set({
plugins: [
"karma-jasmine",
"karma-mocha-reporter",
"karma-chrome-launcher",
require("./lib")
],
config.set({
plugins: [
'karma-jasmine',
'karma-mocha-reporter',
'karma-chrome-launcher',
require('./lib'),
],

frameworks: ["jasmine"],
reporters: ["mocha"],
browsers: ["ChromeHeadless"],
frameworks: ['jasmine'],
reporters: ['mocha'],
browsers: ['ChromeHeadless'],

logLevel: config.LOG_INFO, // disable > error > warn > info > debug
captureTimeout: 60000,
autoWatch: true,
singleRun: true,
colors: true,
port: 9876,
logLevel: config.LOG_INFO, // disable > error > warn > info > debug
captureTimeout: 60000,
autoWatch: true,
singleRun: true,
colors: true,
port: 9876,

basePath: "",
files: [
{ pattern: "test/t1.js", watched: false },
{ pattern: "test/t2.js", watched: false },
{ pattern: "test/t3.js", watched: false },
{ pattern: "test/t4.ts", watched: false }
],
exclude: [],
basePath: '',
files: [
{ pattern: 'test/t1.js', watched: false },
{ pattern: 'test/t2.js', watched: false },
{ pattern: 'test/t3.js', watched: false },
{ pattern: 'test/t4.ts', watched: false },
],
exclude: [],

preprocessors: {
"test/t1.js": ["rollup"],
"test/t2.js": ["rollup"],
"test/t3.js": ["rollupNode"],
"test/t4.ts": ["rollupNodeTypescript"]
},
preprocessors: {
'test/t1.js': ['rollup'],
'test/t2.js': ['rollup'],
'test/t3.js': ['rollupNode'],
'test/t4.ts': ['rollupNodeTypescript'],
},

rollupPreprocessor: {
output: {
name: "lib",
format: "iife",
sourcemap: "inline"
},
plugins: [require("rollup-plugin-buble")()]
},
rollupPreprocessor: {
output: {
name: 'lib',
format: 'iife',
sourcemap: 'inline',
},
plugins: [require('rollup-plugin-buble')()],
},

customPreprocessors: {
rollupNode: {
base: "rollup",
options: {
plugins: [
require("rollup-plugin-node-resolve")(),
require("rollup-plugin-commonjs")(),
require("rollup-plugin-buble")()
]
}
},
rollupNodeTypescript: {
base: "rollup",
options: {
plugins: [
require("rollup-plugin-node-resolve")({
extensions: [".js", ".ts"]
}),
require("rollup-plugin-commonjs")({
include: "node_modules/**",
extensions: [".js", ".ts"]
}),
require("rollup-plugin-babel")({
exclude: "node_modules/**",
extensions: [".js", ".ts"]
})
]
}
}
}
});
};
customPreprocessors: {
rollupNode: {
base: 'rollup',
options: {
plugins: [
require('rollup-plugin-node-resolve')(),
require('rollup-plugin-commonjs')(),
require('rollup-plugin-buble')(),
],
},
},
rollupNodeTypescript: {
base: 'rollup',
options: {
plugins: [
require('rollup-plugin-node-resolve')({
extensions: ['.js', '.ts'],
}),
require('rollup-plugin-commonjs')({
include: 'node_modules/**',
extensions: ['.js', '.ts'],
}),
require('rollup-plugin-babel')({
exclude: 'node_modules/**',
extensions: ['.js', '.ts'],
}),
],
},
},
},
})
}
Loading

0 comments on commit d591819

Please sign in to comment.