Skip to content

Commit d5a8e96

Browse files
committed
merge artoriasless
1 parent 1f60cd9 commit d5a8e96

21 files changed

+602
-11503
lines changed

.babelrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"presets": [
3+
[ "@babel/preset-react" ]
4+
],
5+
"plugins": [
6+
[
7+
"import",
8+
{
9+
"libraryName": "antd",
10+
"libraryDirectory": "es",
11+
"style": "css"
12+
}
13+
],
14+
"@babel/transform-runtime"
15+
]
16+
}

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
# The indent size used in the `package.json` file cannot be changed
15+
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
16+
[{*.yml,*.yaml,package.json}]
17+
indent_style = space
18+
indent_size = 2

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
resources
3+
test

.eslintrc.json

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es2021": true,
6+
"node": true
7+
},
8+
"globals": {
9+
"global": true
10+
},
11+
"extends": "eslint-config-egg",
12+
"parser": "babel-eslint",
13+
"parserOptions": {
14+
"sourceType": "module",
15+
"allowImportExportEverywhere": true,
16+
"ecmaVersion": 2018
17+
},
18+
"rules": {
19+
"no-unused-vars": [0],
20+
"max-len": [
21+
"error",
22+
{
23+
"tabWidth": 2,
24+
"code": 120,
25+
"ignoreUrls": true,
26+
"ignoreTemplateLiterals": true
27+
}
28+
],
29+
"array-bracket-spacing": ["error", "never", { "objectsInArrays": true }],
30+
"strict": ["error", "never"],
31+
"comma-dangle": [
32+
"error",
33+
{
34+
"arrays": "always-multiline",
35+
"objects": "always-multiline",
36+
"functions": "ignore"
37+
}
38+
],
39+
"comma-spacing": [
40+
"error",
41+
{
42+
"before": false,
43+
"after": true
44+
}
45+
],
46+
"indent": ["error", 2, { "SwitchCase": 1 }],
47+
"quotes": ["error", "single"],
48+
"semi": ["error", "always"],
49+
// "linebreak-style": ["error", "unix"],
50+
"no-multiple-empty-lines": [
51+
"error",
52+
{
53+
"max": 1,
54+
"maxEOF": 1
55+
}
56+
],
57+
"require-jsdoc": [
58+
"error",
59+
{
60+
"require": {
61+
"FunctionDeclaration": true,
62+
"MethodDefinition": false,
63+
"ClassDeclaration": false,
64+
"ArrowFunctionExpression": false,
65+
"FunctionExpression": false
66+
}
67+
}
68+
]
69+
}
70+
}

.gitignore

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
build
2-
releases
3-
*~
1+
node_modules
2+
package-lock.json
3+
yarn.lock
4+
5+
build/*
6+
releases/*
7+
8+
lib/binding
9+
10+
prebuilds/
11+
12+
.prebuildrc
413
.settings
514
.c9*
6-
node_modules
15+
16+
*~
717
*.node
818
*.swp
919
*.log
10-
prebuilds/
11-
.prebuildrc
12-
13-
# MacOS File System File
14-
**/.DS_Store

.npmignore

-5
This file was deleted.

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"semi": true,
5+
"jsxSingleQuote": true,
6+
"singleQuote": true,
7+
"printWidth": 120,
8+
"proseWrap": "never",
9+
"arrowParens": "avoid",
10+
"bracketSpacing": true
11+
}

ChangeLog

-36
This file was deleted.

Gruntfile.js

+58-66
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,67 @@
1-
module.exports = function(grunt) {
2-
grunt.initConfig({
3-
gyp: {
4-
ia32: {
5-
command: 'rebuild',
6-
options: {
7-
arch: 'ia32'
8-
}
9-
},
10-
x64: {
11-
command: 'rebuild',
12-
options: {
13-
arch: 'x64'
14-
}
15-
}
1+
module.exports = function gruntTask(grunt) {
2+
grunt.initConfig({
3+
gyp: {
4+
ia32: {
5+
command: 'rebuild',
6+
options: {
7+
arch: 'ia32',
168
},
17-
"nw-gyp": {
18-
ia32: {
19-
command: 'rebuild',
20-
options: {
21-
arch: 'ia32'
22-
}
23-
},
24-
x64: {
25-
command: 'rebuild',
26-
options: {
27-
arch: 'x64'
28-
}
29-
}
9+
},
10+
x64: {
11+
command: 'rebuild',
12+
options: {
13+
arch: 'x64',
3014
},
31-
copy: {
32-
ia32: {
33-
files: [{src: 'build/Release/node_printer.node', dest: 'lib/node_printer_' + process.platform + '_ia32.node'}]
34-
},
35-
x64: {
36-
files: [{src: 'build/Release/node_printer.node', dest: 'lib/node_printer_' + process.platform + '_x64.node'}]
37-
}
38-
}
39-
});
15+
},
16+
},
17+
'nw-gyp': {
18+
ia32: {
19+
command: 'rebuild',
20+
options: {
21+
arch: 'ia32',
22+
},
23+
},
24+
x64: {
25+
command: 'rebuild',
26+
options: {
27+
arch: 'x64',
28+
},
29+
},
30+
},
31+
copy: {
32+
ia32: {
33+
files: [
34+
{
35+
src: 'build/Release/node_printer.node',
36+
dest: 'lib/binding/napi-' + process.platform + '-ia32/node_printer.node',
37+
},
38+
],
39+
},
40+
x64: {
41+
files: [
42+
{
43+
src: 'build/Release/node_printer.node',
44+
dest: 'lib/binding/napi-' + process.platform + '-x64./node_printernode',
45+
},
46+
],
47+
},
48+
},
49+
});
4050

41-
grunt.loadNpmTasks('grunt-contrib-jshint');
42-
grunt.loadNpmTasks('grunt-node-gyp');
43-
grunt.loadNpmTasks('grunt-nw-gyp');
44-
grunt.loadNpmTasks('grunt-contrib-copy');
51+
grunt.loadNpmTasks('grunt-contrib-jshint');
52+
grunt.loadNpmTasks('grunt-node-gyp');
53+
grunt.loadNpmTasks('grunt-nw-gyp');
54+
grunt.loadNpmTasks('grunt-contrib-copy');
4555

46-
grunt.registerTask('build-nw-ia32', [
47-
'nw-gyp:ia32',
48-
'copy:ia32'
49-
]);
56+
grunt.registerTask('build-nw-ia32', ['nw-gyp:ia32', 'copy:ia32']);
5057

51-
grunt.registerTask('build-ia32', [
52-
'gyp:ia32',
53-
'copy:ia32'
54-
]);
58+
grunt.registerTask('build-ia32', ['gyp:ia32', 'copy:ia32']);
5559

56-
grunt.registerTask('build-x64', [
57-
'gyp:x64',
58-
'copy:x64'
59-
]);
60+
grunt.registerTask('build-x64', ['gyp:x64', 'copy:x64']);
6061

61-
grunt.registerTask('build-nw-x64', [
62-
'nw-gyp:x64',
63-
'copy:x64'
64-
]);
62+
grunt.registerTask('build-nw-x64', ['nw-gyp:x64', 'copy:x64']);
6563

66-
grunt.registerTask('build', [
67-
'build-ia32',
68-
'build-x64'
69-
]);
64+
grunt.registerTask('build', ['build-ia32', 'build-x64']);
7065

71-
grunt.registerTask('build-nw', [
72-
'build-nw-ia32',
73-
'build-nw-x64'
74-
]);
75-
}
66+
grunt.registerTask('build-nw', ['build-nw-ia32', 'build-nw-x64']);
67+
};

0 commit comments

Comments
 (0)