-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
3,030 additions
and
612 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
env: { | ||
commonjs: true, | ||
es6: true, | ||
node: true | ||
}, | ||
extends: "eslint:recommended", | ||
globals: { | ||
Atomics: "readonly", | ||
SharedArrayBuffer: "readonly" | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2018 | ||
}, | ||
rules: { | ||
"no-console": 1 | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Node.js CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [8.x, 10.x, 12.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm test | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
rules: { | ||
"no-console": 0 | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
var fs = require('fs'); | ||
var postcss = require('postcss'); | ||
var pxtorem = require('..'); | ||
var css = fs.readFileSync('main.css', 'utf8'); | ||
var options = { | ||
replace: false | ||
const fs = require("fs"); | ||
const postcss = require("postcss"); | ||
const pxtorem = require(".."); | ||
|
||
const css = fs.readFileSync("main.css", "utf8"); | ||
const options = { | ||
replace: false | ||
}; | ||
var processedCss = postcss(pxtorem(options)).process(css).css; | ||
const processedCss = postcss(pxtorem(options)).process(css).css; | ||
|
||
fs.writeFile('main-rem.css', processedCss, function (err) { | ||
fs.writeFile("main-rem.css", processedCss, function(err) { | ||
if (err) { | ||
throw err; | ||
} | ||
console.log('Rem file written.'); | ||
}); | ||
console.log("Rem file written."); | ||
}); |
Oops, something went wrong.