Skip to content

Commit

Permalink
rollup fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stvno committed Mar 27, 2018
1 parent 113e35c commit 015bff4
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 209 deletions.
23 changes: 23 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"browser": true,
"es6": true
},
"globals": {
"ENV": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"linebreak-style": "off",
"comma-dangle": "off",
"max-len": ["error", { "code": 160 }],
"no-else-return": "off",
"eqeqeq": ["error", "always", { "null": "ignore" }],
"arrow-body-style": "off",
"no-plusplus": "off",
"no-undef": "off"
}
}
3 changes: 3 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"esversion": 6
}
148 changes: 0 additions & 148 deletions packages/nlmaps-googlemaps/build/browser-test.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/nlmaps-googlemaps/build/test.html

This file was deleted.

1 change: 0 additions & 1 deletion packages/nlmaps-leaflet/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"eqeqeq": ["error", "always", { "null": "ignore" }],
"arrow-body-style": "off", // ["error", "as-needed"],
"no-plusplus": "off",
"no-else-return": "off",
"no-undef": "off" // is set to off as old-school non-es6 module imports are frequently used.
}
}
13 changes: 0 additions & 13 deletions packages/nlmaps-leaflet/build/test.html

This file was deleted.

7 changes: 2 additions & 5 deletions packages/nlmaps-leaflet/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ export default config => {
main: true,
browser: true
}),
eslint({
exclude: [
'../../../node_modules/**'
],
eslint({
include: [
'../../lib/**'
'../lib/**'
]
}),
babel({
Expand Down
4 changes: 2 additions & 2 deletions packages/nlmaps-leaflet/config/rollup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default {
browser: true
}),
eslint({
exclude: [
'../../../node_modules/**'
include: [
'../../lib/**'
]
}),
babel({
Expand Down
2 changes: 1 addition & 1 deletion packages/nlmaps-leaflet/test/browser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('nlmaps can create a layer object', function(t) {
t.end();
})

test('geolocator', function(t) {
test('geolocator', function() {
resetMapDiv('map');
let map = L.map('map').setView([52, 5], 10);
let layer = bgLayer('pastel');
Expand Down
5 changes: 2 additions & 3 deletions packages/nlmaps-openlayers/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
"max-len": ["error", { "code": 160 }],
"no-else-return": "off",
"eqeqeq": ["error", "always", { "null": "ignore" }],
"arrow-body-style": "off", // ["error", "as-needed"],
"arrow-body-style": "off",
"no-plusplus": "off",
"no-else-return": "off",
"no-undef": "off" // is set to off as old-school non-es6 module imports are frequently used.
"no-undef": "off"
}
}
3 changes: 1 addition & 2 deletions packages/nlmaps-openlayers/test/browser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default function browserTest(){
map.addLayer(layer);
let geolocator = geoLocator();
let control = bgLayer.geoLocatorControl(geolocator, map)
map.addControl(control)
console.log(control)
map.addControl(control)

}
6 changes: 4 additions & 2 deletions packages/nlmaps/config/rollup.cjs.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import config from './rollup.config';

export default config({
format: 'cjs',
dest: 'build/nlmaps.cjs.js',
output: {
format: 'cjs',
file: 'build/nlmaps.cjs.js',
},
browser: false,
external: [
'nlmaps-googlemaps',
Expand Down
10 changes: 6 additions & 4 deletions packages/nlmaps/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ export default config => {
return {
input: 'src/index.js',
output: {
file: config.dest,
format: config.format,
name: config.format === 'iife' ? 'window' : 'nlmaps',
file: config.output.file,
format: config.output.format,
name: config.output.format === 'iife' ? 'window' : 'nlmaps',
extend: config.output.format === 'iife' ? true : false,
sourcemap:true
},
external: config.external,
extend: config.format === 'iife' ? true : false,

plugins: [
commonjs(),
resolve({
Expand Down
13 changes: 8 additions & 5 deletions packages/nlmaps/config/rollup.es.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import config from './rollup.config';

export default config({
format: 'es',
dest: 'build/nlmaps.es.js',
output: {
format: 'es',
file: 'build/nlmaps.es.js',
},
browser: false,
external: ['nlmaps-googlemaps',
'nlmaps-leaflet',
'nlmaps-openlayers'
external: [
'nlmaps-googlemaps',
'nlmaps-leaflet',
'nlmaps-openlayers'
]
})
6 changes: 4 additions & 2 deletions packages/nlmaps/config/rollup.iife.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import config from './rollup.config';

export default config({
format: 'iife',
dest: 'build/nlmaps.iife.js',
output: {
format: 'iife',
file: 'build/nlmaps.iife.js',
},
browser: true,
external: ''
})
10 changes: 6 additions & 4 deletions packages/nlmaps/config/rollup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';

export default {
entry: 'test/browser-test.js',
format: 'iife',
moduleName: 'testing',
dest: 'build/browser-test.js',
input: 'test/browser-test.js',
output: {
format: 'iife',
name: 'testing',
file: 'build/browser-test.js',
},
plugins: [
commonjs(),
globals(),
Expand Down

0 comments on commit 015bff4

Please sign in to comment.