Skip to content

Commit 182dfbe

Browse files
committed
Major updates, see changelog
1 parent d00887f commit 182dfbe

31 files changed

+2666
-10149
lines changed

.browserslistrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
> 1%
2-
last 2 versions
3-
not dead
1+
defaults
2+
not IE 11
3+
maintained node versions

.dcignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
test/
3+
public/
4+
dist/

.eslintrc.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
module.exports = {
22
root: true,
33
env: {
4+
browser: true,
45
node: true
56
},
6-
extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier', 'plugin:import/errors', 'plugin:import/warnings'],
7+
extends: [
8+
'plugin:vue/essential',
9+
'eslint:recommended',
10+
'@vue/prettier',
11+
'plugin:import/errors',
12+
'plugin:import/warnings'
13+
],
714
parserOptions: {
815
parser: 'babel-eslint'
916
},
1017
rules: {
1118
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
12-
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
19+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
20+
'import/no-unresolved': 'warn'
1321
},
1422
overrides: [
1523
{

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ npm-debug.log*
7171
pids
7272
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
7373
Temporary Items
74-
test/
7574
typings/
7675
yarn-debug.log*
7776
yarn-error.log*
77+
.dccache

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
## Unreleased
66

7-
- Incorporate ability to use Vue components as formatters
7+
- Major update!
8+
- Changed semantic versioning to match version of Grid.js on which it is built to work
9+
- Moved entirely to an ES6 module
10+
- Dropped npm dependencies in favor of unpkg so it can be used entirely on the frontend without bundlers
11+
- Removed inessential dependencies and lightened the weight of others
12+
- Simplified the testing procedure
813

914
## [0.4.1] - 2020-07-14
1015

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
123123
return {
124124
// REQUIRED:
125125
126-
// An array containing strings of column headers (`columns` in the Grid.js API)
126+
// An array containing strings of column headers
127+
// `columns` in the Grid.js API
127128
cols: ['col 1', 'col 2'],
128129
129130
// OR an array containing objects defining column headers
@@ -139,7 +140,8 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
139140
}
140141
],
141142
142-
// AND EITHER an array containing row data (`data` in the Grid.js API)
143+
// AND EITHER an array containing row data
144+
// `data` in the Grid.js API
143145
rows: [
144146
['row 1 col 1', 'row 1 col 2'],
145147
['row 2 col 1', 'row 2 col 2']
@@ -186,7 +188,8 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
186188
// Boolean to automatically set table width
187189
autoWidth: true / false,
188190
189-
// Object with CSS class names (`className` in the Grid.js API)
191+
// Object with CSS class names
192+
// `className` in the Grid.js API
190193
classNames: {},
191194
192195
// Localization dictionary object
@@ -201,7 +204,8 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
201204
// Boolean or sort settings object
202205
sort: true / false || {},
203206
204-
// Object with CSS styles (`style` in the Grid.js API)
207+
// Object with CSS styles
208+
// `style` in the Grid.js API
205209
styles: {},
206210
207211
// String with name of theme or 'none' to disable
@@ -241,9 +245,10 @@ this.cols = [
241245
name: 'Actions',
242246
formatter: (cell, row) => {
243247
return this.$gridjs.h('button', {
244-
className: 'py-2 mb-4 px-4 border rounded-md text-white bg-blue-600',
245-
onClick: () => alert(`Editing "${row.cells[0].data}" "${row.cells[1].data}"`)
246-
} 'Edit');
248+
onClick: () => alert(`
249+
Editing "${row.cells[0].data}"
250+
`)
251+
}, 'Edit')
247252
}
248253
},
249254
{ ... },

TODO.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
### TODOs
2-
| Filename | line # | TODO
3-
|:------|:------:|:------
1+
✖ Filetype .mjs is unsupported.

bili.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,25 @@ module.exports = {
99
extractCSS: false
1010
},
1111
plugins: {
12+
string: {
13+
include: 'node_modules/**/*.css'
14+
},
1215
vue: {
1316
target: 'browser',
14-
runtimeHelpers: true,
17+
babelHelopers: 'runtime',
1518
css: true
1619
},
1720
babel: {
1821
presets: ['vue', ['@babel/preset-env', { useBuiltIns: 'usage', corejs: 3 }]],
19-
runtimeHelpers: true,
22+
plugins: ['@babel/plugin-transform-runtime'],
23+
babelHelpers: 'runtime',
2024
exclude: 'node_modules/**',
2125
configFile: false
2226
},
2327
'node-resolve': true
2428
},
29+
resolvePlugins: {
30+
string: require('rollup-plugin-string').string
31+
},
2532
external: 'crypto'
2633
}

dist/index.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)