Skip to content

Commit 5020609

Browse files
authored
Refactor development (#58)
1 parent f5d9898 commit 5020609

File tree

13 files changed

+3030
-612
lines changed

13 files changed

+3030
-612
lines changed

.editorconfig

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@ root = true
33

44
[*]
55
indent_style = space
6-
indent_size = 4
7-
end_of_line = lf
8-
charset = utf-8
6+
indent_size = 2
97
trim_trailing_whitespace = true
108
insert_final_newline = true
119

1210
[*.md]
1311
trim_trailing_whitespace = false
14-
15-
[*.json]
16-
indent_size = 2

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
env: {
3+
commonjs: true,
4+
es6: true,
5+
node: true
6+
},
7+
extends: "eslint:recommended",
8+
globals: {
9+
Atomics: "readonly",
10+
SharedArrayBuffer: "readonly"
11+
},
12+
parserOptions: {
13+
ecmaVersion: 2018
14+
},
15+
rules: {
16+
"no-console": 1
17+
}
18+
};

.github/workflows/ci.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Node.js CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [8.x, 10.x, 12.x]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- run: npm install
20+
- run: npm run lint
21+
- run: npm test
22+
env:
23+
CI: true

.jshintrc

Lines changed: 0 additions & 19 deletions
This file was deleted.

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false
4+
}

example/.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
rules: {
3+
"no-console": 0
4+
}
5+
};

example/index.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
'use strict';
1+
"use strict";
22

3-
var fs = require('fs');
4-
var postcss = require('postcss');
5-
var pxtorem = require('..');
6-
var css = fs.readFileSync('main.css', 'utf8');
7-
var options = {
8-
replace: false
3+
const fs = require("fs");
4+
const postcss = require("postcss");
5+
const pxtorem = require("..");
6+
7+
const css = fs.readFileSync("main.css", "utf8");
8+
const options = {
9+
replace: false
910
};
10-
var processedCss = postcss(pxtorem(options)).process(css).css;
11+
const processedCss = postcss(pxtorem(options)).process(css).css;
1112

12-
fs.writeFile('main-rem.css', processedCss, function (err) {
13+
fs.writeFile("main-rem.css", processedCss, function(err) {
1314
if (err) {
1415
throw err;
1516
}
16-
console.log('Rem file written.');
17-
});
17+
console.log("Rem file written.");
18+
});

0 commit comments

Comments
 (0)