Skip to content

Commit 86bd853

Browse files
authored
feat!: change build system and change expose (#454)
* feat!: change build system and change expose * fix * fix * update * update * update * update * fix * update * update
1 parent d0c0cca commit 86bd853

File tree

79 files changed

+3118
-3456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3118
-3456
lines changed

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,16 @@ npm install -S cheetah-grid
3535
```
3636

3737
```js
38+
import "cheetah-grid/main.css";
3839
import * as cheetahGrid from "cheetah-grid";
39-
40-
// or
41-
42-
const cheetahGrid = require("cheetah-grid");
4340
```
4441

4542
### Downloading Cheetah Grid source code
4643

4744
[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)
4845

49-
[cheetahGrid.min.js](https://unpkg.com/cheetah-grid@1.16/dist/cheetahGrid.min.js)
50-
51-
SourceMap
52-
[cheetahGrid.min.js.map](https://unpkg.com/cheetah-grid@1.16/dist/cheetahGrid.min.js.map)
46+
[main.mjs](https://unpkg.com/cheetah-grid@1.16/dist/main.mjs)
47+
[main.css](https://unpkg.com/cheetah-grid@1.16/dist/main.css)
5348

5449
### Downloading Cheetah Grid using GitHub
5550

eslint/eslint-config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ module.exports = {
189189
'prefer-named-capture-group': 'off',
190190
'sort-imports': 'off'
191191

192-
}
193-
192+
},
193+
'overrides': [
194+
{
195+
'files': ['*.ts', '**/*.ts'],
196+
'parserOptions': {
197+
'sourceType': 'module',
198+
}
199+
},
200+
]
194201
};

packages/cheetah-grid-icon-svg-loader/test-fixtures/expect/test-icon.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<meta charset="UTF-8">
55
<title>ICON</title>
66

7-
<script type="text/javascript" src="../../../cheetah-grid/dist/cheetahGrid.min.js"></script>
7+
<link rel="stylesheet" href="../../../cheetah-grid/dist/main.css" />
8+
<script type="text/javascript" src="../../../cheetah-grid/dist/main.mjs"></script>
89
</head>
910
<body>
1011
<h1>ICONS</h1>

packages/cheetah-grid-icon-svg-loader/test-fixtures/expect/test-icons.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<meta charset="UTF-8">
55
<title>ICON</title>
66

7-
<script type="text/javascript" src="../../../cheetah-grid/dist/cheetahGrid.min.js"></script>
7+
<link rel="stylesheet" href="../../../cheetah-grid/dist/main.css" />
8+
<script type="text/javascript" src="../../../cheetah-grid/dist/main.mjs"></script>
89
</head>
910
<body>
1011
<h1>ICONS</h1>

packages/cheetah-grid/.eslintignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,4 @@ dist
33
dist-ts
44
coverage
55
report
6-
webpack/test/font-svg-to-icons-js-loader/fa_icons.js
7-
webpack/test/font-svg-to-icons-js-loader/mdi_icons.js
8-
webpack/test/svg-to-icon-js-loader/all_mdi_icons.js
9-
webpack/fork
106
/old.d.ts

packages/cheetah-grid/.eslintrc.js

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
11
'use strict';
22

3-
module.exports = require('../../eslint/eslint-config.js');
3+
const base = require('../../eslint/eslint-config.js');
4+
module.exports = {
5+
...base,
6+
overrides: [
7+
...base.overrides || [],
8+
{
9+
'files': ['*.ts', '*.tsx'],
10+
'parser': '@typescript-eslint/parser',
11+
'parserOptions': {
12+
loggerFn: false,
13+
project: 'tsconfig.json',
14+
},
15+
'plugins': ['@typescript-eslint', 'prettier'],
16+
'extends': [
17+
'plugin:@typescript-eslint/eslint-recommended',
18+
'plugin:@typescript-eslint/recommended',
19+
'prettier',
20+
'prettier/@typescript-eslint'
21+
],
22+
'rules': {
23+
'no-use-before-define': 'off',
24+
'@typescript-eslint/no-use-before-define': ['error', {'functions': false, 'classes': false}],
25+
'prettier/prettier': 'error',
26+
'no-useless-constructor': 'off',
27+
'@typescript-eslint/no-unused-vars': [
28+
'error',
29+
{'vars': 'all', 'args': 'none', 'varsIgnorePattern': '^_'}
30+
],
31+
'no-unused-expressions': 'off',
32+
'@typescript-eslint/no-non-null-assertion': 'off',
33+
'@typescript-eslint/no-empty-function': 'off',
34+
'@typescript-eslint/ban-ts-comment': 'error',
35+
'@typescript-eslint/no-extra-non-null-assertion': 'error',
36+
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
37+
'@typescript-eslint/prefer-as-const': 'error',
38+
'@typescript-eslint/no-for-in-array': 'error',
39+
'@typescript-eslint/no-misused-promises': ['error', {'checksVoidReturn': false, 'checksConditionals': false}],
40+
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
41+
'@typescript-eslint/prefer-regexp-exec': 'error',
42+
// "@typescript-eslint/unbound-method": "error",
43+
// "@typescript-eslint/no-unsafe-assignment": "error",
44+
// "@typescript-eslint/no-unsafe-call":"error",
45+
// "@typescript-eslint/no-unsafe-member-access": "error",
46+
// "@typescript-eslint/no-unsafe-return": "error",
47+
// "@typescript-eslint/prefer-nullish-coalescing": "error",
48+
// "@typescript-eslint/prefer-optional-chain": "error",
49+
'@typescript-eslint/restrict-plus-operands': 'error',
50+
'@typescript-eslint/restrict-template-expressions': ['error', {allowNumber: true, allowAny: true, allowBoolean: true}],
51+
'@typescript-eslint/explicit-module-boundary-types': ['error', {allowArgumentsExplicitlyTypedAsAny: true}],
52+
53+
'@typescript-eslint/consistent-type-imports': 'error',
54+
'no-duplicate-imports': 'off'
55+
}
56+
}
57+
]
58+
};

packages/cheetah-grid/karma.conf.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
// Karma configuration
22
// Generated on Thu Jan 19 2017 10:39:28 GMT+0900 (東京 (標準時))
33
'use strict';
4-
let mintarget = false;
5-
process.argv.forEach((val) => {
6-
if (val === '--min') {
7-
mintarget = true;
8-
}
9-
});
4+
105
module.exports = function(config) {
116
config.set({
127

@@ -24,7 +19,8 @@ module.exports = function(config) {
2419
require.resolve('promise-polyfills'),
2520
require.resolve('image-matcher'),
2621
'src/test/specs/test-helper.js',
27-
mintarget ? 'dist/cheetahGrid.min.js' : 'dist/cheetahGrid.js',
22+
'dist/main.css',
23+
'dist/main.umd.js',
2824
'src/test/specs/*_spec.js',
2925
'src/test/specs/**/*_spec.js',
3026
],

0 commit comments

Comments
 (0)